diff --git a/README.md b/README.md index 2fe10df..b8848e4 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 38595d6..7346080 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -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", + }, ], }, { diff --git a/docs/public/set-requests.png b/docs/public/set-requests.png new file mode 100644 index 0000000..6eba44f Binary files /dev/null and b/docs/public/set-requests.png differ diff --git a/docs/v1/get-user-set-requests.md b/docs/v1/get-user-set-requests.md new file mode 100644 index 0000000..29dbe57 --- /dev/null +++ b/docs/v1/get-user-set-requests.md @@ -0,0 +1,71 @@ + + +# 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 + +https://retroachievements.org/API/API_GetUserSetRequests.php?u=MaxMilyin + +### 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 |