Added get_request and post_request methods to the API client class. These functions are private to the client.
The logic behind this decision is that there is a lot of repetition of either post or get requests in the different methods of the API client. This has the potential to cause cumbersome error-handling issues from the HTTP request, thus having them in their specific method limits the error handling to just those methods.
This change also makes the maintenance of the client easier in the long run.
Added
get_request
andpost_request
methods to the API client class. These functions are private to the client.The logic behind this decision is that there is a lot of repetition of either post or get requests in the different methods of the API client. This has the potential to cause cumbersome error-handling issues from the HTTP request, thus having them in their specific method limits the error handling to just those methods.
This change also makes the maintenance of the client easier in the long run.