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.
Hi Teddy!
Here is a portion of new updates.
I forgot to mention that on Tuesdays and Thursdays I'm busy with Thai classes, so my contributions whould be shifted to weekends. Next one will appear faster :)
1. Exceptions raise on error response from aftership API
If non 2XX response code came from API I raise exception which contains actual server response.
Example of exception handling:
2. Rate limit support. Custom headers support
Rate limit is set to 10 calls per second (1 call per 1/10 sec), can be overwritten by API object creation:
3. ... added positional arguments support
Convenient way to call methods with positional argument going at the end, e.g.:
There is 3 ways to write positional arguments:
— Arguments separated by dots. Used for predefined API words.
— get(), post(), put(), delete() positional arguments (unnamed arguments). Used for variable values that goes at the end of the API endpoint.
— String values in ['brackets']. Used for variable values that goes NOT at the end of the API endpoint.
Example of brackets use:
Would be glad to answer your questions.
Fedor