HTTP Components
Parts required for the http communication to work
RateLimiter
Gives out x tokens for network operations every y seconds
Attributes:
| Name | Type | Description |
|---|---|---|
max_tokens |
int
|
How many requests can we save up - bungie limits after 250 in 10s, so the default is 240 |
seconds |
int
|
In how many seconds those requests are allowed |
Source code in src/bungio/http/ratelimiting.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
wait_for_token()
async
Waits until a token becomes available
Source code in src/bungio/http/ratelimiting.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
Route
Bungie http route
Attributes:
| Name | Type | Description |
|---|---|---|
path |
str
|
The bungie path addition |
method |
str
|
The http method |
auth |
Optional[AuthData]
|
Authentication information |
data |
Optional[dict | list]
|
Body data to send |
**params |
Optional[dict | list]
|
All query parameters |
Source code in src/bungio/http/route.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |