Skip to content

Commit df0af98

Browse files
chore: catch up on missing features (#5)
* feat(GetConsoleID): Add support for new variable 'IconURL' in request introduced in @RetroAchievements/RAWeb/pull/2264 * docs(api): add TrueRatio field to recent achievement endpoints ( RetroAchievements/RAWeb#2278) * feat(api): add TrueRatio field to recent achievement endpoints ( RetroAchievements/RAWeb#2278) * feat(api): add query options for getConsoleIds to filter active systems only, and/or game systems only
1 parent eb8836a commit df0af98

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

src/main/kotlin/org/retroachivements/api/RetroInterface.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,16 @@ interface RetroInterface {
228228

229229
/**
230230
* A call to this endpoint will retrieve the complete list of all system ID and name pairs on the site.
231+
*
232+
* [activeSystemsOnly] set to 1
233+
* [gameSystemsOnly] set to 1
231234
*/
232235
@Mock @MockResponse(body = "/v1/system/GetConsoleIDs.json")
233236
@POST("/API/API_GetConsoleIDs.php")
234-
suspend fun getConsoleIds(): NetworkResponse<GetConsoleID.Response, ErrorResponse>
237+
suspend fun getConsoleIds(
238+
@Query("a") activeSystemsOnly: Int = 0,
239+
@Query("g") gameSystemsOnly: Int = 0
240+
): NetworkResponse<GetConsoleID.Response, ErrorResponse>
235241

236242
/**
237243
* A call to this endpoint will retrieve the complete list of games for a specified console on the site,

src/main/kotlin/org/retroachivements/api/data/pojo/user/GetUserRecentAchievements.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class GetUserRecentAchievements {
4545
@SerializedName("ConsoleName")
4646
val consoleName: String,
4747

48+
@SerializedName("CumulScore")
49+
val cumulScore: Int,
50+
4851
@SerializedName("BadgeUrl")
4952
val badgeUrl: String,
5053

src/main/resources/mock/v1/user/GetAchievementsEarnedBetween.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"Description": "Solo defeat Golden Beetles at 2nd block (normal or above)",
88
"BadgeName": "228985",
99
"Points": 10,
10+
"TrueRatio": 25,
1011
"Type": "missable",
1112
"Author": "Altomar",
1213
"GameTitle": "Persona 3 Portable",
@@ -17,4 +18,4 @@
1718
"BadgeURL": "/Badge/228985.png",
1819
"GameURL": "/game/3164"
1920
}
20-
]
21+
]

src/main/resources/mock/v1/user/GetAchievementsEarnedOnDay.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"Description": "Completed Rank F in the Monster Arena",
88
"BadgeName": "277506",
99
"Points": 5,
10+
"TrueRatio": 25,
1011
"Type": null,
1112
"Author": "TheMysticalOne",
1213
"GameTitle": "Dragon Quest VIII: Journey of the Cursed King",
@@ -17,4 +18,4 @@
1718
"BadgeURL": "/Badge/277506.png",
1819
"GameURL": "/game/2721"
1920
}
20-
]
21+
]

src/main/resources/mock/v1/user/GetUserRecentAchievements.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"Description": "Clear stages 01 - 05 in Quest.",
88
"BadgeName": "108302",
99
"Points": 5,
10+
"TrueRatio": 25,
1011
"Type": null,
1112
"Author": "jos",
1213
"GameTitle": "Pokemon Pinball mini",
@@ -16,4 +17,4 @@
1617
"BadgeURL": "/Badge/108302.png",
1718
"GameURL": "/game/14715"
1819
}
19-
]
20+
]

0 commit comments

Comments
 (0)