osudroid-api-wrapper 0.0.4__tar.gz → 0.0.5__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.
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/PKG-INFO +1 -1
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/pyproject.toml +1 -1
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/base/beatmap.py +8 -2
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper.egg-info/PKG-INFO +1 -1
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/LICENSE +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/setup.cfg +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/__init__.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/__init__.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/base/__init__.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/base/mods.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/base/player.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay_data/cursordata.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay_data/cursoroccurrence.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay_data/cursoroccurrencegroup.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay_data/hitresult.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay_data/movementtype.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay_data/replayobjectdata.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/score.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/structs/__init__.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/structs/profile.py +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper.egg-info/SOURCES.txt +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper.egg-info/dependency_links.txt +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper.egg-info/requires.txt +0 -0
- {osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper.egg-info/top_level.txt +0 -0
|
@@ -41,6 +41,7 @@ class Beatmap:
|
|
|
41
41
|
self.title: str = None
|
|
42
42
|
self.version: str = None
|
|
43
43
|
self.creator: str = None
|
|
44
|
+
self.combo: int = None
|
|
44
45
|
self.ar: float = None
|
|
45
46
|
self.od: float = None
|
|
46
47
|
self.hp: float = None
|
|
@@ -53,6 +54,8 @@ class Beatmap:
|
|
|
53
54
|
def get_beatmap(cls, beatmap_id: int = None, md5: str = None) -> 'Beatmap':
|
|
54
55
|
beatmap = cls()
|
|
55
56
|
url = "https://old.ppy.sh/api/get_beatmaps"
|
|
57
|
+
if key is "":
|
|
58
|
+
raise ValueError("API key is not set. Please set the OSU_API_KEY environment variable.")
|
|
56
59
|
if beatmap_id is not None:
|
|
57
60
|
params = {
|
|
58
61
|
"k": key,
|
|
@@ -73,6 +76,8 @@ class Beatmap:
|
|
|
73
76
|
data = response.json()
|
|
74
77
|
if len(data) == 0:
|
|
75
78
|
return None
|
|
79
|
+
if data == []:
|
|
80
|
+
return None
|
|
76
81
|
data = data[0]
|
|
77
82
|
|
|
78
83
|
beatmap.beatmap_id = int(data["beatmap_id"])
|
|
@@ -89,6 +94,7 @@ class Beatmap:
|
|
|
89
94
|
beatmap.bpm = float(data["bpm"])
|
|
90
95
|
beatmap.star = float(data["difficultyrating"])
|
|
91
96
|
beatmap.length = int(data["total_length"])
|
|
97
|
+
beatmap.combo = int(data["max_combo"])
|
|
92
98
|
|
|
93
99
|
return beatmap
|
|
94
100
|
|
|
@@ -109,6 +115,6 @@ class Beatmap:
|
|
|
109
115
|
"cs": self.cs,
|
|
110
116
|
"bpm": self.bpm,
|
|
111
117
|
"star": self.star,
|
|
112
|
-
"length": self.length
|
|
113
|
-
|
|
118
|
+
"length": self.length,
|
|
119
|
+
"combo": self.combo
|
|
114
120
|
}
|
|
File without changes
|
|
File without changes
|
{osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/replay.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{osudroid_api_wrapper-0.0.4 → osudroid_api_wrapper-0.0.5}/src/osudroid_api_wrapper/classes/score.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|