Skip to content

Commit

Permalink
docs: add get user set request docs (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
drisc authored Jan 3, 2025
1 parent 13f4e8d commit fe5a9a9
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Click the function names to open their complete docs on the docs site.
- [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.
- [User Set Requests](https://api-docs.retroachievements.org/v1/get-user-set-requests.html) - Get a user's list of set requests.

### Game

Expand Down
4 changes: 4 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ export default defineConfig({
text: "Users Following Me",
link: "/v1/get-users-following-me",
},
{
text: "User Set Requests",
link: "/v1/get-user-set-requests",
},
],
},
{
Expand Down
Binary file added docs/public/set-requests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions docs/v1/get-user-set-requests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<script setup>
import SampleRequest from '../components/SampleRequest.vue';
</script>

# User Set Requests

A call to this endpoint will retrieve a given user's set requests, maximum total requests and points until next request.

[[toc]]

## On-Site Representation

![Set Requests](/set-requests.png)

## HTTP Request

<SampleRequest httpVerb="GET">https://retroachievements.org/API/API_GetUserSetRequests.php?u=MaxMilyin</SampleRequest>

### Query Parameters

| Name | Required? | Description |
| :--- | :-------- | :--------------------------------------------------------------------------- |
| `y` | Yes | Your web API key. |
| `u` | Yes | The target username. |
| `t` | No | Request List Type: 0 for active requests, 1 for all requests. Defaults to 0. |

## Client Library

Not Yet Supported

## Response

::: code-group

```json [HTTP Response]
{
"RequestedSets": [
{
"GameID": 8149,
"Title": "Jurassic Park Institute Tour: Dinosaur Rescue",
"ConsoleID": 5,
"ConsoleName": "Game Boy Advance",
"ImageIcon": "/Images/000001.png"
},
{
"GameID": 600,
"Title": "Psycho Pinball",
"ConsoleID": 1,
"ConsoleName": "Genesis/Mega Drive",
"ImageIcon": "/Images/039797.png"
},
{
"GameID": 1,
"Title": "Sonic the Hedgehog",
"ConsoleID": 1,
"ConsoleName": "Genesis/Mega Drive",
"ImageIcon": "/Images/085573.png"
}
],
"TotalRequests": 5,
"PointsForNext": 5000
}
```

:::

## Source

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

0 comments on commit fe5a9a9

Please sign in to comment.