updated readme

This commit is contained in:
richard 2013-05-08 12:32:45 +01:00
parent b43c3869a3
commit 728b88c1ff
2 changed files with 3 additions and 1 deletions

View file

@ -58,6 +58,7 @@ files = m.get_files()
```python ```python
file = m.upload('myfile.doc') file = m.upload('myfile.doc')
m.get_upload_link(file) m.get_upload_link(file)
# see mega.py for destination and filename options
``` ```
### Download a file from URL or file obj, optionally specify destination folder ### Download a file from URL or file obj, optionally specify destination folder
```python ```python
@ -65,6 +66,8 @@ file = m.find('myfile.doc')
m.download(file) m.download(file)
m.download_url('https://mega.co.nz/#!utYjgSTQ!OM4U3V5v_W4N5edSo0wolg1D5H0fwSrLD3oLnLuS9pc') m.download_url('https://mega.co.nz/#!utYjgSTQ!OM4U3V5v_W4N5edSo0wolg1D5H0fwSrLD3oLnLuS9pc')
m.download(file, '/home/john-smith/Desktop') m.download(file, '/home/john-smith/Desktop')
# specify optional download filename
m.download(file, '/home/john-smith/Desktop', 'myfile.zip')
``` ```
### Create a folder ### Create a folder
```python ```python

View file

@ -261,7 +261,6 @@ class Mega(object):
""" """
Get all files in a given target, e.g. 4=trash Get all files in a given target, e.g. 4=trash
""" """
if type(target) == int: if type(target) == int:
# convert special nodes (e.g. trash) # convert special nodes (e.g. trash)
node_id = self.get_node_by_type(target) node_id = self.get_node_by_type(target)