-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a18d88
commit 73a907f
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 🛑 Rate Limiting API Calls | ||
|
||
The API object has a default parameter of 'rate\_limit' set to True which limits the amounts of API calls the library will make to 5 calls per 1 second. If the limit is reach the system will wait for the limit to pass before executing the next 5 calls.  | ||
|
||
This limiting will ease the pressure on the API and hopefully stop any negative impact on systems such as significant resource drainage leading to outages or poor performance.  | ||
|
||
{% hint style="info" %} | ||
It should be noted that Odin does not imply any limitations on the usage of their API and this feature is just a precaution.  | ||
{% endhint %} | ||
|
||
## Disabling Rate Limiting | ||
|
||
The limitation is applied by default however this can be removed by passing in the `rate_limit` argument set to `False` when instantiating an API object. | ||
|
||
{% hint style="danger" %} | ||
This will remove the limitation of 5 calls per 1 second allowing the library to send as many API as it can. | ||
{% endhint %} | ||
|
||
```python | ||
my_api = Api(base_url="https://magic.14ip.net/api/v2", username="Jordan.Prescott", | ||
password="MAGIC_US", rate_limit=False) | ||
``` |