Added file search function and get public link function
This commit is contained in:
parent
0117b0836a
commit
a26a6e2eae
3 changed files with 1 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
||||||
cyberjujum
|
cyberjujum
|
||||||
richardasaurus
|
richardasaurus
|
||||||
|
jlejeune
|
||||||
issues: zbahoui,alyssarowan
|
issues: zbahoui,alyssarowan
|
||||||
|
|
2
mega.py
2
mega.py
|
@ -138,8 +138,6 @@ class Mega(object):
|
||||||
if file[1]['a'] and file[1]['a']['n'] == filename:
|
if file[1]['a'] and file[1]['a']['n'] == filename:
|
||||||
return file
|
return file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def move(self, file_id, target):
|
def move(self, file_id, target):
|
||||||
#TODO node_id improvements
|
#TODO node_id improvements
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -30,13 +30,11 @@ def test():
|
||||||
|
|
||||||
##search for a file on mega
|
##search for a file on mega
|
||||||
files = m.find('test.py')
|
files = m.find('test.py')
|
||||||
|
|
||||||
if files:
|
if files:
|
||||||
#trash a file by it's id
|
#trash a file by it's id
|
||||||
#iterate to trash multiple results
|
#iterate to trash multiple results
|
||||||
print(m.delete(files[1]['k']))
|
print(m.delete(files[1]['k']))
|
||||||
|
|
||||||
|
|
||||||
##download file, by id+key or url
|
##download file, by id+key or url
|
||||||
#m.download('6hBW0R4a','By7-Vjj5xal8K5w_IXH3PlGNyZ1VvIrjZkOmHGq1X00')
|
#m.download('6hBW0R4a','By7-Vjj5xal8K5w_IXH3PlGNyZ1VvIrjZkOmHGq1X00')
|
||||||
#m.download_url('https://mega.co.nz/#!6hBW0R4a!By7-Vjj5xal8K5w_IXH3PlGNyZ1VvIrjZkOmHGq1X00')
|
#m.download_url('https://mega.co.nz/#!6hBW0R4a!By7-Vjj5xal8K5w_IXH3PlGNyZ1VvIrjZkOmHGq1X00')
|
||||||
|
|
Loading…
Reference in a new issue