-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphqls
381 lines (289 loc) · 9.29 KB
/
schema.graphqls
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
"A player's UUID."
scalar UUID
@spectaql(options: [{ key: "example", value: "6a085b2c-19fb-4986-b453-231aa942bbec" }])
@specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
"An RFC-3339 compliant date time."
scalar DateTime
@spectaql(options: [{ key: "example", value: "1996-12-19T16:39:57-08:00" }])
@specifiedBy(url: "https://scalars.graphql.org/andimarek/date-time.html")
"A rank."
enum Rank {
"The Champ rank."
CHAMP
"The Grand Champ rank."
GRAND_CHAMP
"The Grand Champ Royale rank."
GRAND_CHAMP_ROYALE
"The Creator rank."
CREATOR
"The Contestant rank."
CONTESTANT
"The Moderator rank."
MODERATOR
"The Noxcrew rank."
NOXCREW
}
"The categories for trophies."
enum TrophyCategory {
"Style trophies."
STYLE
"Skill trophies."
SKILL
}
"Data for types that track some form of progression."
type ProgressionData {
"The amount obtained."
obtained: Int!
"The amount that can be obtained."
obtainable: Int!
}
"Data on the amount of trophies a user has/can have."
type TrophyData {
"The amount of trophies obtained."
obtained: Int!
"The maximum amount of trophies that can be obtained."
obtainable: Int!
"The amount of bonus trophies."
bonus: Int!
}
"A Crown Level and associated trophy data."
type CrownLevel {
"The overall Crown Level."
level: Int!
"The next level that the crown will evolve, if any."
nextEvolutionLevel: Int
"The progress the player is making towards their next level, if any."
nextLevelProgress: ProgressionData
"The amount of trophies the player has."
trophies(
category: TrophyCategory = null
): TrophyData!
}
"A player who has logged in to MCC Island."
type Player {
"The player's Minecraft UUID in dashed format."
uuid: UUID!
"The player's username, if known."
username: String
@spectaql(options: [{ key: "example", value: "LadyAgnes" }])
"The ranks which the user is associated with, if any."
ranks: [Rank!]!
"The player's Crown Level and associated trophy data."
crownLevel: CrownLevel!
"""
The current status of the player.
This method is conditional on the player having the in-game "status" API setting enabled.
"""
status: Status
"""
Collections data for the player.
This method is conditional on the player having the in-game "collections" API setting enabled.
"""
collections: Collections
"""
Social data for the player.
This method is conditional on the player having the in-game "social" API setting enabled.
"""
social: Social
"""
Statistics data for the player.
This method is conditional on the player having the in-game "statistics" API setting enabled.
"""
statistics: Statistics
}
"Social data."
type Social {
"A list of the player's friends."
friends: [Player!]!
"The player's party."
party: Party!
}
"Collections data."
type Collections {
"The player's earned currency."
currency: Currency!
}
"A player's earned currency."
type Currency {
"The number of coins the player currently has."
coins: Int!
"The number of gems the player currently has."
gems: Int!
"The amount of Royal Reputation the player currently has."
royalReputation: Int!
"The amount of silver the player currently has."
silver: Int!
"The amount of material dust the player currently has."
materialDust: Int!
}
"A player's current status."
type Status {
"Whether the player is online or not."
online: Boolean!
"The player's current server, populated if they are online."
server: Server
"When the player first joined MCC Island, if known."
firstJoin: DateTime
"When the player most recently joined MCC Island, if known."
lastJoin: DateTime
}
"The category of a server."
enum ServerCategory {
"A lobby server."
LOBBY
"A game server."
GAME
"A limbo server."
LIMBO
"A queue server"
QUEUE
}
"A game."
enum Game {
"Hole in the Wall."
HOLE_IN_THE_WALL
"To Get To The Other Side (TGTTOS)."
TGTTOS
"Battle Box."
BATTLE_BOX
"Sky Battle."
SKY_BATTLE
"Parkour Warrior."
PARKOUR_WARRIOR
"Dynaball."
DYNABALL
"Rocket Spleef."
ROCKET_SPLEEF
}
"A server on the network."
type Server {
"The category of the server."
category: ServerCategory!
@spectaql(options: [{ key: "example", value: "GAME" }])
"The sub-type of the server that can hold additional information about the server."
subType: String!
@spectaql(options: [{ key: "example", value: "daily" }])
"The game associated with this server, if any."
associatedGame: Game
@spectaql(options: [{ key: "example", value: "PARKOUR_WARRIOR" }])
}
"A player's status within a party."
type Party {
"Whether the player is in an active party."
active: Boolean!
"The leader of the party, populated if the party exists."
leader: Player
"The members of the party, populated if the party exists."
members: [Player!]
}
"Statistic-related data."
type Statistics {
"Returns the raw value stored for this statistic."
value(
statisticKey: String!
@spectaql(options: [{ key: "example", value: "games_played" }])
): StatisticValueResult
@deprecated(reason: "This value is not backed by a rotation and will be removed. Use `rotationValue` instead.")
"""
Returns the value stored for the given statistic in a rotation.
The returned number will be `null` if the statistic does not track in the provided rotation, or if the statistic doesn't exist.
"""
rotationValue(
statisticKey: String!
@spectaql(options: [{ key: "example", value: "games_played" }]),
rotation: Rotation! = LIFETIME,
): Int
}
"A statistic."
type Statistic {
"The key of the statistic."
key: String!
@spectaql(options: [{ key: "example", value: "games_played" }])
"If this statistic generates leaderboards."
forLeaderboard: Boolean!
"""
The rotations for which this statistic is tracked.
These are the rotations that can be used to generate leaderboards or fetch rotation values.
Note that the `YEARLY` rotation never generates leaderboards, even if it is returned in this list.
"""
rotations: [Rotation!]!
"""
Returns the leaderboard for this statistic in a given rotation.
If this statistic does not generate leaderboards, or the statistic is not tracked for the provided rotation, this will return `null`.
"""
leaderboard(
rotation: Rotation! = LIFETIME,
amount: Int! = 10,
): [LeaderboardEntry!]
}
"An entry in a leaderboard."
type LeaderboardEntry {
"""
The player who has this entry.
This will be `null` if the player does not have the statistics enabled for the API.
However, for Crown Level or Trophy count leaderboards, the player will not be `null`.
"""
player: Player
"The rank for this entry."
rank: Int!
"The value for this entry."
value: Int!
}
"The result of fetching a value of a statistic."
type StatisticValueResult {
"The statistic."
statistic: Statistic!
"The value."
value: Int!
}
"""
A rotation period.
Each period resets at 10AM UTC.
"""
enum Rotation {
"A daily rotation that resets."
DAILY
"A weekly rotation that resets on Tuesdays."
WEEKLY
"A monthly rotation that resets on the first day of every month."
MONTHLY
"A yearly rotation that resets on the first day of every year."
YEARLY
"A lifetime rotation; a rotation period used to indicate something never rotates."
LIFETIME
}
"Available queries."
type Query {
"Given a UUID, returns a Player if they have logged in to MCC Island."
player(uuid: UUID!): Player
"""
Given a username, returns a Player object if they have logged into MCC Island with this username.
This method may not return a player that has this username if they have not logged in recently enough for us
to verify that the player still owns this username.
"""
playerByUsername(
username: String!
@spectaql(options: [{ key: "example", value: "LadyAgnes" }])
): Player
"Returns a list of all known statistics."
statistics: [Statistic!]!
"Returns a statistic by it's name."
statistic(
key: String!
@spectaql(options: [{ key: "example", value: "games_played" }])
): Statistic
"""
Returns when this rotation will next rotate.
If the rotation is due the exact time this method is called, this method will return the next time that it will rotate.
"""
nextRotation(rotation: Rotation!): DateTime!
"""
Returns when this rotation last rotated.
If the rotation is due the exact time this method is called, this method will return the current time.
"""
previousRotation(rotation: Rotation!): DateTime!
}
"Internal directive used to generate some documentation elements."
directive @spectaql(options: [SpectaQLOption]) on QUERY | MUTATION | SUBSCRIPTION | FIELD | FRAGMENT_DEFINITION | FRAGMENT_SPREAD | INLINE_FRAGMENT | VARIABLE_DEFINITION | SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
"Internal key/value pair for documentation options."
input SpectaQLOption { key: String!, value: String! }