infinitode.py 1.1.1__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/PKG-INFO +1 -2
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/__init__.py +1 -1
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/player.py +34 -25
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode.py.egg-info/PKG-INFO +1 -2
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode.py.egg-info/SOURCES.txt +0 -1
- infinitode.py-1.1.1/LICENSE +0 -21
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/README.md +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/badge.py +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/core.py +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/errors.py +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/leaderboard.py +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/py.typed +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/score.py +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode/utils.py +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode.py.egg-info/dependency_links.txt +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode.py.egg-info/requires.txt +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/infinitode.py.egg-info/top_level.txt +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/setup.cfg +0 -0
- {infinitode.py-1.1.1 → infinitode.py-1.1.2}/setup.py +0 -0
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: infinitode.py
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: A python wrapper for the Infinitode 2 API.
|
|
5
5
|
Home-page: https://github.com/Sprylos/infinitode.py
|
|
6
6
|
Author: Sprylos
|
|
7
7
|
License: MIT
|
|
8
8
|
Platform: UNKNOWN
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
|
-
License-File: LICENSE
|
|
11
10
|
|
|
12
11
|
# Infinitode.py
|
|
13
12
|
|
|
@@ -15,6 +15,9 @@ if TYPE_CHECKING:
|
|
|
15
15
|
__all__ = ("Player",)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
AVATAR_URL = "https://storage.prineside.com/files/i2{}/avatars/{}-128.png"
|
|
19
|
+
|
|
20
|
+
|
|
18
21
|
class Player:
|
|
19
22
|
"""Represents an in-game Player."""
|
|
20
23
|
|
|
@@ -163,7 +166,7 @@ class Player:
|
|
|
163
166
|
@property
|
|
164
167
|
def avatar_link(self):
|
|
165
168
|
"""The link to the player's avatar. Invalid URL if the user doesn't have a pfp."""
|
|
166
|
-
return
|
|
169
|
+
return AVATAR_URL.format('beta' if self._beta else '', self._playerid)
|
|
167
170
|
|
|
168
171
|
@property
|
|
169
172
|
def daily_quest(self):
|
|
@@ -210,21 +213,24 @@ class Player:
|
|
|
210
213
|
Fetches the player's Daily Quest score if it wasn't fetched already.
|
|
211
214
|
Returns None if the player is not ranked.
|
|
212
215
|
"""
|
|
213
|
-
if
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
216
|
+
if self._daily_quest:
|
|
217
|
+
return self._daily_quest
|
|
218
|
+
|
|
219
|
+
if session is None:
|
|
220
|
+
if self._daily_quest is None:
|
|
221
|
+
return
|
|
222
|
+
|
|
223
|
+
# daily_quest is MISSING
|
|
224
|
+
raise InfinitodeError(
|
|
225
|
+
"You need to provide a Session to fetch the daily quest score."
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
lb = await session.daily_quest_leaderboards(playerid=self._playerid, beta=self._beta)
|
|
229
|
+
self._daily_quest = lb.player
|
|
225
230
|
|
|
226
231
|
return self._daily_quest
|
|
227
232
|
|
|
233
|
+
|
|
228
234
|
async def fetch_skill_point(
|
|
229
235
|
self, session: Optional[Session] = None
|
|
230
236
|
) -> Optional[Score]:
|
|
@@ -232,21 +238,24 @@ class Player:
|
|
|
232
238
|
Fetches the player's Skill Point score if it wasn't fetched already.
|
|
233
239
|
Returns None if the player is not ranked.
|
|
234
240
|
"""
|
|
235
|
-
if
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
241
|
+
if self._skill_point:
|
|
242
|
+
return self._skill_point
|
|
243
|
+
|
|
244
|
+
if session is None:
|
|
245
|
+
if self._skill_point is None:
|
|
246
|
+
return
|
|
247
|
+
|
|
248
|
+
# skill_point is MISSING
|
|
249
|
+
raise InfinitodeError(
|
|
250
|
+
"You need to provide a Session to fetch the skill point score."
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
lb = await session.skill_point_leaderboard( playerid=self._playerid, beta=self._beta)
|
|
254
|
+
self._skill_point = lb.player
|
|
247
255
|
|
|
248
256
|
return self._skill_point
|
|
249
257
|
|
|
258
|
+
|
|
250
259
|
# magic methods
|
|
251
260
|
|
|
252
261
|
def __repr__(self) -> str:
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: infinitode.py
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: A python wrapper for the Infinitode 2 API.
|
|
5
5
|
Home-page: https://github.com/Sprylos/infinitode.py
|
|
6
6
|
Author: Sprylos
|
|
7
7
|
License: MIT
|
|
8
8
|
Platform: UNKNOWN
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
|
-
License-File: LICENSE
|
|
11
10
|
|
|
12
11
|
# Infinitode.py
|
|
13
12
|
|
infinitode.py-1.1.1/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015-present Rapptz
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
-
copy of this software and associated documentation files (the "Software"),
|
|
7
|
-
to deal in the Software without restriction, including without limitation
|
|
8
|
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
9
|
-
and/or sell copies of the Software, and to permit persons to whom the
|
|
10
|
-
Software is furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
16
|
-
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
20
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
21
|
-
DEALINGS IN THE SOFTWARE.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|