@@ -31,7 +31,25 @@ The user's Want to Play Games list page looks like:
31
31
32
32
::: code-group
33
33
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]
35
53
val credentials = RetroCredentials (" <username>" , " <web api key>" )
36
54
val api: RetroInterface = RetroClient (credentials).api
37
55
@@ -77,11 +95,31 @@ if (response is NetworkResponse.Success) {
77
95
}
78
96
```
79
97
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
+
80
117
:::
81
118
82
119
## Source
83
120
84
121
| Repo | URL |
85
122
| :--------- | :------------------------------------------------------------------------------------------------------------------- |
86
123
| 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 |
87
125
| api-kotlin | https://github.com/RetroAchievements/api-kotlin/blob/main/src/main/kotlin/org/retroachivements/api/RetroInterface.kt |
0 commit comments