Skip to content

Commit 55e7db2

Browse files
authored
Merge pull request #44 from ssxdan/master
Update rename_link function
2 parents e547d07 + 7614fbc commit 55e7db2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

myjdapi/myjdapi.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def add_links(self,
399399
"""
400400
resp = self.device.action("/linkgrabberv2/addLinks", params)
401401
return resp
402-
402+
403403
def is_collecting(self):
404404
"""
405405
Boolean status query about the collecting process
@@ -435,12 +435,13 @@ def help(self):
435435
resp = self.device.action("/linkgrabberv2/help", http_action="GET")
436436
return resp
437437

438-
def rename_link(self):
438+
def rename_link(self, link_id, new_name):
439439
"""
440-
No idea what parameters i have to pass and/or i don't know what it does.
441-
If i find out i will implement it :P
440+
Renames files related with link_id
442441
"""
443-
pass
442+
params = [link_id, new_name]
443+
resp = self.device.action(self.url + "/renameLink", params)
444+
return resp
444445

445446
def move_links(self):
446447
"""

0 commit comments

Comments
 (0)