This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.d.ts
237 lines (186 loc) · 4.61 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
import { AxiosPromise, AxiosInstance } from "axios";
declare module "overwatchleague" {
export enum Match {
PENDING = "PENDING",
CONCLUDED = "CONCLUDED"
}
export type Locale =
| "de_DE"
| "en_US"
| "en_GB"
| "es_ES"
| "es_MX"
| "fr_FR"
| "it_IT"
| "pt_BR"
| "pl_PL"
| "ru_RU"
| "ko_KR"
| "ja_JP"
| "zh_TW"
| "zh_CH";
export type TeamIdentifier = number | string;
export default class owl {
constructor(locale?: Locale, useChina?: boolean);
match: Match;
api: AxiosInstance;
/*
* SECTION: Match Methods
*/
/**
* Gets the Match that is currently live.
*/
getLiveMatch(): AxiosPromise;
/**
* Gets the Match with the given ID
*/
getMatch(id: string): AxiosPromise;
/**
* Gets all Matches that have ever been played.
*/
getMatches(): AxiosPromise;
/**
* Gets the Matches that are played this week
*/
getWeeksMatches(): AxiosPromise;
/**
* Gets the Matches of this week, that are already concluded.
*/
getConcludedWeek(): AxiosPromise;
/**
* Gets the Matches of this week, that have not been played yet.
*/
getUpcomingWeek(): AxiosPromise;
/*
* SECTION: General Methods
*/
/**
* Gets some informations about legal/privacy terms.
*/
getInfo(): AxiosPromise;
/**
* Gets the Schedule
*/
getSchedule(year?: number): AxiosPromise;
/**
* Gets informations about all maps.
*/
getMaps(): AxiosPromise;
/**
* Gets the current "News"
*/
getNews(): AxiosPromise;
/**
* Gets a NewsPost with a specific ID
*/
getNewsPost(id: string): AxiosPromise;
/**
* Gets the current standings
*/
getStandings(year?: number, stage?: string): AxiosPromise;
/**
* Gets the streams that are currently live.
*/
getStreams(): AxiosPromise;
/**
* Gets informations about where to get VOD's of past matches.
*/
getVideos(): AxiosPromise;
/*
* SECTION: Player Methods
*/
/**
* Gets the players of a specific team
*/
getPlayers(team: string): AxiosPromise;
/**
* Gets the stats of a specifc player.
*/
getPlayerStats(player: string): AxiosPromise;
/*
* SECTION: Team Methods
*/
// Conversion
/**
* Gets a specific team
*/
getTeam(id: TeamIdentifier): AxiosPromise;
/**
* Gets the ID from a team name
*/
findTeamID(name: string): Promise<{ data: number }>;
/**
* Gets the name of the team from a team id.
*/
findTeamName(id: number): Promise<{ data: string }>;
// Game
/**
* Gets the game differential of a team
*/
getGameDiff(id: TeamIdentifier): Promise<{ data: number }>;
/**
* Gets the loss' game count of a team
*/
getGameLoss(id: TeamIdentifier): Promise<{ data: number }>;
/**
* Gets the tie' game count of a team
*/
getGameTie(id: TeamIdentifier): Promise<{ data: number }>;
/**
* Gets the win' game count of a team
*/
getGameWin(id: TeamIdentifier): Promise<{ data: number }>;
// Match
/**
* Gets the Match draw' count of a specific team.
*/
getMatchDraw(id: TeamIdentifier): Promise<{ data: number }>;
/**
* Gets the Match loss' count of a specific team.
*/
getMatchLoss(id: TeamIdentifier): Promise<{ data: number }>;
/**
* Gets the Match win' count of a specific team.
*/
getMatchWins(id: TeamIdentifier): Promise<{ data: number }>;
// Visuals
/**
* Gets the primary color of a specific team.
*/
getPrimaryColor(id: TeamIdentifier): Promise<{ data: string }>;
/**
* Gets the secondary color of a specific team.
*/
getSecondaryColor(id: TeamIdentifier): Promise<{ data: string }>;
/**
* Gets the Icon of a specific team
*/
getTeamIcon(id: TeamIdentifier): AxiosPromise;
/**
* Gets the Logo of a specific team.
*/
getTeamLogo(id: TeamIdentifier): AxiosPromise;
// General
/**
* Gets the current Rankings
*/
getRankings(): AxiosPromise;
/**
* Gets a list of all teams.
*/
getTeams(): AxiosPromise;
/**
* Gets the win-percentage for a team.
*/
getWinPCT(id: TeamIdentifier): AxiosPromise;
// Next / Previous Games
/**
* Gets the last played match for a team.
*/
lastMatchForTeam(id: TeamIdentifier): AxiosPromise;
/**
* Gets the next match for a team
*/
nextMatchForTeam(id: TeamIdentifier): AxiosPromise;
}
}