Closed Jaxon0 closed 2 years ago
try client.servers.list_servers()
instead
I believe this is just a documentation error. Since adding paginated responses to list_servers() the example code in the README doesn't use the correct structure for accessing the data.
I'd say it's a documentation error - but Client.list_servers does exist so it seems like more than just documentation and calling client.client.list_servers()
results in the following error
File "...pydactyl/api/client.py", line 13, in list_servers response = self._api_request(endpoint=endpoint) File "...pydactyl/api/base.py", line 106, in _api_request response.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://../api/client
Both exist, they're just part of different API namespaces. Anything under api/client requires a Client key, and anything under api/application requires an Application key. A 403 error usually means you're using the wrong type of API key, or a key without sufficient permissions.
That make sense, however I don't see how a client key is created LOL. Ptero never has had the most intuitive UI :/
Agreed, it's not very intuitive.
Fixed by 3c45a16
hey there,
client.client.list_servers()
seems to be broken/not working.