ossapi 5.2.1__tar.gz → 5.3.1__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.
- {ossapi-5.2.1 → ossapi-5.3.1}/PKG-INFO +1 -1
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/__init__.py +117 -117
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/enums.py +2 -2
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/models.py +87 -53
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/ossapi.py +2 -3
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/ossapiv2.py +149 -97
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/ossapiv2_async.py +157 -98
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/replay.py +2 -2
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/utils.py +3 -4
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi.egg-info/PKG-INFO +1 -1
- ossapi-5.3.1/ossapi.egg-info/SOURCES.txt +22 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/tests/test_cursor.py +1 -2
- {ossapi-5.2.1 → ossapi-5.3.1}/tests/test_endpoints.py +16 -7
- {ossapi-5.2.1 → ossapi-5.3.1}/tests/test_models.py +1 -2
- ossapi-5.2.1/.gitignore +0 -286
- ossapi-5.2.1/.nojekyll +0 -0
- ossapi-5.2.1/Makefile +0 -22
- ossapi-5.2.1/docs/_static/custom.css +0 -12
- ossapi-5.2.1/docs/advanced.rst +0 -11
- ossapi-5.2.1/docs/api-reference.rst +0 -4603
- ossapi-5.2.1/docs/async.rst +0 -24
- ossapi-5.2.1/docs/beatmap packs.rst +0 -12
- ossapi-5.2.1/docs/beatmaps.rst +0 -20
- ossapi-5.2.1/docs/beatmapsets.rst +0 -20
- ossapi-5.2.1/docs/changelog.rst +0 -14
- ossapi-5.2.1/docs/chat.rst +0 -18
- ossapi-5.2.1/docs/comments.rst +0 -12
- ossapi-5.2.1/docs/conf.py +0 -65
- ossapi-5.2.1/docs/creating-a-client.rst +0 -50
- ossapi-5.2.1/docs/domains.rst +0 -21
- ossapi-5.2.1/docs/endpoints.rst +0 -31
- ossapi-5.2.1/docs/events.rst +0 -10
- ossapi-5.2.1/docs/expandable-models.rst +0 -21
- ossapi-5.2.1/docs/foreign-keys.rst +0 -44
- ossapi-5.2.1/docs/forums.rst +0 -30
- ossapi-5.2.1/docs/friends.rst +0 -13
- ossapi-5.2.1/docs/generate_docs.py +0 -279
- ossapi-5.2.1/docs/generate_readme_list.py +0 -34
- ossapi-5.2.1/docs/grants.rst +0 -53
- ossapi-5.2.1/docs/home.rst +0 -10
- ossapi-5.2.1/docs/index.rst +0 -36
- ossapi-5.2.1/docs/matches.rst +0 -12
- ossapi-5.2.1/docs/me.rst +0 -13
- ossapi-5.2.1/docs/news.rst +0 -12
- ossapi-5.2.1/docs/oauth.rst +0 -10
- ossapi-5.2.1/docs/pagination.rst +0 -39
- ossapi-5.2.1/docs/quickstart.rst +0 -7
- ossapi-5.2.1/docs/rankings.rst +0 -10
- ossapi-5.2.1/docs/rooms.rst +0 -16
- ossapi-5.2.1/docs/scores.rst +0 -12
- ossapi-5.2.1/docs/seasonal backgrounds.rst +0 -10
- ossapi-5.2.1/docs/serializing-models.rst +0 -13
- ossapi-5.2.1/docs/spotlights.rst +0 -10
- ossapi-5.2.1/docs/users.rst +0 -20
- ossapi-5.2.1/docs/wiki.rst +0 -10
- ossapi-5.2.1/ossapi.egg-info/SOURCES.txt +0 -64
- ossapi-5.2.1/tests/__init__.py +0 -123
- {ossapi-5.2.1 → ossapi-5.3.1}/LICENSE +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/README.md +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/encoder.py +2 -2
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi/mod.py +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi.egg-info/dependency_links.txt +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi.egg-info/requires.txt +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/ossapi.egg-info/top_level.txt +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/pyproject.toml +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/setup.cfg +0 -0
- {ossapi-5.2.1 → ossapi-5.3.1}/tests/test_v1.py +0 -0
|
@@ -4,147 +4,147 @@ import logging
|
|
|
4
4
|
handler = logging.StreamHandler()
|
|
5
5
|
logging.getLogger("ossapi").addHandler(handler)
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
APIException,
|
|
12
|
-
)
|
|
13
|
-
from ossapi.ossapiv2 import Ossapi, Grant, Scope, Domain
|
|
14
|
-
from ossapi.models import (
|
|
15
|
-
Beatmap,
|
|
16
|
-
BeatmapCompact,
|
|
17
|
-
BeatmapUserScore,
|
|
18
|
-
ForumTopicAndPosts,
|
|
19
|
-
Search,
|
|
20
|
-
CommentBundle,
|
|
21
|
-
Cursor,
|
|
22
|
-
Score,
|
|
23
|
-
BeatmapsetSearchResult,
|
|
24
|
-
ModdingHistoryEventsBundle,
|
|
25
|
-
User,
|
|
26
|
-
Rankings,
|
|
27
|
-
BeatmapScores,
|
|
28
|
-
KudosuHistory,
|
|
29
|
-
Beatmapset,
|
|
30
|
-
BeatmapPlaycount,
|
|
31
|
-
Spotlight,
|
|
32
|
-
Spotlights,
|
|
33
|
-
WikiPage,
|
|
34
|
-
_Event,
|
|
35
|
-
Event,
|
|
36
|
-
BeatmapsetDiscussionPosts,
|
|
37
|
-
Build,
|
|
38
|
-
ChangelogListing,
|
|
39
|
-
MultiplayerScores,
|
|
40
|
-
BeatmapsetDiscussionVotes,
|
|
41
|
-
CreatePMResponse,
|
|
42
|
-
BeatmapsetDiscussions,
|
|
43
|
-
UserCompact,
|
|
44
|
-
BeatmapsetCompact,
|
|
45
|
-
ForumPoll,
|
|
46
|
-
Room,
|
|
47
|
-
RoomPlaylistItem,
|
|
48
|
-
RoomPlaylistItemMod,
|
|
49
|
-
RoomLeaderboardScore,
|
|
50
|
-
RoomLeaderboardUserScore,
|
|
51
|
-
RoomLeaderboard,
|
|
52
|
-
Match,
|
|
53
|
-
Matches,
|
|
54
|
-
MatchResponse,
|
|
55
|
-
ScoreMatchInfo,
|
|
56
|
-
MatchGame,
|
|
57
|
-
MatchEventDetail,
|
|
58
|
-
MatchEvent,
|
|
59
|
-
ScoringType,
|
|
60
|
-
TeamType,
|
|
61
|
-
StatisticsVariant,
|
|
62
|
-
Events,
|
|
63
|
-
BeatmapPack,
|
|
64
|
-
BeatmapPacks,
|
|
65
|
-
)
|
|
7
|
+
from oauthlib.oauth2 import AccessDeniedError, TokenExpiredError
|
|
8
|
+
from oauthlib.oauth2.rfc6749.errors import InsufficientScopeError
|
|
9
|
+
|
|
10
|
+
from ossapi.encoder import ModelEncoder, serialize_model
|
|
66
11
|
from ossapi.enums import (
|
|
67
|
-
|
|
68
|
-
ScoreType,
|
|
69
|
-
RankingFilter,
|
|
70
|
-
RankingType,
|
|
71
|
-
UserBeatmapType,
|
|
12
|
+
Availability,
|
|
72
13
|
BeatmapDiscussionPostSort,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
CommentableType,
|
|
76
|
-
CommentSort,
|
|
77
|
-
ForumTopicSort,
|
|
78
|
-
SearchMode,
|
|
79
|
-
MultiplayerScoresSort,
|
|
14
|
+
BeatmapPackType,
|
|
15
|
+
BeatmapPackUserCompletionData,
|
|
80
16
|
BeatmapsetDiscussionVote,
|
|
81
17
|
BeatmapsetDiscussionVoteSort,
|
|
82
|
-
|
|
83
|
-
MessageType,
|
|
18
|
+
BeatmapsetEventType,
|
|
84
19
|
BeatmapsetSearchCategory,
|
|
85
|
-
BeatmapsetSearchMode,
|
|
86
20
|
BeatmapsetSearchExplicitContent,
|
|
87
|
-
BeatmapsetSearchLanguage,
|
|
88
21
|
BeatmapsetSearchGenre,
|
|
89
|
-
|
|
22
|
+
BeatmapsetSearchLanguage,
|
|
23
|
+
BeatmapsetSearchMode,
|
|
90
24
|
BeatmapsetSearchSort,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
25
|
+
BeatmapsetStatus,
|
|
26
|
+
ChangelogSearch,
|
|
27
|
+
CommentableType,
|
|
28
|
+
CommentSort,
|
|
29
|
+
Country,
|
|
30
|
+
Cover,
|
|
31
|
+
Covers,
|
|
32
|
+
EventAchivement,
|
|
33
|
+
EventBeatmap,
|
|
34
|
+
EventBeatmapset,
|
|
96
35
|
EventsSort,
|
|
97
|
-
|
|
98
|
-
|
|
36
|
+
EventUser,
|
|
37
|
+
Failtimes,
|
|
38
|
+
ForumPollText,
|
|
39
|
+
ForumPollTitle,
|
|
40
|
+
ForumPostBody,
|
|
41
|
+
ForumTopicSort,
|
|
42
|
+
GameMode,
|
|
43
|
+
GithubUser,
|
|
44
|
+
GroupDescription,
|
|
99
45
|
Hype,
|
|
100
|
-
Nominations,
|
|
101
|
-
Nomination,
|
|
102
46
|
Kudosu,
|
|
103
47
|
KudosuGiver,
|
|
104
48
|
KudosuPost,
|
|
105
49
|
KudosuVote,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
GithubUser,
|
|
111
|
-
ChangelogSearch,
|
|
50
|
+
MatchEventType,
|
|
51
|
+
MessageType,
|
|
52
|
+
MultiplayerScoresSort,
|
|
53
|
+
NewsPostKey,
|
|
112
54
|
NewsSearch,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
ReviewsConfig,
|
|
55
|
+
Nomination,
|
|
56
|
+
Nominations,
|
|
57
|
+
ProfileBanner,
|
|
117
58
|
RankHighest,
|
|
59
|
+
RankHistory,
|
|
60
|
+
Ranking,
|
|
61
|
+
RankingFilter,
|
|
62
|
+
RankingType,
|
|
63
|
+
ReviewsConfig,
|
|
64
|
+
RoomCategory,
|
|
65
|
+
RoomSearchMode,
|
|
66
|
+
RoomType,
|
|
67
|
+
ScoreType,
|
|
68
|
+
SearchMode,
|
|
69
|
+
Statistics,
|
|
70
|
+
UserAccountHistory,
|
|
71
|
+
UserBadge,
|
|
72
|
+
UserBeatmapType,
|
|
73
|
+
UserGradeCounts,
|
|
74
|
+
UserGroup,
|
|
75
|
+
UserLevel,
|
|
76
|
+
UserLookupKey,
|
|
118
77
|
UserMonthlyPlaycount,
|
|
119
78
|
UserPage,
|
|
120
|
-
UserLevel,
|
|
121
|
-
UserGradeCounts,
|
|
122
|
-
UserReplaysWatchedCount,
|
|
123
79
|
UserProfileCustomization,
|
|
124
|
-
|
|
80
|
+
UserReplaysWatchedCount,
|
|
81
|
+
Variant,
|
|
125
82
|
Weight,
|
|
126
|
-
Covers,
|
|
127
|
-
UserGroup,
|
|
128
|
-
GroupDescription,
|
|
129
|
-
UserBadge,
|
|
130
|
-
UserAccountHistory,
|
|
131
|
-
ProfileBanner,
|
|
132
|
-
Cover,
|
|
133
|
-
Country,
|
|
134
|
-
Ranking,
|
|
135
|
-
Failtimes,
|
|
136
|
-
BeatmapPackType,
|
|
137
|
-
BeatmapPackUserCompletionData,
|
|
138
83
|
)
|
|
139
84
|
from ossapi.mod import Mod
|
|
140
|
-
from ossapi.
|
|
141
|
-
|
|
85
|
+
from ossapi.models import (
|
|
86
|
+
Beatmap,
|
|
87
|
+
BeatmapCompact,
|
|
88
|
+
BeatmapPack,
|
|
89
|
+
BeatmapPacks,
|
|
90
|
+
BeatmapPlaycount,
|
|
91
|
+
BeatmapScores,
|
|
92
|
+
Beatmapset,
|
|
93
|
+
BeatmapsetCompact,
|
|
94
|
+
BeatmapsetDiscussionPosts,
|
|
95
|
+
BeatmapsetDiscussions,
|
|
96
|
+
BeatmapsetDiscussionVotes,
|
|
97
|
+
BeatmapsetSearchResult,
|
|
98
|
+
BeatmapUserScore,
|
|
99
|
+
Build,
|
|
100
|
+
ChangelogListing,
|
|
101
|
+
CommentBundle,
|
|
102
|
+
CreatePMResponse,
|
|
103
|
+
Cursor,
|
|
104
|
+
Event,
|
|
105
|
+
Events,
|
|
106
|
+
ForumPoll,
|
|
107
|
+
ForumTopicAndPosts,
|
|
108
|
+
KudosuHistory,
|
|
109
|
+
Match,
|
|
110
|
+
Matches,
|
|
111
|
+
MatchEvent,
|
|
112
|
+
MatchEventDetail,
|
|
113
|
+
MatchGame,
|
|
114
|
+
MatchResponse,
|
|
115
|
+
ModdingHistoryEventsBundle,
|
|
116
|
+
MultiplayerScores,
|
|
117
|
+
Rankings,
|
|
118
|
+
Room,
|
|
119
|
+
RoomLeaderboard,
|
|
120
|
+
RoomLeaderboardScore,
|
|
121
|
+
RoomLeaderboardUserScore,
|
|
122
|
+
RoomPlaylistItem,
|
|
123
|
+
RoomPlaylistItemMod,
|
|
124
|
+
Score,
|
|
125
|
+
ScoreMatchInfo,
|
|
126
|
+
ScoringType,
|
|
127
|
+
Search,
|
|
128
|
+
Spotlight,
|
|
129
|
+
Spotlights,
|
|
130
|
+
StatisticsVariant,
|
|
131
|
+
TeamType,
|
|
132
|
+
User,
|
|
133
|
+
UserCompact,
|
|
134
|
+
WikiPage,
|
|
135
|
+
_Event,
|
|
136
|
+
)
|
|
137
|
+
from ossapi.ossapi import (
|
|
138
|
+
APIException,
|
|
139
|
+
InvalidKeyException,
|
|
140
|
+
OssapiV1,
|
|
141
|
+
ReplayUnavailableException,
|
|
142
|
+
)
|
|
143
|
+
from ossapi.ossapiv2 import Domain, Grant, Ossapi, Scope
|
|
142
144
|
from ossapi.ossapiv2_async import OssapiAsync
|
|
145
|
+
from ossapi.replay import Replay
|
|
143
146
|
|
|
144
|
-
|
|
145
|
-
from oauthlib.oauth2.rfc6749.errors import InsufficientScopeError
|
|
146
|
-
|
|
147
|
-
__version__ = "5.2.1"
|
|
147
|
+
__version__ = "5.3.1"
|
|
148
148
|
|
|
149
149
|
__all__ = [
|
|
150
150
|
# OssapiV1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Any, Optional
|
|
2
2
|
|
|
3
|
-
from ossapi.utils import
|
|
3
|
+
from ossapi.utils import Datetime, EnumModel, Field, IntFlagModel, Model
|
|
4
4
|
|
|
5
5
|
# ================
|
|
6
6
|
# Documented Enums
|
|
@@ -2,77 +2,78 @@
|
|
|
2
2
|
# https://docs.python.org/3.7/whatsnew/3.7.html#pep-563-postponed-evaluation-
|
|
3
3
|
# of-annotations
|
|
4
4
|
from __future__ import annotations
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
from dataclasses import dataclass
|
|
7
|
+
from typing import Any, Generic, Optional, TypeVar, Union
|
|
7
8
|
|
|
8
|
-
from ossapi.mod import Mod
|
|
9
9
|
from ossapi.enums import (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Availability,
|
|
11
|
+
BeatmapOwner,
|
|
12
|
+
BeatmapPackUserCompletionData,
|
|
13
|
+
BeatmapsetApproval,
|
|
14
|
+
BeatmapsetEventType,
|
|
15
|
+
BeatmapTag,
|
|
16
|
+
ChangelogSearch,
|
|
17
|
+
ChannelType,
|
|
13
18
|
Country,
|
|
14
19
|
Cover,
|
|
15
|
-
UserGroup,
|
|
16
|
-
UserMonthlyPlaycount,
|
|
17
|
-
UserPage,
|
|
18
|
-
UserReplaysWatchedCount,
|
|
19
|
-
UserAchievement,
|
|
20
|
-
UserProfileCustomization,
|
|
21
|
-
RankHistory,
|
|
22
|
-
Kudosu,
|
|
23
|
-
PlayStyles,
|
|
24
|
-
ProfilePage,
|
|
25
|
-
GameMode,
|
|
26
|
-
RankStatus,
|
|
27
|
-
Failtimes,
|
|
28
20
|
Covers,
|
|
29
|
-
Hype,
|
|
30
|
-
Availability,
|
|
31
|
-
Nominations,
|
|
32
|
-
Statistics,
|
|
33
|
-
Grade,
|
|
34
|
-
Weight,
|
|
35
|
-
MessageType,
|
|
36
|
-
KudosuAction,
|
|
37
|
-
KudosuGiver,
|
|
38
|
-
KudosuPost,
|
|
39
|
-
EventType,
|
|
40
21
|
EventAchivement,
|
|
41
|
-
EventUser,
|
|
42
22
|
EventBeatmap,
|
|
43
|
-
BeatmapsetApproval,
|
|
44
23
|
EventBeatmapset,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
GithubUser,
|
|
51
|
-
ChangelogSearch,
|
|
52
|
-
ForumTopicType,
|
|
24
|
+
EventType,
|
|
25
|
+
EventUser,
|
|
26
|
+
Failtimes,
|
|
27
|
+
ForumPollText,
|
|
28
|
+
ForumPollTitle,
|
|
53
29
|
ForumPostBody,
|
|
54
30
|
ForumTopicSort,
|
|
55
|
-
|
|
56
|
-
|
|
31
|
+
ForumTopicType,
|
|
32
|
+
GameMode,
|
|
33
|
+
GithubUser,
|
|
34
|
+
Grade,
|
|
35
|
+
Hype,
|
|
36
|
+
Kudosu,
|
|
37
|
+
KudosuAction,
|
|
38
|
+
KudosuGiver,
|
|
39
|
+
KudosuPost,
|
|
40
|
+
KudosuVote,
|
|
41
|
+
MatchEventType,
|
|
42
|
+
MessageType,
|
|
57
43
|
NewsSearch,
|
|
58
44
|
Nomination,
|
|
45
|
+
Nominations,
|
|
46
|
+
PlayStyles,
|
|
47
|
+
ProfileBanner,
|
|
48
|
+
ProfilePage,
|
|
59
49
|
RankHighest,
|
|
60
|
-
|
|
50
|
+
RankHistory,
|
|
51
|
+
RankStatus,
|
|
52
|
+
ReviewsConfig,
|
|
61
53
|
RoomCategory,
|
|
62
|
-
|
|
54
|
+
RoomDifficultyRange,
|
|
55
|
+
RoomPlaylistItemStats,
|
|
56
|
+
RoomType,
|
|
63
57
|
ScoringType,
|
|
58
|
+
Statistics,
|
|
59
|
+
Team,
|
|
64
60
|
TeamType,
|
|
61
|
+
UserAccountHistory,
|
|
62
|
+
UserAchievement,
|
|
63
|
+
UserBadge,
|
|
64
|
+
UserGradeCounts,
|
|
65
|
+
UserGroup,
|
|
66
|
+
UserLevel,
|
|
67
|
+
UserMonthlyPlaycount,
|
|
68
|
+
UserPage,
|
|
69
|
+
UserProfileCustomization,
|
|
70
|
+
UserRelationType,
|
|
71
|
+
UserReplaysWatchedCount,
|
|
65
72
|
Variant,
|
|
66
|
-
|
|
67
|
-
ForumPollTitle,
|
|
68
|
-
BeatmapPackUserCompletionData,
|
|
69
|
-
RoomPlaylistItemStats,
|
|
70
|
-
RoomDifficultyRange,
|
|
71
|
-
BeatmapOwner,
|
|
72
|
-
BeatmapTag,
|
|
73
|
-
Team,
|
|
73
|
+
Weight,
|
|
74
74
|
)
|
|
75
|
-
from ossapi.
|
|
75
|
+
from ossapi.mod import Mod
|
|
76
|
+
from ossapi.utils import BaseModel, Datetime, Field, Model
|
|
76
77
|
|
|
77
78
|
T = TypeVar("T")
|
|
78
79
|
S = TypeVar("S")
|
|
@@ -234,6 +235,7 @@ class User(UserCompact):
|
|
|
234
235
|
scores_pinned_count: int
|
|
235
236
|
nominated_beatmapset_count: int
|
|
236
237
|
rank_highest: Optional[RankHighest]
|
|
238
|
+
current_season_stats: Optional[SeasonStatistics]
|
|
237
239
|
|
|
238
240
|
def expand(self) -> User:
|
|
239
241
|
# we're already expanded, no need to waste an api call
|
|
@@ -276,6 +278,9 @@ class Beatmap(BeatmapCompact):
|
|
|
276
278
|
ar: float
|
|
277
279
|
bpm: Optional[float]
|
|
278
280
|
current_user_tag_ids: list[int]
|
|
281
|
+
# this might be non-optional? should test with client credentials grant.
|
|
282
|
+
current_user_playcount: Optional[int]
|
|
283
|
+
top_tag_ids: list[int]
|
|
279
284
|
convert: bool
|
|
280
285
|
count_circles: int
|
|
281
286
|
count_sliders: int
|
|
@@ -691,6 +696,28 @@ class Spotlights(Model):
|
|
|
691
696
|
spotlights: list[Spotlight]
|
|
692
697
|
|
|
693
698
|
|
|
699
|
+
class SeasonDivision(Model):
|
|
700
|
+
colour_tier: str
|
|
701
|
+
id: int
|
|
702
|
+
image_url: str
|
|
703
|
+
name: str
|
|
704
|
+
threshold: float
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
class Season(Model):
|
|
708
|
+
start_date: Datetime
|
|
709
|
+
end_date: Optional[Datetime]
|
|
710
|
+
name: str
|
|
711
|
+
room_count: int
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
class SeasonStatistics(Model):
|
|
715
|
+
division: SeasonDivision
|
|
716
|
+
season: Season
|
|
717
|
+
rank: int
|
|
718
|
+
total_score: float
|
|
719
|
+
|
|
720
|
+
|
|
694
721
|
# return-value wrapper for https://osu.ppy.sh/docs/index.html#get-users.
|
|
695
722
|
class Users(Model):
|
|
696
723
|
users: list[UserCompact]
|
|
@@ -710,6 +737,7 @@ class BeatmapPacks(Model):
|
|
|
710
737
|
class Rankings(Model):
|
|
711
738
|
beatmapsets: Optional[list[Beatmapset]]
|
|
712
739
|
cursor: CursorT
|
|
740
|
+
cursor_string: Optional[str]
|
|
713
741
|
ranking: Union[list[UserStatistics], list[CountryStatistics]]
|
|
714
742
|
spotlight: Optional[Spotlight]
|
|
715
743
|
total: Optional[int]
|
|
@@ -962,6 +990,7 @@ class ChangelogListing(Model):
|
|
|
962
990
|
|
|
963
991
|
|
|
964
992
|
class MultiplayerScores(Model):
|
|
993
|
+
cursor: CursorT
|
|
965
994
|
cursor_string: CursorStringT
|
|
966
995
|
params: Any
|
|
967
996
|
scores: list[MultiplayerScore]
|
|
@@ -1004,7 +1033,7 @@ class MultiplayerScore(Model):
|
|
|
1004
1033
|
current_user_attributes: Any
|
|
1005
1034
|
has_replay: bool
|
|
1006
1035
|
legacy_perfect: bool
|
|
1007
|
-
legacy_score_id: int
|
|
1036
|
+
legacy_score_id: Optional[int]
|
|
1008
1037
|
legacy_total_score: int
|
|
1009
1038
|
|
|
1010
1039
|
def beatmap(self):
|
|
@@ -1610,7 +1639,12 @@ class Tag(Model):
|
|
|
1610
1639
|
id: int
|
|
1611
1640
|
name: str
|
|
1612
1641
|
description: str
|
|
1642
|
+
ruleset_id: Optional[int]
|
|
1613
1643
|
|
|
1614
1644
|
|
|
1615
1645
|
class Tags(Model):
|
|
1616
1646
|
tags: list[Tag]
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
class BeatmapsPassed(Model):
|
|
1650
|
+
beatmaps_passed: list[BeatmapCompact]
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
from json.decoder import JSONDecodeError
|
|
2
1
|
import logging
|
|
3
|
-
from datetime import datetime, timezone
|
|
4
|
-
from typing import List
|
|
5
2
|
import time
|
|
3
|
+
from datetime import datetime, timezone
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
6
5
|
|
|
7
6
|
import requests
|
|
8
7
|
from requests import RequestException
|