We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a7174d commit 395923dCopy full SHA for 395923d
open_rarity/resolver/opensea_api_helpers.py
@@ -124,7 +124,11 @@ async def get_tokens_from_opensea(
124
slug : str
125
Opensea collection slug
126
token_ids : list[int]
127
- List of token ids to fetch for
+ List of token ids to fetch
128
+ client : httpx.AsyncClient
129
+ Async client used to make api calls
130
+ sem : BoundedSemaphore | Semaphore
131
+ From the asyncio library and is used to rate limit api calls
132
133
Returns
134
-------
@@ -172,7 +176,7 @@ async def get_tokens_from_opensea(
172
176
r.raise_for_status()
173
177
174
178
# The API does not sort return value assets by token ID, so sort then return
175
- tokens = []
179
+ tokens: list[Token] = []
180
assets = sorted(
181
r.json()["assets"], key=(lambda a: int(a["token_id"]))
182
)
0 commit comments