Skip to content

docs: add APIs for retrieving followers/following users #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Click the function names to open their complete docs on the docs site.
- [Summary](https://api-docs.retroachievements.org/v1/get-user-summary.html) - Get a user's profile metadata.
- [Completed Games](https://api-docs.retroachievements.org/v1/get-user-completed-games.html) - Legacy endpoint. Get hardcore and softcore completion metadata about games a user has played.
- [Want to Play Games List](https://api-docs.retroachievements.org/v1/get-user-want-to-play-list.html) - Get a user's list of Want to Play Games.
- [Users I Follow](https://api-docs.retroachievements.org/v1/get-users-i-follow.html) - Get the caller's list of followed users.
- [Users Following Me](https://api-docs.retroachievements.org/v1/get-users-following-me.html) - Get the caller's list of followers users.

### Game

Expand Down
8 changes: 8 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ export default defineConfig({
text: "Want to Play Games List",
link: "/v1/get-user-want-to-play-list",
},
{
text: "Users I Follow",
link: "/v1/get-users-i-follow",
},
{
text: "Users Following Me",
link: "/v1/get-users-following-me",
},
],
},
{
Expand Down
Binary file added docs/public/user-friends.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions docs/v1/get-users-following-me.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<script setup>
import SampleRequest from '../components/SampleRequest.vue';
</script>

# Users Following Me

A call to this endpoint will retrieve the caller's "Followers" users list.

[[toc]]

## On-site Representation

The user's Followers Users List page looks like:

![Users Following Me](/user-friends.png)

## HTTP Request

<SampleRequest httpVerb="GET">https://retroachievements.org/API/API_GetUsersFollowingMe.php</SampleRequest>

### Query Parameters

| Name | Required? | Description |
| :--- | :-------- | :----------------------------------------------------------- |
| `y` | Yes | Your web API key. |
| `c` | | Count, number of records to return (default: 100, max: 500). |
| `o` | | Offset, number of entries to skip (default: 0). |

## Client Library

Not yet supported.

## Response

::: code-group

```json [HTTP Response]
{
"Count": 20,
"Total": 120,
"Results": [
{
"User": "zuliman92",
"Points": 1882,
"PointsSoftcore": 258,
"AmIFollowing": true
}
// ...
]
}
```

:::

## Source

| Repo | URL |
| :---- | :-------------------------------------------------------------------------------------------- |
| RAWeb | https://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetUsersFollowingMe.php |
59 changes: 59 additions & 0 deletions docs/v1/get-users-i-follow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<script setup>
import SampleRequest from '../components/SampleRequest.vue';
</script>

# Users I Follow

A call to this endpoint will retrieve the caller's "Following" users list.

[[toc]]

## On-site Representation

The user's Followers Users List page looks like:

![Users I Follow](/user-friends.png)

## HTTP Request

<SampleRequest httpVerb="GET">https://retroachievements.org/API/API_GetUsersIFollow.php</SampleRequest>

### Query Parameters

| Name | Required? | Description |
| :--- | :-------- | :----------------------------------------------------------- |
| `y` | Yes | Your web API key. |
| `c` | | Count, number of records to return (default: 100, max: 500). |
| `o` | | Offset, number of entries to skip (default: 0). |

## Client Library

Not yet supported.

## Response

::: code-group

```json [HTTP Response]
{
"Count": 20,
"Total": 120,
"Results": [
{
"User": "zuliman92",
"Points": 1882,
"PointsSoftcore": 258,
"IsFollowingMe": true
}
// ...
]
}
```

:::

## Source

| Repo | URL |
| :---- | :---------------------------------------------------------------------------------------- |
| RAWeb | https://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetUsersIFollow.php |