@@ -31,7 +31,25 @@ The user's Want to Play Games list page looks like:
3131
3232::: code-group
3333
34- ``` Kotlin
34+ ``` ts [NodeJS]
35+ import {
36+ buildAuthorization ,
37+ getUserWantToPlayList ,
38+ } from " @retroachievements/api" ;
39+
40+ // First, build your authorization object.
41+ const username = " <your username on RA>" ;
42+ const webApiKey = " <your web API key>" ;
43+
44+ const authorization = buildAuthorization ({ username , webApiKey });
45+
46+ // Then, make the API call.
47+ const game = await getUserWantToPlayList (authorization , {
48+ username: " MaxMilyin" ,
49+ });
50+ ```
51+
52+ ``` kotlin [Kotlin]
3553val credentials = RetroCredentials (" <username>" , " <web api key>" )
3654val api: RetroInterface = RetroClient (credentials).api
3755
@@ -77,11 +95,31 @@ if (response is NetworkResponse.Success) {
7795}
7896```
7997
98+ ``` json [NodeJS]
99+ {
100+ "count" : 100 ,
101+ "total" : 1287 ,
102+ "results" : [
103+ {
104+ "id" : 20246 ,
105+ "title" : " ~Hack~ Knuckles the Echidna in Sonic the Hedgehog" ,
106+ "imageIcon" : " /Images/074560.png" ,
107+ "consoleID" : 1 ,
108+ "consoleName" : " Genesis/Mega Drive" ,
109+ "pointsTotal" : 1500 ,
110+ "achievementsPublished" : 50
111+ }
112+ // ...
113+ ]
114+ }
115+ ```
116+
80117:::
81118
82119## Source
83120
84121| Repo | URL |
85122| :--------- | :------------------------------------------------------------------------------------------------------------------- |
86123| RAWeb | https://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetUserWantToPlayList.php |
124+ | api-js | https://github.com/RetroAchievements/api-js/blob/main/src/user/getUserWantToPlayList.ts |
87125| api-kotlin | https://github.com/RetroAchievements/api-kotlin/blob/main/src/main/kotlin/org/retroachivements/api/RetroInterface.kt |
0 commit comments