cenkalti / putio.py

A python wrapper for put.io APIv2
http://put.io
MIT License
72 stars 41 forks source link

How to use rename #48

Closed MantieReid closed 4 years ago

MantieReid commented 4 years ago

How do I use rename? changename = client.File.rename('62650943', "testfile") I have tried using the following code above and nothing seems to work.

I keep getting the following error each time I try using it. return self.client.request('/files/rename', method='POST', AttributeError: 'str' object has no attribute 'client'

How do I use rename?

cenkalti commented 4 years ago

Correct usage:

f = client.File.get(62650943)
f.rename("new name")