@@ -30,6 +30,28 @@ The user's Followers Users List page looks like:
3030
3131::: code-group
3232
33+ ``` ts [NodeJS]
34+ import { buildAuthorization , getUsersIFollow } from " @retroachievements/api" ;
35+
36+ // First, build your authorization object.
37+ const username = " <your username on RA>" ;
38+ const webApiKey = " <your web API key>" ;
39+
40+ const authorization = buildAuthorization ({ username , webApiKey });
41+
42+ // Then, make the API call.
43+ const usersIFollow = await getUsersIFollow (authorization );
44+
45+ // Note: a payload object can be specified as a second argument to alter
46+ // the number of users returned and/or the starting offset.
47+ //
48+ // Example:
49+ // const anotherSetOfUsersIFollow = await getUsersIFollow(authorization, {
50+ // offset: 60,
51+ // count: 20
52+ // });
53+ ```
54+
3355``` Kotlin
3456val credentials = RetroCredentials (" <username>" , " <web api key>" )
3557val api: RetroInterface = RetroClient (credentials).api
@@ -72,11 +94,29 @@ if (response is NetworkResponse.Success) {
7294}
7395```
7496
97+ ``` json [NodeJS]
98+ {
99+ "count" : 20 ,
100+ "total" : 120 ,
101+ "results" : [
102+ {
103+ "user" : " zuliman92" ,
104+ "ulid" : " 00003EMFWR7XB8SDPEHB3K56ZQ" ,
105+ "points" : 1882 ,
106+ "pointsSoftcore" : 258 ,
107+ "isFollowingMe" : true
108+ }
109+ // ...
110+ ]
111+ }
112+ ```
113+
75114:::
76115
77116## Source
78117
79118| Repo | URL |
80119| :--------- | :------------------------------------------------------------------------------------------------------------------- |
81120| RAWeb | https://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetUsersIFollow.php |
121+ | api-js | https://github.com/RetroAchievements/api-js/blob/main/src/user/getUsersIFollow.ts |
82122| api-kotlin | https://github.com/RetroAchievements/api-kotlin/blob/main/src/main/kotlin/org/retroachivements/api/RetroInterface.kt |
0 commit comments