@@ -8,8 +8,10 @@ import org.retroachivements.api.core.DateFormat
8
8
import org.retroachivements.api.core.RequiresCache
9
9
import org.retroachivements.api.data.pojo.ErrorResponse
10
10
import org.retroachivements.api.data.pojo.achievement.GetAchievementUnlocks
11
+ import org.retroachivements.api.data.pojo.comments.GetComments
11
12
import org.retroachivements.api.data.pojo.event.GetAchievementOfTheWeek
12
13
import org.retroachivements.api.data.pojo.feed.GetClaims
14
+ import org.retroachivements.api.data.pojo.feed.GetRecentGameAwards
13
15
import org.retroachivements.api.data.pojo.feed.GetTopTenUsers
14
16
import org.retroachivements.api.data.pojo.game.*
15
17
import org.retroachivements.api.data.pojo.system.GetConsoleID
@@ -34,14 +36,14 @@ interface RetroInterface {
34
36
suspend fun getTopTenUsers (): NetworkResponse <GetTopTenUsers .Response , ErrorResponse >
35
37
36
38
/* *
37
- * A call to this endpoint will retrieve minimal user profile information, such as their ID, motto, most recent game ID, avatar, and points.
39
+ * A call to this function will retrieve minimal user profile information, such as their ID, motto, most recent game ID, avatar, and points.
38
40
*/
39
41
@Mock @MockResponse(body = " /v1/user/GetUserProfile.json" )
40
42
@POST(" /API/API_GetUserProfile.php" )
41
43
suspend fun getUserProfile (@Query(" u" ) username : String ): NetworkResponse <GetUserProfile .Response , ErrorResponse >
42
44
43
45
/* *
44
- * A call to this endpoint will retrieve a list of a target user's recently unlocked achievements, via their username. By default, it fetches achievements unlocked in the last hour.
46
+ * A call to this function will retrieve a list of a target user's recently unlocked achievements, via their username. By default, it fetches achievements unlocked in the last hour.
45
47
*/
46
48
@Mock @MockResponse(body = " /v1/user/GetUserRecentAchievements.json" )
47
49
@POST(" /API/API_GetUserRecentAchievements.php" )
@@ -51,7 +53,7 @@ interface RetroInterface {
51
53
): NetworkResponse <GetUserRecentAchievements .Response , ErrorResponse >
52
54
53
55
/* *
54
- * A call to this endpoint will retrieve a list of achievements unlocked by a given user between two given dates.
56
+ * A call to this function will retrieve a list of achievements unlocked by a given user between two given dates.
55
57
*/
56
58
@Mock @MockResponse(body = " /v1/user/GetAchievementsEarnedBetween.json" )
57
59
@POST(" /API/API_GetAchievementsEarnedBetween.php" )
@@ -62,7 +64,7 @@ interface RetroInterface {
62
64
): NetworkResponse <GetUserRecentAchievements .Response , ErrorResponse >
63
65
64
66
/* *
65
- * A call to this endpoint will retrieve a list of achievements unlocked by a given user on a specified date.
67
+ * A call to this function will retrieve a list of achievements unlocked by a given user on a specified date.
66
68
*/
67
69
@Mock @MockResponse(body = " /v1/user/GetAchievementsEarnedOnDay.json" )
68
70
@POST(" /API/API_GetAchievementsEarnedOnDay.php" )
@@ -72,7 +74,7 @@ interface RetroInterface {
72
74
): NetworkResponse <GetUserRecentAchievements .Response , ErrorResponse >
73
75
74
76
/* *
75
- * A call to this endpoint will retrieve extended metadata about a game, in addition to a user's progress about that game. This is targeted via a game's unique ID and a given username.
77
+ * A call to this function will retrieve extended metadata about a game, in addition to a user's progress about that game. This is targeted via a game's unique ID and a given username.
76
78
*/
77
79
@Mock @MockResponse(body = " /v1/game/GetGameInfoAndUserProgress.json" )
78
80
@POST(" /API/API_GetGameInfoAndUserProgress.php" )
@@ -82,7 +84,7 @@ interface RetroInterface {
82
84
): NetworkResponse <GetGameInfoAndUserProgress .Response , ErrorResponse >
83
85
84
86
/* *
85
- * A call to this endpoint will retrieve a giver user's completion progress, targeted by their username.
87
+ * A call to this function will retrieve a giver user's completion progress, targeted by their username.
86
88
*/
87
89
@Mock @MockResponse(body = " /v1/user/GetUserCompletionProgress.json" )
88
90
@POST(" /API/API_GetUserCompletionProgress.php" )
@@ -93,7 +95,7 @@ interface RetroInterface {
93
95
): NetworkResponse <GetUserCompletionProgress .Response , ErrorResponse >
94
96
95
97
/* *
96
- * A call to this endpoint will retrieve metadata about the target user's site awards, via their username.
98
+ * A call to this function will retrieve metadata about the target user's site awards, via their username.
97
99
*/
98
100
@Mock @MockResponse(body = " /v1/user/GetUserAwards.json" )
99
101
@POST(" /API/API_GetUserAwards.php" )
@@ -160,7 +162,7 @@ interface RetroInterface {
160
162
): NetworkResponse <GetUserSummary .Response , ErrorResponse >
161
163
162
164
/* *
163
- * A call to this endpoint will retrieve completion metadata about the games a given user has played.
165
+ * A call to this function will retrieve completion metadata about the games a given user has played.
164
166
* It returns two entries per each game: one for the softcore completion and one for the hardcore completion.
165
167
* These are designated by the hardcoreMode property on each completion object.
166
168
*/
@@ -172,7 +174,19 @@ interface RetroInterface {
172
174
): NetworkResponse <GetUserCompletedGames .Response , ErrorResponse >
173
175
174
176
/* *
175
- * A call to this endpoint will retrieve a list of users that I follow.
177
+ * A call to this function will retrieve a given user's "Want to Play Games" list, targeted by their username.
178
+ * Results will only be returned if the target user is yourself, or if both you and the target user follow each other.
179
+ */
180
+ @Mock @MockResponse(body = " /v1/user/GetUserWantToPlayList.json" )
181
+ @POST(" /API/API_GetUserWantToPlayList.php" )
182
+ suspend fun getUserWantToPlayList (
183
+ @Query(" u" ) username : String ,
184
+ @Query(" c" ) maxRecords : Int = 100,
185
+ @Query(" o" ) skipRecords : Int = 0
186
+ ): NetworkResponse <GetUserWantToPlayList .Response , ErrorResponse >
187
+
188
+ /* *
189
+ * A call to this function will retrieve a list of users that I follow.
176
190
*/
177
191
@Mock @MockResponse(body = " /v1/user/GetUsersIFollow.json" )
178
192
@POST(" /API/API_GetUsersIFollow.php" )
@@ -182,17 +196,17 @@ interface RetroInterface {
182
196
): NetworkResponse <GetUsersIFollow .Response , ErrorResponse >
183
197
184
198
/* *
185
- * A call to this endpoint will retrieve a list of users that are following me.
199
+ * A call to this function will retrieve a list of users that are following me.
186
200
*/
187
201
@Mock @MockResponse(body = " /v1/user/GetUsersFollowingMe.json" )
188
- @POST(" /API/GetUsersFollowingMe .php" )
202
+ @POST(" /API/API_GetUsersFollowingMe .php" )
189
203
suspend fun getUsersFollowingMe (
190
204
@Query(" o" ) offset : Int = 0,
191
205
@Query(" c" ) count : Int = 100
192
206
): NetworkResponse <GetUsersFollowingMe .Response , ErrorResponse >
193
207
194
208
/* *
195
- * A call to this endpoint will retrieve basic metadata about a game, targeted via its unique ID.
209
+ * A call to this function will retrieve basic metadata about a game, targeted via its unique ID.
196
210
*/
197
211
@Mock @MockResponse(body = " /v1/game/GetGame.json" )
198
212
@POST(" /API/API_GetGame.php" )
@@ -201,7 +215,7 @@ interface RetroInterface {
201
215
): NetworkResponse <GetGame .Response , ErrorResponse >
202
216
203
217
/* *
204
- * A call to this endpoint will retrieve extended metadata about a game, targeted via its unique ID.
218
+ * A call to this function will retrieve extended metadata about a game, targeted via its unique ID.
205
219
*/
206
220
@Mock @MockResponse(body = " /v1/game/GetGameExtended.json" )
207
221
@POST(" /API/API_GetGameExtended.php" )
@@ -211,7 +225,16 @@ interface RetroInterface {
211
225
): NetworkResponse <GetGameExtended .Response , ErrorResponse >
212
226
213
227
/* *
214
- * A call to this endpoint will retrieve the list of achievement IDs for a game, targeted by game ID.
228
+ * A call to this function will retrieve the hashes linked to a game, targeted via its unique ID.
229
+ */
230
+ @Mock @MockResponse(body = " /v1/game/GetGameHashes.json" )
231
+ @POST(" /API/API_GetGameHashes.php" )
232
+ suspend fun getGameHashes (
233
+ @Query(" i" ) gameId : Long
234
+ ): NetworkResponse <GetGameHashes .Response , ErrorResponse >
235
+
236
+ /* *
237
+ * A call to this function will retrieve the list of achievement IDs for a game, targeted by game ID.
215
238
* This can be useful if you'd like to quickly check how many achievements a particular game has.
216
239
* Using this, you can also detect if a game has received a revision.
217
240
* For example, if a game had 100 achievements last month and has 102 today,
@@ -224,8 +247,8 @@ interface RetroInterface {
224
247
): NetworkResponse <GetAchievementCount .Response , ErrorResponse >
225
248
226
249
/* *
227
- * A call to this endpoint will retrieve a dictionary of the number of players who have earned
228
- * a specific number of achievements for a given game ID. This endpoint can be used to determine
250
+ * A call to this function will retrieve a dictionary of the number of players who have earned
251
+ * a specific number of achievements for a given game ID. This function can be used to determine
229
252
* the total mastery count for a game, as well as how rare that overall mastery is.
230
253
*/
231
254
@Mock @MockResponse(body = " /v1/game/GetAchievementDistribution.json" )
@@ -247,7 +270,7 @@ interface RetroInterface {
247
270
): NetworkResponse <GetGameRankAndScore .Response , ErrorResponse >
248
271
249
272
/* *
250
- * A call to this endpoint will retrieve a given game's list of leaderboards, targeted by the game's ID.
273
+ * A call to this function will retrieve a given game's list of leaderboards, targeted by the game's ID.
251
274
*/
252
275
@Mock @MockResponse(body = " /v1/game/GetGameLeaderboards.json" )
253
276
@POST(" /API/API_GetGameLeaderboards.php" )
@@ -258,7 +281,7 @@ interface RetroInterface {
258
281
): NetworkResponse <GetGameLeaderboards .Response , ErrorResponse >
259
282
260
283
/* *
261
- * A call to this endpoint will retrieve a given leaderboard's entries, targeted by its ID.
284
+ * A call to this function will retrieve a given leaderboard's entries, targeted by its ID.
262
285
*/
263
286
@Mock @MockResponse(body = " /v1/game/GetLeaderboardEntries.json" )
264
287
@POST(" /API/API_GetLeaderboardEntries.php" )
@@ -269,7 +292,7 @@ interface RetroInterface {
269
292
): NetworkResponse <GetLeaderboardEntries .Response , ErrorResponse >
270
293
271
294
/* *
272
- * A call to this endpoint will retrieve the complete list of all system ID and name pairs on the site.
295
+ * A call to this function will retrieve the complete list of all system ID and name pairs on the site.
273
296
*
274
297
* [activeSystemsOnly] set to 1
275
298
* [gameSystemsOnly] set to 1
@@ -282,9 +305,9 @@ interface RetroInterface {
282
305
): NetworkResponse <GetConsoleID .Response , ErrorResponse >
283
306
284
307
/* *
285
- * A call to this endpoint will retrieve the complete list of games for a specified console on the site,
308
+ * A call to this function will retrieve the complete list of games for a specified console on the site,
286
309
* targeted by the console ID. If you do not know the console ID you're looking for,
287
- * try using the all systems endpoint .
310
+ * try using the all systems function .
288
311
*/
289
312
@Mock @MockResponse(body = " /v1/system/GetGameList.json" )
290
313
@POST(" /API/API_GetGameList.php" )
@@ -324,7 +347,19 @@ interface RetroInterface {
324
347
suspend fun getActiveClaims (): NetworkResponse <GetClaims .Response , ErrorResponse >
325
348
326
349
/* *
327
- * A call to this endpoint will retrieve comprehensive metadata about the current Achievement of the Week.
350
+ * A call to this function will retrieve all recently granted game awards across the site's userbase.
351
+ */
352
+ @Mock @MockResponse(body = " /v1/feed/GetRecentGameAwards.json" )
353
+ @POST(" /API/API_GetRecentGameAwards.php" )
354
+ suspend fun getRecentGameAwards (
355
+ @Query(" d" ) @DateFormat(" yyyy-MM-dd" ) startingDate : Date = Date (),
356
+ @Query(" c" ) count : Int = 25,
357
+ @Query(" o" ) offset : Int = 0,
358
+ @Query(" k" ) kinds : String = listOf("beaten-softcore", "beaten-hardcore", "completed", "mastered").joinToString()
359
+ ): NetworkResponse <GetRecentGameAwards .Response , ErrorResponse >
360
+
361
+ /* *
362
+ * A call to this function will retrieve comprehensive metadata about the current Achievement of the Week.
328
363
*/
329
364
@Mock @MockResponse(body = " /v1/event/GetAchievementOfTheWeek.json" )
330
365
@POST(" /API/API_GetAchievementOfTheWeek.php" )
@@ -393,4 +428,40 @@ interface RetroInterface {
393
428
suspend fun getAchievementTicketStats (
394
429
@Query(" a" ) achievementId : Long
395
430
): NetworkResponse <GetAchievementTicketStats .Response , ErrorResponse >
431
+
432
+ /* *
433
+ * A call to this function returns comments of a specified user.
434
+ */
435
+ @Mock @MockResponse(body = " /v1/comments/GetCommentsOnUserWall.json" )
436
+ @POST(" /API/API_GetComments.php" )
437
+ suspend fun getCommentsOnUserWall (
438
+ @Query(" i" ) username : String ,
439
+ @Query(" c" ) count : Int = 10,
440
+ @Query(" o" ) offset : Int = 0,
441
+ @Query(" t" ) type : Int = 3
442
+ ): NetworkResponse <GetComments .Response , ErrorResponse >
443
+
444
+ /* *
445
+ * A call to this function returns comments of a specified game.
446
+ */
447
+ @Mock @MockResponse(body = " /v1/comments/GetCommentsOnGameWall.json" )
448
+ @POST(" /API/API_GetComments.php" )
449
+ suspend fun getCommentsOnGameWall (
450
+ @Query(" i" ) gameId : Long ,
451
+ @Query(" c" ) count : Int = 10,
452
+ @Query(" o" ) offset : Int = 0,
453
+ @Query(" t" ) type : Int = 1
454
+ ): NetworkResponse <GetComments .Response , ErrorResponse >
455
+
456
+ /* *
457
+ * A call to this function returns comments of a specified achievement.
458
+ */
459
+ @Mock @MockResponse(body = " /v1/comments/GetCommentsOnAchievementWall.json" )
460
+ @POST(" /API/API_GetComments.php" )
461
+ suspend fun getCommentsOnAchievementWall (
462
+ @Query(" i" ) achievementId : Long ,
463
+ @Query(" c" ) count : Int = 10,
464
+ @Query(" o" ) offset : Int = 0,
465
+ @Query(" t" ) type : Int = 2
466
+ ): NetworkResponse <GetComments .Response , ErrorResponse >
396
467
}
0 commit comments