PTPAPI icon indicating copy to clipboard operation
PTPAPI copied to clipboard

How to use this within python?

Open bobbintb opened this issue 3 years ago • 1 comments

I am trying to get this to work in python instead of cli but this simple test isn't working.

import ptpapi

connection = ptpapi.login(username='username',passkey='xxxxxxxxxxxxxxxxxxxxxxxxxx')
print(connection.current_user())

Running the above just once locks me out of PTP: Your popcorn quota has been reached, come back later!

bobbintb avatar Aug 20 '21 18:08 bobbintb

You also need the password in addition to the passkey, or preferably, use the much more secure (but a little more limited) ApiUser/ApiKey system. There are also built-in protections against triggering the popcorn quota, but there's no way for it to account for requests from any other automation. The scripts provided should

kannibalox avatar Nov 08 '21 00:11 kannibalox