diff --git a/docs/v1/get-users-i-follow.md b/docs/v1/get-users-i-follow.md index b83935a..3dfea79 100644 --- a/docs/v1/get-users-i-follow.md +++ b/docs/v1/get-users-i-follow.md @@ -30,6 +30,28 @@ The user's Followers Users List page looks like: ::: code-group +```ts [NodeJS] +import { buildAuthorization, getUsersIFollow } from "@retroachievements/api"; + +// First, build your authorization object. +const username = ""; +const webApiKey = ""; + +const authorization = buildAuthorization({ username, webApiKey }); + +// Then, make the API call. +const usersIFollow = await getUsersIFollow(authorization); + +// Note: a payload object can be specified as a second argument to alter +// the number of users returned and/or the starting offset. +// +// Example: +// const anotherSetOfUsersIFollow = await getUsersIFollow(authorization, { +// offset: 60, +// count: 20 +// }); +``` + ```Kotlin val credentials = RetroCredentials("", "") val api: RetroInterface = RetroClient(credentials).api @@ -72,6 +94,23 @@ if (response is NetworkResponse.Success) { } ``` +```json [NodeJS] +{ + "count": 20, + "total": 120, + "results": [ + { + "user": "zuliman92", + "ulid": "00003EMFWR7XB8SDPEHB3K56ZQ", + "points": 1882, + "pointsSoftcore": 258, + "isFollowingMe": true + } + // ... + ] +} +``` + ::: ## Source @@ -79,4 +118,5 @@ if (response is NetworkResponse.Success) { | Repo | URL | | :--------- | :------------------------------------------------------------------------------------------------------------------- | | RAWeb | https://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetUsersIFollow.php | +| api-js | https://github.com/RetroAchievements/api-js/blob/main/src/user/getUsersIFollow.ts | | api-kotlin | https://github.com/RetroAchievements/api-kotlin/blob/main/src/main/kotlin/org/retroachivements/api/RetroInterface.kt |