You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Xolphin, thanks for opening up a Python API client!
I do have a couple problems with the client code however, let me start with one: the API is not very pythonesque.
Example: when working with the responses the API client returns (Request objects), the attributes the Request object has depends on the reponse of the server. In casu:
Hey Xolphin, thanks for opening up a Python API client!
I do have a couple problems with the client code however, let me start with one: the API is not very pythonesque.
Example: when working with the responses the API client returns (
Request
objects), the attributes theRequest
object has depends on the reponse of the server. In casu:xolphin-api-python/xolphin/responses/request.py
Line 10 in a90a14d
A class instance of
Request
normally has loads and loads of attributes, but suddenly has none whatsoever when an error occured.This makes the class hard to work with. For an example, take your own
Base
response object:xolphin-api-python/xolphin/responses/base.py
Line 19 in a90a14d
The approach is not only very verbose, it is also error-prone, because in the same class:
Both of which will fail if the class encountered no message or no errors! These should have been written as:
Please consider simplifying the code.
The text was updated successfully, but these errors were encountered: