Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support create(), get_full_list(), download() and delete()
Refactored Client.send() to support binary responses.
Added Client.send_raw() which returns raw bytes from HTTP response.
It was not possible to support any of the standard API CRUD operations provided by the
BaseCrudService
on account of the Backups API returning very different structures in most requests and responses. It would have required changing the interface for the class which seemed dangerous. Therefore, the API for Backups is a little more bespoke.The tests for the Backups API is also a little different in that it seems like a somewhat heavier type of operation than other operations and lent itself better to doing verification that the underlying APIs were in fact called.
The
download
interface also has an optional parameter forfile_token
. Not providing one is easier to use, but could create a poor usage pattern as it is more inefficient for multiple download calls. If the reviewer could provide feedback as to whether it is desirable or acceptable it would be welcome.