Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/v1/get-users-i-follow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<your username on RA>";
const webApiKey = "<your web API key>";

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("<username>", "<web api key>")
val api: RetroInterface = RetroClient(credentials).api
Expand Down Expand Up @@ -72,11 +94,29 @@ if (response is NetworkResponse.Success) {
}
```

```json [NodeJS]
{
"count": 20,
"total": 120,
"results": [
{
"user": "zuliman92",
"ulid": "00003EMFWR7XB8SDPEHB3K56ZQ",
"points": 1882,
"pointsSoftcore": 258,
"isFollowingMe": true
}
// ...
]
}
```

:::

## Source

| 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 |