Skip to content

Commit c1b20b9

Browse files
committed
Added readme
1 parent 7bb1231 commit c1b20b9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,34 @@ The ``SynologyDSM`` class can also ``update()`` all APIs at once.
126126
print("Space used: " + str(api.share.share_size(share_uuid, human_readable=True)))
127127
print("Recycle Bin Enabled: " + str(api.share.share_recycle_bin(share_uuid)))
128128
print("--")
129+
130+
131+
Download Station usage
132+
--------------------------
133+
134+
.. code-block:: python
135+
136+
from synology_dsm import SynologyDSM
137+
138+
api = SynologyDSM("<IP/DNS>", "<port>", "<username>", "<password>")
139+
140+
if "SYNO.DownloadStation.Info" in api.apis:
141+
142+
api.download_station.get_info()
143+
api.download_station.get_config()
144+
145+
# The download list will be updated after each of the following functions:
146+
# You should have the right on the (default) directory that the download should be saved, or you will get a 403 or 406 error
147+
api.download_station.create("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4")
148+
api.download_station.pause("dbid_1")
149+
# Like the other function, you can eather pass a str or a list
150+
api.download_station.resume(["dbid_1", "dbid_2"])
151+
api.download_station.delete("dbid_3")
152+
153+
# Manual update
154+
api.download_station.update()
155+
156+
129157
Surveillance Station usage
130158
--------------------------
131159

0 commit comments

Comments
 (0)