From d5dc5b20960a55050bf0eac005e65642eb63b85c Mon Sep 17 00:00:00 2001 From: Wes Copeland Date: Fri, 24 May 2024 16:21:38 -0400 Subject: [PATCH] feat(getRecentGameAwards): add api-js documentation --- docs/getting-started.md | 4 +- docs/v1/get-achievement-count.md | 4 +- docs/v1/get-achievement-distribution.md | 4 +- docs/v1/get-achievement-of-the-week.md | 4 +- docs/v1/get-achievement-unlocks.md | 4 +- docs/v1/get-achievements-earned-between.md | 6 +-- docs/v1/get-achievements-earned-on-day.md | 6 +-- docs/v1/get-active-claims.md | 4 +- docs/v1/get-claims.md | 4 +- docs/v1/get-console-ids.md | 4 +- docs/v1/get-game-extended.md | 4 +- docs/v1/get-game-info-and-user-progress.md | 6 +-- docs/v1/get-game-list.md | 4 +- docs/v1/get-game-rank-and-score.md | 4 +- docs/v1/get-game.md | 4 +- docs/v1/get-recent-game-awards.md | 46 +++++++++++++++++-- .../get-achievement-ticket-stats.md | 4 +- .../get-developer-ticket-stats.md | 6 +-- .../get-ticket-data/get-game-ticket-stats.md | 4 +- .../get-most-recent-tickets.md | 4 +- .../get-most-ticketed-games.md | 4 +- docs/v1/get-ticket-data/get-ticket-by-id.md | 4 +- docs/v1/get-top-ten-users.md | 6 +-- docs/v1/get-user-awards.md | 6 +-- docs/v1/get-user-claims.md | 6 +-- docs/v1/get-user-completed-games.md | 6 +-- docs/v1/get-user-completion-progress.md | 6 +-- docs/v1/get-user-game-rank-and-score.md | 6 +-- docs/v1/get-user-points.md | 6 +-- docs/v1/get-user-profile.md | 6 +-- docs/v1/get-user-progress.md | 6 +-- docs/v1/get-user-recent-achievements.md | 6 +-- docs/v1/get-user-recently-played-games.md | 6 +-- docs/v1/get-user-summary.md | 6 +-- 34 files changed, 124 insertions(+), 86 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 0435f3f..42e07e0 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -93,10 +93,10 @@ You can now create your authorization object using your RA username & web API ke ```ts [NodeJS] import { buildAuthorization } from "@retroachievements/api"; -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); ``` ```kotlin [Kotlin] diff --git a/docs/v1/get-achievement-count.md b/docs/v1/get-achievement-count.md index 43de7a4..cbd205f 100644 --- a/docs/v1/get-achievement-count.md +++ b/docs/v1/get-achievement-count.md @@ -37,10 +37,10 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const achievementCount = await getAchievementCount(authorization, { diff --git a/docs/v1/get-achievement-distribution.md b/docs/v1/get-achievement-distribution.md index 73561c6..f134bc1 100644 --- a/docs/v1/get-achievement-distribution.md +++ b/docs/v1/get-achievement-distribution.md @@ -39,10 +39,10 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const achievementDistribution = await getAchievementDistribution( diff --git a/docs/v1/get-achievement-of-the-week.md b/docs/v1/get-achievement-of-the-week.md index fedf4df..f84f036 100644 --- a/docs/v1/get-achievement-of-the-week.md +++ b/docs/v1/get-achievement-of-the-week.md @@ -36,10 +36,10 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const achievementOfTheWeek = await getAchievementOfTheWeek(authorization); diff --git a/docs/v1/get-achievement-unlocks.md b/docs/v1/get-achievement-unlocks.md index e1cb61f..be5bd2d 100644 --- a/docs/v1/get-achievement-unlocks.md +++ b/docs/v1/get-achievement-unlocks.md @@ -33,10 +33,10 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const achievementUnlocks = await getAchievementUnlocks(authorization, { diff --git a/docs/v1/get-achievements-earned-between.md b/docs/v1/get-achievements-earned-between.md index dd72fd2..b390ad0 100644 --- a/docs/v1/get-achievements-earned-between.md +++ b/docs/v1/get-achievements-earned-between.md @@ -39,14 +39,14 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const achievements = await getAchievementsEarnedBetween(authorization, { - userName: "Jamiras", + username: "Jamiras", fromDate: new Date("2022-01-01"), toDate: new Date("2022-01-08"), }); diff --git a/docs/v1/get-achievements-earned-on-day.md b/docs/v1/get-achievements-earned-on-day.md index 38bdc53..271108a 100644 --- a/docs/v1/get-achievements-earned-on-day.md +++ b/docs/v1/get-achievements-earned-on-day.md @@ -38,14 +38,14 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const achievements = await getAchievementsEarnedOnDay(authorization, { - userName: "MaxMilyin", + username: "MaxMilyin", onDate: new Date("2022-10-14"), }); ``` diff --git a/docs/v1/get-active-claims.md b/docs/v1/get-active-claims.md index 9070035..5926501 100644 --- a/docs/v1/get-active-claims.md +++ b/docs/v1/get-active-claims.md @@ -27,10 +27,10 @@ A call to this endpoint returns information about all (1000 max) active set clai import { buildAuthorization, getActiveClaims } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const activeClaims = await getActiveClaims(authorization); diff --git a/docs/v1/get-claims.md b/docs/v1/get-claims.md index 755ab4c..86699ab 100644 --- a/docs/v1/get-claims.md +++ b/docs/v1/get-claims.md @@ -28,10 +28,10 @@ A call to this endpoint returns information about all (1000 max) achievement set import { buildAuthorization, getClaims } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const claims = await getClaims(authorization, { claimKind: "completed" }); diff --git a/docs/v1/get-console-ids.md b/docs/v1/get-console-ids.md index 0598290..86ebcaf 100644 --- a/docs/v1/get-console-ids.md +++ b/docs/v1/get-console-ids.md @@ -35,10 +35,10 @@ The systems list can be found by selecting the "Games" menu from the site navbar import { buildAuthorization, getConsoleIds } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const consoleIds = await getConsoleIds(authorization); diff --git a/docs/v1/get-game-extended.md b/docs/v1/get-game-extended.md index b2a8792..1ba6934 100644 --- a/docs/v1/get-game-extended.md +++ b/docs/v1/get-game-extended.md @@ -35,10 +35,10 @@ Most of this data can be found on the game page, for example, [Sonic the Hedgeho import { buildAuthorization, getGameExtended } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const gameExtended = await getGameExtended(authorization, { diff --git a/docs/v1/get-game-info-and-user-progress.md b/docs/v1/get-game-info-and-user-progress.md index de2ab79..64dbeb1 100644 --- a/docs/v1/get-game-info-and-user-progress.md +++ b/docs/v1/get-game-info-and-user-progress.md @@ -33,16 +33,16 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const gameInfoAndUserProgress = await getGameInfoAndUserProgress( authorization, { - userName: "MaxMilyin", + username: "MaxMilyin", gameId: 14402, }, ); diff --git a/docs/v1/get-game-list.md b/docs/v1/get-game-list.md index 8fa3de5..2acaddd 100644 --- a/docs/v1/get-game-list.md +++ b/docs/v1/get-game-list.md @@ -40,10 +40,10 @@ The system games list can be found by selecting any system in the "Games" menu f import { buildAuthorization, getGameList } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const gameList = await getGameList(authorization, { diff --git a/docs/v1/get-game-rank-and-score.md b/docs/v1/get-game-rank-and-score.md index 8c11379..c4339d4 100644 --- a/docs/v1/get-game-rank-and-score.md +++ b/docs/v1/get-game-rank-and-score.md @@ -38,10 +38,10 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const gameRankAndScore = await getGameRankAndScore(authorization, { diff --git a/docs/v1/get-game.md b/docs/v1/get-game.md index 34b7bbf..25df3e3 100644 --- a/docs/v1/get-game.md +++ b/docs/v1/get-game.md @@ -34,10 +34,10 @@ Most of this data can be found on the game page, for example, [Sonic the Hedgeho import { buildAuthorization, getGame } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const game = await getGame(authorization, { diff --git a/docs/v1/get-recent-game-awards.md b/docs/v1/get-recent-game-awards.md index 7430205..0309790 100644 --- a/docs/v1/get-recent-game-awards.md +++ b/docs/v1/get-recent-game-awards.md @@ -31,7 +31,25 @@ This data can be found on the Recent Game Awards page, for example: ## Client Library -Not yet supported. +::: code-group + +```ts [NodeJS] +import { + buildAuthorization, + getRecentGameAwards, +} from "@retroachievements/api"; + +// First, build your authorization object. +const username = ""; +const webApiKey = ""; + +const authorization = buildAuthorization({ username, webApiKey }); + +// Then, make the API call. +const game = await getRecentGameAwards(authorization); +``` + +::: ## Response @@ -56,10 +74,30 @@ Not yet supported. } ``` +```json [NodeJS] +{ + "count": 25, + "total": 452857, + "results": [ + { + "user": "renanbrj", + "awardKind": "mastered", + "awardDate": "2022-01-01T23:48:04+00:00", + "gameId": 14_284, + "gameTitle": "Batman Returns", + "consoleId": 15, + "consoleName": "Game Gear" + } + // ... + ] +} +``` + ::: ## Source -| Repo | URL | -| :---- | :-------------------------------------------------------------------------------------------- | -| RAWeb | https://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetRecentGameAwards.php | +| Repo | URL | +| :----- | :-------------------------------------------------------------------------------------------- | +| RAWeb | https://github.com/RetroAchievements/RAWeb/blob/master/public/API/API_GetRecentGameAwards.php | +| api-js | https://github.com/RetroAchievements/api-js/blob/main/src/feed/getRecentGameAwards.ts | diff --git a/docs/v1/get-ticket-data/get-achievement-ticket-stats.md b/docs/v1/get-ticket-data/get-achievement-ticket-stats.md index a5f7731..591d380 100644 --- a/docs/v1/get-ticket-data/get-achievement-ticket-stats.md +++ b/docs/v1/get-ticket-data/get-achievement-ticket-stats.md @@ -28,10 +28,10 @@ A call to `API_GetTicketData` in this manner will retrieve ticket stats for an a import { buildAuthorization, getTicketData } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const achievementTicketStats = await getTicketData(authorization, { diff --git a/docs/v1/get-ticket-data/get-developer-ticket-stats.md b/docs/v1/get-ticket-data/get-developer-ticket-stats.md index 5f4b21c..f20162a 100644 --- a/docs/v1/get-ticket-data/get-developer-ticket-stats.md +++ b/docs/v1/get-ticket-data/get-developer-ticket-stats.md @@ -28,14 +28,14 @@ A call to `API_GetTicketData` in this manner will retrieve ticket stats for a de import { buildAuthorization, getTicketData } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const developerTicketStats = await getTicketData(authorization, { - userName: "Hexadigital", + username: "Hexadigital", }); ``` diff --git a/docs/v1/get-ticket-data/get-game-ticket-stats.md b/docs/v1/get-ticket-data/get-game-ticket-stats.md index e0f80ea..bbeea36 100644 --- a/docs/v1/get-ticket-data/get-game-ticket-stats.md +++ b/docs/v1/get-ticket-data/get-game-ticket-stats.md @@ -30,10 +30,10 @@ A call to `API_GetTicketData` in this manner will retrieve ticket stats for a ga import { buildAuthorization, getTicketData } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const gameTicketStats = await getTicketData(authorization, { gameId: 1 }); diff --git a/docs/v1/get-ticket-data/get-most-recent-tickets.md b/docs/v1/get-ticket-data/get-most-recent-tickets.md index 7492077..a7127a5 100644 --- a/docs/v1/get-ticket-data/get-most-recent-tickets.md +++ b/docs/v1/get-ticket-data/get-most-recent-tickets.md @@ -29,10 +29,10 @@ A call to `API_GetTicketData` in this manner will retrieve ticket metadata infor import { buildAuthorization, getTicketData } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const mostRecentTickets = await getTicketData(authorization, { diff --git a/docs/v1/get-ticket-data/get-most-ticketed-games.md b/docs/v1/get-ticket-data/get-most-ticketed-games.md index 8d68770..b2f4705 100644 --- a/docs/v1/get-ticket-data/get-most-ticketed-games.md +++ b/docs/v1/get-ticket-data/get-most-ticketed-games.md @@ -30,10 +30,10 @@ A call to `API_GetTicketData` in this manner will retrieve the games on the site import { buildAuthorization, getTicketData } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const ticket = await getTicketData(authorization, { diff --git a/docs/v1/get-ticket-data/get-ticket-by-id.md b/docs/v1/get-ticket-data/get-ticket-by-id.md index cc1be7d..c5eb501 100644 --- a/docs/v1/get-ticket-data/get-ticket-by-id.md +++ b/docs/v1/get-ticket-data/get-ticket-by-id.md @@ -28,10 +28,10 @@ A call to `API_GetTicketData` in this manner will retrieve ticket metadata infor import { buildAuthorization, getTicketData } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const ticket = await getTicketData(authorization, { ticketId: 12345 }); diff --git a/docs/v1/get-top-ten-users.md b/docs/v1/get-top-ten-users.md index 6e62763..831a3de 100644 --- a/docs/v1/get-top-ten-users.md +++ b/docs/v1/get-top-ten-users.md @@ -27,10 +27,10 @@ A call to this endpoint will retrieve the current top ten users, ranked by hardc import { buildAuthorization, getTopTenUsers } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const topTenUsers = await getTopTenUsers(authorization); @@ -75,7 +75,7 @@ if (response is NetworkResponse.Success) { ```json [NodeJS] [ { - "userName": "MaxMilyin", + "username": "MaxMilyin", "totalPoints": 399597, "totalRatioPoints": 1599212 } diff --git a/docs/v1/get-user-awards.md b/docs/v1/get-user-awards.md index 4183261..9a877b4 100644 --- a/docs/v1/get-user-awards.md +++ b/docs/v1/get-user-awards.md @@ -34,13 +34,13 @@ The easiest place to see a summary of user awards in the Progression Status comp import { buildAuthorization, getUserAwards } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. -const userAwards = await getUserAwards(authorization, { userName: "xelnia" }); +const userAwards = await getUserAwards(authorization, { username: "xelnia" }); ``` ```kotlin [Kotlin] diff --git a/docs/v1/get-user-claims.md b/docs/v1/get-user-claims.md index 2986bf9..6b8de38 100644 --- a/docs/v1/get-user-claims.md +++ b/docs/v1/get-user-claims.md @@ -28,14 +28,14 @@ A call to this endpoint will retrieve a list of achievement set claims made over import { buildAuthorization, getUserClaims } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userClaims = await getUserClaims(authorization, { - userName: "Jamiras", + username: "Jamiras", }); ``` diff --git a/docs/v1/get-user-completed-games.md b/docs/v1/get-user-completed-games.md index 8244872..8fc5468 100644 --- a/docs/v1/get-user-completed-games.md +++ b/docs/v1/get-user-completed-games.md @@ -37,14 +37,14 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userCompletedGames = await getUserCompletedGames(authorization, { - userName: "MaxMilyin", + username: "MaxMilyin", }); ``` diff --git a/docs/v1/get-user-completion-progress.md b/docs/v1/get-user-completion-progress.md index 58a638d..7203bc6 100644 --- a/docs/v1/get-user-completion-progress.md +++ b/docs/v1/get-user-completion-progress.md @@ -39,14 +39,14 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userCompletionProgress = await getUserCompletionProgress(authorization, { - userName: "MaxMilyin", + username: "MaxMilyin", }); ``` diff --git a/docs/v1/get-user-game-rank-and-score.md b/docs/v1/get-user-game-rank-and-score.md index 608111d..f235950 100644 --- a/docs/v1/get-user-game-rank-and-score.md +++ b/docs/v1/get-user-game-rank-and-score.md @@ -32,14 +32,14 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userGameRankAndScore = await getUserGameRankAndScore(authorization, { - userName: "WCopeland", + username: "WCopeland", gameId: 14402, }); ``` diff --git a/docs/v1/get-user-points.md b/docs/v1/get-user-points.md index b116ee8..bf2141b 100644 --- a/docs/v1/get-user-points.md +++ b/docs/v1/get-user-points.md @@ -28,14 +28,14 @@ A call to this endpoint will retrieve a given user's hardcore and softcore point import { buildAuthorization, getUserPoints } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userPoints = await getUserPoints(authorization, { - userName: "Hexadigital", + username: "Hexadigital", }); ``` diff --git a/docs/v1/get-user-profile.md b/docs/v1/get-user-profile.md index a2ef90e..ebca9a6 100644 --- a/docs/v1/get-user-profile.md +++ b/docs/v1/get-user-profile.md @@ -34,14 +34,14 @@ This information can be found near the top of [any user page](https://retroachie import { buildAuthorization, getUserProfile } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userProfile = await getUserProfile(authorization, { - userName: "xelnia", + username: "xelnia", }); ``` diff --git a/docs/v1/get-user-progress.md b/docs/v1/get-user-progress.md index 3a1035c..72d069a 100644 --- a/docs/v1/get-user-progress.md +++ b/docs/v1/get-user-progress.md @@ -35,14 +35,14 @@ Unless you are explicitly wanting summary progress details for specific game IDs import { buildAuthorization, getUserProgress } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userGamesProgress = await getUserProgress(authorization, { - userName: "MaxMilyin", + username: "MaxMilyin", gameIds: [1, 2, 3], }); ``` diff --git a/docs/v1/get-user-recent-achievements.md b/docs/v1/get-user-recent-achievements.md index 551d9d0..c4e60dd 100644 --- a/docs/v1/get-user-recent-achievements.md +++ b/docs/v1/get-user-recent-achievements.md @@ -42,14 +42,14 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userRecentAchievements = await getUserRecentAchievements(authorization, { - userName: "xelnia", + username: "xelnia", }); ``` diff --git a/docs/v1/get-user-recently-played-games.md b/docs/v1/get-user-recently-played-games.md index 1eb07b2..5b19863 100644 --- a/docs/v1/get-user-recently-played-games.md +++ b/docs/v1/get-user-recently-played-games.md @@ -33,16 +33,16 @@ import { } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userRecentlyPlayedGames = await getUserRecentlyPlayedGames( authorization, { - userName: "xelnia", + username: "xelnia", }, ); ``` diff --git a/docs/v1/get-user-summary.md b/docs/v1/get-user-summary.md index 08713cf..35c8057 100644 --- a/docs/v1/get-user-summary.md +++ b/docs/v1/get-user-summary.md @@ -42,14 +42,14 @@ Recent achievements are pulled from recent games, so if you ask for 1 game and 1 import { buildAuthorization, getUserSummary } from "@retroachievements/api"; // First, build your authorization object. -const userName = ""; +const username = ""; const webApiKey = ""; -const authorization = buildAuthorization({ userName, webApiKey }); +const authorization = buildAuthorization({ username, webApiKey }); // Then, make the API call. const userSummary = await getUserSummary(authorization, { - userName: "xelnia", + username: "xelnia", recentGamesCount: 1, recentAchievementsCount: 2, });