copsapi-wrapper 1.0.0__py3-none-any.whl
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.
- copsapi/__init__.py +203 -0
- copsapi/__main__.py +3 -0
- copsapi/_async_client.py +630 -0
- copsapi/_core.py +216 -0
- copsapi/_io_async.py +50 -0
- copsapi/_io_sync.py +26 -0
- copsapi/_sync_client.py +630 -0
- copsapi/cache.py +73 -0
- copsapi/catalog.py +158 -0
- copsapi/cli.py +242 -0
- copsapi/errors.py +129 -0
- copsapi/helpers.py +175 -0
- copsapi/models.py +365 -0
- copsapi/py.typed +0 -0
- copsapi/quota.py +97 -0
- copsapi/watcher.py +346 -0
- copsapi_wrapper-1.0.0.dist-info/METADATA +581 -0
- copsapi_wrapper-1.0.0.dist-info/RECORD +21 -0
- copsapi_wrapper-1.0.0.dist-info/WHEEL +4 -0
- copsapi_wrapper-1.0.0.dist-info/entry_points.txt +2 -0
- copsapi_wrapper-1.0.0.dist-info/licenses/LICENSE +21 -0
copsapi/__init__.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
from ._async_client import (
|
|
2
|
+
AsyncAutohostApi,
|
|
3
|
+
AsyncCopsClient,
|
|
4
|
+
AsyncLeaderboardsApi,
|
|
5
|
+
AsyncMatchesApi,
|
|
6
|
+
AsyncProfilesApi,
|
|
7
|
+
AsyncServersApi,
|
|
8
|
+
AsyncStatsApi,
|
|
9
|
+
)
|
|
10
|
+
from ._core import DEFAULT_BASE_URL, TOKEN_PATTERN, VERSION
|
|
11
|
+
from ._sync_client import (
|
|
12
|
+
AutohostApi,
|
|
13
|
+
CopsClient,
|
|
14
|
+
LeaderboardsApi,
|
|
15
|
+
MatchesApi,
|
|
16
|
+
ProfilesApi,
|
|
17
|
+
ServersApi,
|
|
18
|
+
StatsApi,
|
|
19
|
+
)
|
|
20
|
+
from .cache import DEFAULT_TTLS, CacheStore, MemoryCache
|
|
21
|
+
from .catalog import (
|
|
22
|
+
ACCOUNT_AGES,
|
|
23
|
+
AUTOHOST_COMMANDS,
|
|
24
|
+
BAN_REASONS,
|
|
25
|
+
CLAN_RANKS,
|
|
26
|
+
GAME_MODES,
|
|
27
|
+
GAME_TYPES,
|
|
28
|
+
INPUT_DEVICES,
|
|
29
|
+
LEADERBOARD_TYPES,
|
|
30
|
+
MAPS,
|
|
31
|
+
MATCH_STATES,
|
|
32
|
+
PARTY_INVITE_PERMISSIONS,
|
|
33
|
+
USER_TYPES,
|
|
34
|
+
GameMode,
|
|
35
|
+
game_mode,
|
|
36
|
+
is_hostable,
|
|
37
|
+
map_id,
|
|
38
|
+
map_name,
|
|
39
|
+
maps_for,
|
|
40
|
+
modes_for,
|
|
41
|
+
)
|
|
42
|
+
from .errors import (
|
|
43
|
+
AuthenticationError,
|
|
44
|
+
BadRequestError,
|
|
45
|
+
ConnectionFailedError,
|
|
46
|
+
CopsApiError,
|
|
47
|
+
GameGoneError,
|
|
48
|
+
GameRejectedError,
|
|
49
|
+
InvalidResponseError,
|
|
50
|
+
NotFoundError,
|
|
51
|
+
PermissionDeniedError,
|
|
52
|
+
RateLimitError,
|
|
53
|
+
ServiceUnavailableError,
|
|
54
|
+
is_cops_error,
|
|
55
|
+
)
|
|
56
|
+
from .helpers import (
|
|
57
|
+
ResultSummary,
|
|
58
|
+
TeamSummary,
|
|
59
|
+
Totals,
|
|
60
|
+
account_age_label,
|
|
61
|
+
ban_reason,
|
|
62
|
+
career_totals,
|
|
63
|
+
describe_ban,
|
|
64
|
+
input_devices,
|
|
65
|
+
is_new_account,
|
|
66
|
+
is_staff,
|
|
67
|
+
kd,
|
|
68
|
+
random_password,
|
|
69
|
+
region_of,
|
|
70
|
+
season_totals,
|
|
71
|
+
summarize_result,
|
|
72
|
+
)
|
|
73
|
+
from .models import (
|
|
74
|
+
AutohostGame,
|
|
75
|
+
AutohostResult,
|
|
76
|
+
AutohostRoom,
|
|
77
|
+
Ban,
|
|
78
|
+
ClanBasicInfo,
|
|
79
|
+
ClanMembership,
|
|
80
|
+
GameServer,
|
|
81
|
+
HostedRoom,
|
|
82
|
+
LeaderboardEntry,
|
|
83
|
+
LeaderboardPage,
|
|
84
|
+
LeaderboardPosition,
|
|
85
|
+
MatchHistoryEntry,
|
|
86
|
+
MatchInfo,
|
|
87
|
+
MatchPlayer,
|
|
88
|
+
MatchStats,
|
|
89
|
+
PartyInfo,
|
|
90
|
+
PlayerLevel,
|
|
91
|
+
PlayerMatchStats,
|
|
92
|
+
Profile,
|
|
93
|
+
ProfileBasicInfo,
|
|
94
|
+
ProfileStats,
|
|
95
|
+
QuotaSnapshot,
|
|
96
|
+
RankedStats,
|
|
97
|
+
SeasonStats,
|
|
98
|
+
TokenCheck,
|
|
99
|
+
WeaponStats,
|
|
100
|
+
)
|
|
101
|
+
from .watcher import EVENTS, AsyncAutohostWatcher, AutohostWatcher, JoinInfo
|
|
102
|
+
|
|
103
|
+
__version__ = VERSION
|
|
104
|
+
|
|
105
|
+
__all__ = [
|
|
106
|
+
"ACCOUNT_AGES",
|
|
107
|
+
"AUTOHOST_COMMANDS",
|
|
108
|
+
"AsyncAutohostApi",
|
|
109
|
+
"AsyncAutohostWatcher",
|
|
110
|
+
"AsyncCopsClient",
|
|
111
|
+
"AsyncLeaderboardsApi",
|
|
112
|
+
"AsyncMatchesApi",
|
|
113
|
+
"AsyncProfilesApi",
|
|
114
|
+
"AsyncServersApi",
|
|
115
|
+
"AsyncStatsApi",
|
|
116
|
+
"AuthenticationError",
|
|
117
|
+
"AutohostApi",
|
|
118
|
+
"AutohostGame",
|
|
119
|
+
"AutohostResult",
|
|
120
|
+
"AutohostRoom",
|
|
121
|
+
"AutohostWatcher",
|
|
122
|
+
"BAN_REASONS",
|
|
123
|
+
"BadRequestError",
|
|
124
|
+
"Ban",
|
|
125
|
+
"CLAN_RANKS",
|
|
126
|
+
"CacheStore",
|
|
127
|
+
"ClanBasicInfo",
|
|
128
|
+
"ClanMembership",
|
|
129
|
+
"ConnectionFailedError",
|
|
130
|
+
"CopsApiError",
|
|
131
|
+
"CopsClient",
|
|
132
|
+
"DEFAULT_BASE_URL",
|
|
133
|
+
"DEFAULT_TTLS",
|
|
134
|
+
"EVENTS",
|
|
135
|
+
"GAME_MODES",
|
|
136
|
+
"GAME_TYPES",
|
|
137
|
+
"GameGoneError",
|
|
138
|
+
"GameMode",
|
|
139
|
+
"GameRejectedError",
|
|
140
|
+
"GameServer",
|
|
141
|
+
"HostedRoom",
|
|
142
|
+
"INPUT_DEVICES",
|
|
143
|
+
"InvalidResponseError",
|
|
144
|
+
"JoinInfo",
|
|
145
|
+
"LEADERBOARD_TYPES",
|
|
146
|
+
"LeaderboardEntry",
|
|
147
|
+
"LeaderboardPage",
|
|
148
|
+
"LeaderboardPosition",
|
|
149
|
+
"LeaderboardsApi",
|
|
150
|
+
"MAPS",
|
|
151
|
+
"MATCH_STATES",
|
|
152
|
+
"MatchHistoryEntry",
|
|
153
|
+
"MatchInfo",
|
|
154
|
+
"MatchPlayer",
|
|
155
|
+
"MatchStats",
|
|
156
|
+
"MatchesApi",
|
|
157
|
+
"MemoryCache",
|
|
158
|
+
"NotFoundError",
|
|
159
|
+
"PARTY_INVITE_PERMISSIONS",
|
|
160
|
+
"PartyInfo",
|
|
161
|
+
"PermissionDeniedError",
|
|
162
|
+
"PlayerLevel",
|
|
163
|
+
"PlayerMatchStats",
|
|
164
|
+
"Profile",
|
|
165
|
+
"ProfileBasicInfo",
|
|
166
|
+
"ProfileStats",
|
|
167
|
+
"ProfilesApi",
|
|
168
|
+
"QuotaSnapshot",
|
|
169
|
+
"RankedStats",
|
|
170
|
+
"RateLimitError",
|
|
171
|
+
"ResultSummary",
|
|
172
|
+
"SeasonStats",
|
|
173
|
+
"ServersApi",
|
|
174
|
+
"ServiceUnavailableError",
|
|
175
|
+
"StatsApi",
|
|
176
|
+
"TOKEN_PATTERN",
|
|
177
|
+
"TeamSummary",
|
|
178
|
+
"TokenCheck",
|
|
179
|
+
"Totals",
|
|
180
|
+
"USER_TYPES",
|
|
181
|
+
"VERSION",
|
|
182
|
+
"WeaponStats",
|
|
183
|
+
"__version__",
|
|
184
|
+
"account_age_label",
|
|
185
|
+
"ban_reason",
|
|
186
|
+
"career_totals",
|
|
187
|
+
"describe_ban",
|
|
188
|
+
"game_mode",
|
|
189
|
+
"input_devices",
|
|
190
|
+
"is_cops_error",
|
|
191
|
+
"is_hostable",
|
|
192
|
+
"is_new_account",
|
|
193
|
+
"is_staff",
|
|
194
|
+
"kd",
|
|
195
|
+
"map_id",
|
|
196
|
+
"map_name",
|
|
197
|
+
"maps_for",
|
|
198
|
+
"modes_for",
|
|
199
|
+
"random_password",
|
|
200
|
+
"region_of",
|
|
201
|
+
"season_totals",
|
|
202
|
+
"summarize_result",
|
|
203
|
+
]
|
copsapi/__main__.py
ADDED