@retroachievements/api 1.5.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +3 -2
  2. package/dist/achievement/getAchievementUnlocks.d.ts +1 -1
  3. package/dist/api.cjs +1 -1
  4. package/dist/api.cjs.map +1 -1
  5. package/dist/api.modern.js +1 -1
  6. package/dist/api.modern.js.map +1 -1
  7. package/dist/api.module.js +1 -1
  8. package/dist/api.module.js.map +1 -1
  9. package/dist/api.umd.js +1 -1
  10. package/dist/api.umd.js.map +1 -1
  11. package/dist/console/getConsoleIds.d.ts +15 -4
  12. package/dist/console/getGameList.d.ts +1 -1
  13. package/dist/console/models/fetched-system.model.d.ts +7 -0
  14. package/dist/console/models/get-console-ids-response.model.d.ts +2 -0
  15. package/dist/console/models/index.d.ts +1 -1
  16. package/dist/feed/getAchievementOfTheWeek.d.ts +1 -1
  17. package/dist/feed/getActiveClaims.d.ts +1 -1
  18. package/dist/feed/getRecentGameAwards.d.ts +50 -0
  19. package/dist/feed/getRecentGameAwards.test.d.ts +1 -0
  20. package/dist/feed/getTopTenUsers.d.ts +3 -3
  21. package/dist/feed/index.d.ts +1 -0
  22. package/dist/feed/models/get-recent-game-awards-response.model.d.ts +14 -0
  23. package/dist/feed/models/index.d.ts +2 -0
  24. package/dist/feed/models/recent-game-awards.model.d.ts +14 -0
  25. package/dist/feed/models/top-ten-users-entity.model.d.ts +1 -1
  26. package/dist/game/getAchievementCount.d.ts +1 -1
  27. package/dist/game/getAchievementDistribution.d.ts +1 -1
  28. package/dist/game/getGame.d.ts +1 -1
  29. package/dist/game/getGameExtended.d.ts +1 -1
  30. package/dist/game/getGameRankAndScore.d.ts +1 -1
  31. package/dist/game/getGameRating.d.ts +1 -1
  32. package/dist/ticket/getTicketData.d.ts +9 -9
  33. package/dist/user/getAchievementsEarnedBetween.d.ts +4 -4
  34. package/dist/user/getAchievementsEarnedOnDay.d.ts +4 -4
  35. package/dist/user/getGameInfoAndUserProgress.d.ts +9 -5
  36. package/dist/user/getUserAwards.d.ts +4 -4
  37. package/dist/user/getUserClaims.d.ts +4 -4
  38. package/dist/user/getUserCompletedGames.d.ts +4 -4
  39. package/dist/user/getUserCompletionProgress.d.ts +4 -4
  40. package/dist/user/getUserGameRankAndScore.d.ts +4 -4
  41. package/dist/user/getUserPoints.d.ts +4 -4
  42. package/dist/user/getUserProfile.d.ts +4 -4
  43. package/dist/user/getUserProgress.d.ts +4 -4
  44. package/dist/user/getUserRecentAchievements.d.ts +4 -4
  45. package/dist/user/getUserRecentlyPlayedGames.d.ts +4 -4
  46. package/dist/user/getUserSummary.d.ts +4 -4
  47. package/dist/user/models/game-info-and-user-progress.model.d.ts +3 -0
  48. package/dist/user/models/get-game-info-and-user-progress-response.model.d.ts +3 -0
  49. package/dist/user/models/get-user-completion-progress-response.model.d.ts +2 -1
  50. package/dist/user/models/user-completion-progress-entity.model.d.ts +2 -1
  51. package/dist/utils/public/buildAuthorization.d.ts +1 -1
  52. package/dist/utils/public/models/auth-object.model.d.ts +2 -2
  53. package/dist/utils/public/models/award-kind.model.d.ts +1 -0
  54. package/dist/utils/public/models/index.d.ts +1 -0
  55. package/package.json +6 -12
  56. package/src/__playground.ts +4 -4
  57. package/src/achievement/getAchievementUnlocks.test.ts +1 -1
  58. package/src/achievement/getAchievementUnlocks.ts +1 -1
  59. package/src/console/getConsoleIds.test.ts +15 -3
  60. package/src/console/getConsoleIds.ts +28 -6
  61. package/src/console/getGameList.test.ts +1 -1
  62. package/src/console/getGameList.ts +1 -1
  63. package/src/console/models/fetched-system.model.ts +7 -0
  64. package/src/console/models/get-console-ids-response.model.ts +2 -0
  65. package/src/console/models/index.ts +1 -1
  66. package/src/feed/getAchievementOfTheWeek.test.ts +2 -2
  67. package/src/feed/getAchievementOfTheWeek.ts +1 -1
  68. package/src/feed/getActiveClaims.test.ts +1 -1
  69. package/src/feed/getActiveClaims.ts +1 -1
  70. package/src/feed/getClaims.test.ts +1 -1
  71. package/src/feed/getRecentGameAwards.test.ts +73 -0
  72. package/src/feed/getRecentGameAwards.ts +85 -0
  73. package/src/feed/getTopTenUsers.test.ts +11 -11
  74. package/src/feed/getTopTenUsers.ts +4 -4
  75. package/src/feed/index.ts +1 -0
  76. package/src/feed/models/get-recent-game-awards-response.model.ts +15 -0
  77. package/src/feed/models/index.ts +2 -0
  78. package/src/feed/models/recent-game-awards.model.ts +15 -0
  79. package/src/feed/models/top-ten-users-entity.model.ts +1 -1
  80. package/src/game/getAchievementCount.test.ts +1 -1
  81. package/src/game/getAchievementCount.ts +1 -1
  82. package/src/game/getAchievementDistribution.test.ts +4 -4
  83. package/src/game/getAchievementDistribution.ts +1 -1
  84. package/src/game/getGame.test.ts +1 -1
  85. package/src/game/getGame.ts +1 -1
  86. package/src/game/getGameExtended.test.ts +1 -1
  87. package/src/game/getGameExtended.ts +1 -1
  88. package/src/game/getGameRankAndScore.test.ts +1 -1
  89. package/src/game/getGameRankAndScore.ts +1 -1
  90. package/src/game/getGameRating.test.ts +1 -1
  91. package/src/game/getGameRating.ts +1 -1
  92. package/src/ticket/getTicketData.test.ts +7 -7
  93. package/src/ticket/getTicketData.ts +13 -13
  94. package/src/user/getAchievementsEarnedBetween.test.ts +2 -2
  95. package/src/user/getAchievementsEarnedBetween.ts +6 -6
  96. package/src/user/getAchievementsEarnedOnDay.test.ts +2 -2
  97. package/src/user/getAchievementsEarnedOnDay.ts +6 -6
  98. package/src/user/getGameInfoAndUserProgress.test.ts +3 -3
  99. package/src/user/getGameInfoAndUserProgress.ts +22 -11
  100. package/src/user/getUserAwards.test.ts +2 -2
  101. package/src/user/getUserAwards.ts +6 -6
  102. package/src/user/getUserClaims.test.ts +2 -2
  103. package/src/user/getUserClaims.ts +6 -6
  104. package/src/user/getUserCompletedGames.test.ts +2 -2
  105. package/src/user/getUserCompletedGames.ts +6 -6
  106. package/src/user/getUserCompletionProgress.test.ts +2 -2
  107. package/src/user/getUserCompletionProgress.ts +6 -6
  108. package/src/user/getUserGameRankAndScore.test.ts +2 -2
  109. package/src/user/getUserGameRankAndScore.ts +6 -6
  110. package/src/user/getUserPoints.test.ts +2 -2
  111. package/src/user/getUserPoints.ts +6 -6
  112. package/src/user/getUserProfile.test.ts +2 -2
  113. package/src/user/getUserProfile.ts +6 -6
  114. package/src/user/getUserProgress.test.ts +2 -2
  115. package/src/user/getUserProgress.ts +6 -6
  116. package/src/user/getUserRecentAchievements.test.ts +2 -2
  117. package/src/user/getUserRecentAchievements.ts +6 -6
  118. package/src/user/getUserRecentlyPlayedGames.test.ts +2 -2
  119. package/src/user/getUserRecentlyPlayedGames.ts +6 -6
  120. package/src/user/getUserSummary.test.ts +4 -4
  121. package/src/user/getUserSummary.ts +6 -6
  122. package/src/user/models/game-info-and-user-progress.model.ts +4 -0
  123. package/src/user/models/get-game-info-and-user-progress-response.model.ts +4 -0
  124. package/src/user/models/get-user-completion-progress-response.model.ts +3 -6
  125. package/src/user/models/user-completion-progress-entity.model.ts +3 -6
  126. package/src/utils/internal/buildRequestUrl.test.ts +2 -2
  127. package/src/utils/internal/buildRequestUrl.ts +1 -1
  128. package/src/utils/public/buildAuthorization.test.ts +3 -3
  129. package/src/utils/public/buildAuthorization.ts +4 -4
  130. package/src/utils/public/models/auth-object.model.ts +2 -2
  131. package/src/utils/public/models/award-kind.model.ts +5 -0
  132. package/src/utils/public/models/index.ts +1 -0
  133. package/src/console/models/console-id.model.ts +0 -5
@@ -4,7 +4,7 @@ import type { TopTenUsers } from "./models";
4
4
  * A call to this function will retrieve the current top ten users
5
5
  * on the site.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
10
  * @example
@@ -15,8 +15,8 @@ import type { TopTenUsers } from "./models";
15
15
  * @returns An array containing the list of top ten users.
16
16
  * ```json
17
17
  * [
18
- * { userName: "MockUser", totalPoints: 350000, totalRatioPoints: 995000 },
19
- * { userName: "MockUser2", totalPoints: 345000, totalRatioPoints: 994000 },
18
+ * { username: "MockUser", totalPoints: 350000, totalRatioPoints: 995000 },
19
+ * { username: "MockUser2", totalPoints: 345000, totalRatioPoints: 994000 },
20
20
  * // ...
21
21
  * ]
22
22
  * ```
@@ -1,5 +1,6 @@
1
1
  export * from "./getAchievementOfTheWeek";
2
2
  export * from "./getActiveClaims";
3
3
  export * from "./getClaims";
4
+ export * from "./getRecentGameAwards";
4
5
  export * from "./getTopTenUsers";
5
6
  export * from "./models";
@@ -0,0 +1,14 @@
1
+ import type { AwardKind } from "../../utils/public";
2
+ export interface GetRecentGameAwardsResponse {
3
+ Count: number;
4
+ Total: number;
5
+ Results: Array<{
6
+ User: string;
7
+ AwardKind: AwardKind;
8
+ AwardDate: string;
9
+ GameID: number;
10
+ GameTitle: string;
11
+ ConsoleID: number;
12
+ ConsoleName: string;
13
+ }>;
14
+ }
@@ -3,8 +3,10 @@ export * from "./claim-set-type.enum";
3
3
  export * from "./claim-status.enum";
4
4
  export * from "./claim-type.enum";
5
5
  export * from "./get-achievement-of-the-week-response.model";
6
+ export * from "./get-recent-game-awards-response.model";
6
7
  export * from "./get-set-claims-response.model";
7
8
  export * from "./get-top-ten-users-response.model";
9
+ export * from "./recent-game-awards.model";
8
10
  export * from "./set-claim.model";
9
11
  export * from "./top-ten-users.model";
10
12
  export * from "./top-ten-users-entity.model";
@@ -0,0 +1,14 @@
1
+ import type { AwardKind } from "../../utils/public";
2
+ export interface RecentGameAwards {
3
+ count: number;
4
+ total: number;
5
+ results: Array<{
6
+ user: string;
7
+ awardKind: AwardKind;
8
+ awardDate: string;
9
+ gameId: number;
10
+ gameTitle: string;
11
+ consoleId: number;
12
+ consoleName: string;
13
+ }>;
14
+ }
@@ -1,5 +1,5 @@
1
1
  export interface TopTenUsersEntity {
2
- userName: string;
2
+ username: string;
3
3
  totalPoints: number;
4
4
  totalRatioPoints: number;
5
5
  }
@@ -5,7 +5,7 @@ import type { AchievementCount } from "./models";
5
5
  * A call to this function will retrieve the list of
6
6
  * achievement IDs for a game, targeted by game ID.
7
7
  *
8
- * @param authorization An object containing your userName and webApiKey.
8
+ * @param authorization An object containing your username and webApiKey.
9
9
  * This can be constructed with `buildAuthorization()`.
10
10
  *
11
11
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -6,7 +6,7 @@ import type { AchievementDistributionFlags, GetAchievementDistributionResponse }
6
6
  * of the number of players who have earned a specific
7
7
  * number of achievements for a given game ID.
8
8
  *
9
- * @param authorization An object containing your userName and webApiKey.
9
+ * @param authorization An object containing your username and webApiKey.
10
10
  * This can be constructed with `buildAuthorization()`.
11
11
  *
12
12
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -5,7 +5,7 @@ import type { Game } from "./models";
5
5
  * A call to this function will retrieve basic metadata about
6
6
  * a game, targeted via its unique ID.
7
7
  *
8
- * @param authorization An object containing your userName and webApiKey.
8
+ * @param authorization An object containing your username and webApiKey.
9
9
  * This can be constructed with `buildAuthorization()`.
10
10
  *
11
11
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -5,7 +5,7 @@ import type { GameExtended } from "./models";
5
5
  * A call to this function will retrieve extended metadata
6
6
  * about a game, targeted via its unique ID.
7
7
  *
8
- * @param authorization An object containing your userName and webApiKey.
8
+ * @param authorization An object containing your username and webApiKey.
9
9
  * This can be constructed with `buildAuthorization()`.
10
10
  *
11
11
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -7,7 +7,7 @@ import type { GameRankAndScoreEntity } from "./models";
7
7
  * points earners for a game. The game is targeted via
8
8
  * its unique ID.
9
9
  *
10
- * @param authorization An object containing your userName and webApiKey.
10
+ * @param authorization An object containing your username and webApiKey.
11
11
  * This can be constructed with `buildAuthorization()`.
12
12
  *
13
13
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -5,7 +5,7 @@ import type { GameRating } from "./models";
5
5
  * A call to this function will retrieve metadata about
6
6
  * how users have rated the game and its set.
7
7
  *
8
- * @param authorization An object containing your userName and webApiKey.
8
+ * @param authorization An object containing your username and webApiKey.
9
9
  * This can be constructed with `buildAuthorization()`.
10
10
  *
11
11
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -8,7 +8,7 @@ import type { AchievementTicketStats, GameTicketStats, MostTicketedGames, Recent
8
8
  * A call to this function will retrieve ticket metadata information
9
9
  * about a single achievement ticket, targeted by its ticket ID.
10
10
  *
11
- * @param authorization An object containing your userName and webApiKey.
11
+ * @param authorization An object containing your username and webApiKey.
12
12
  * This can be constructed with `buildAuthorization()`.
13
13
  *
14
14
  * @param payload.ticketId The ID of the ticket to get information about.
@@ -30,7 +30,7 @@ export declare function getTicketData(authorization: AuthObject, payload: {
30
30
  * A call to this function will retrieve ticket metadata information
31
31
  * about the latest opened achievement tickets on RetroAchievements.
32
32
  *
33
- * @param authorization An object containing your userName and webApiKey.
33
+ * @param authorization An object containing your username and webApiKey.
34
34
  * This can be constructed with `buildAuthorization()`.
35
35
  *
36
36
  * @param payload.count Optional. Defaults to 10. Max is 100.
@@ -54,7 +54,7 @@ export declare function getTicketData(authorization: AuthObject, payload?: Parti
54
54
  * A call to this function will retrieve the games on the site with
55
55
  * the highest count of opened achievement tickets.
56
56
  *
57
- * @param authorization An object containing your userName and webApiKey.
57
+ * @param authorization An object containing your username and webApiKey.
58
58
  * This can be constructed with `buildAuthorization()`.
59
59
  *
60
60
  * @param payload.count Optional. Defaults to 10. Max is 100.
@@ -82,31 +82,31 @@ export declare function getTicketData(authorization: AuthObject, payload: {
82
82
  * A call to this function will retrieve an achievement developer's
83
83
  * ticket stats, targeted by that developer's username.
84
84
  *
85
- * @param authorization An object containing your userName and webApiKey.
85
+ * @param authorization An object containing your username and webApiKey.
86
86
  * This can be constructed with `buildAuthorization()`.
87
87
  *
88
- * @param payload.userName The developer's account username to retrieve
88
+ * @param payload.username The developer's account username to retrieve
89
89
  * ticket stats for.
90
90
  *
91
91
  * @example
92
92
  * ```
93
93
  * const ticketData = await getTicketData(
94
94
  * authorization,
95
- * { userName: "xelnia" }
95
+ * { username: "xelnia" }
96
96
  * );
97
97
  * ```
98
98
  *
99
99
  * @returns An achievement developer's ticket stats.
100
100
  */
101
101
  export declare function getTicketData(authorization: AuthObject, payload: {
102
- userName: string;
102
+ username: string;
103
103
  }): Promise<UserTicketStats>;
104
104
  /**
105
105
  * A call to this function will retrieve a game's ticket stats, targeted
106
106
  * by the game's ID. If you are unsure of a game's ID, visit its page
107
107
  * on the RetroAchievements website and copy the number at the end of the URL.
108
108
  *
109
- * @param authorization An object containing your userName and webApiKey.
109
+ * @param authorization An object containing your username and webApiKey.
110
110
  * This can be constructed with `buildAuthorization()`.
111
111
  *
112
112
  * @param payload.gameId The game ID to fetch ticket stats for.
@@ -138,7 +138,7 @@ export declare function getTicketData(authorization: AuthObject, payload: {
138
138
  * of an achievement's ID, open its page on the RetroAchievements
139
139
  * website and copy the number at the end of the URL.
140
140
  *
141
- * @param authorization An object containing your userName and webApiKey.
141
+ * @param authorization An object containing your username and webApiKey.
142
142
  * This can be constructed with `buildAuthorization()`.
143
143
  *
144
144
  * @param payload.achievementId The ID of the achievement to fetch ticket
@@ -4,10 +4,10 @@ import type { DatedUserAchievement } from "./models";
4
4
  * A call to this function will retrieve a list of achievements
5
5
  * earned by a given user between two provided dates.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the
10
+ * @param payload.username The user for which to retrieve the
11
11
  * list of achievements for.
12
12
  *
13
13
  * @param payload.fromDate A Date object specifying when
@@ -21,7 +21,7 @@ import type { DatedUserAchievement } from "./models";
21
21
  * const achievementsEarnedBetween = await getAchievementsEarnedBetween(
22
22
  * authorization,
23
23
  * {
24
- * userName: "xelnia",
24
+ * username: "xelnia",
25
25
  * fromDate: new Date("2022-10-12"),
26
26
  * toDate: new Date("2022-10-13")
27
27
  * }
@@ -54,7 +54,7 @@ import type { DatedUserAchievement } from "./models";
54
54
  * ```
55
55
  */
56
56
  export declare const getAchievementsEarnedBetween: (authorization: AuthObject, payload: {
57
- userName: string;
57
+ username: string;
58
58
  fromDate: Date;
59
59
  toDate: Date;
60
60
  }) => Promise<DatedUserAchievement[]>;
@@ -4,10 +4,10 @@ import type { DatedUserAchievement } from "./models";
4
4
  * A call to this function will retrieve a list of achievements
5
5
  * earned by a given user on a specified date.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the
10
+ * @param payload.username The user for which to retrieve the
11
11
  * list of achievements for.
12
12
  *
13
13
  * @param payload.fromDate A Date object specifying when
@@ -21,7 +21,7 @@ import type { DatedUserAchievement } from "./models";
21
21
  * const achievementsEarnedOnDay = await getAchievementsEarnedOnDay(
22
22
  * authorization,
23
23
  * {
24
- * userName: "xelnia",
24
+ * username: "xelnia",
25
25
  * onDate: new Date("2022-10-13")
26
26
  * }
27
27
  * );
@@ -53,6 +53,6 @@ import type { DatedUserAchievement } from "./models";
53
53
  * ```
54
54
  */
55
55
  export declare const getAchievementsEarnedOnDay: (authorization: AuthObject, payload: {
56
- userName: string;
56
+ username: string;
57
57
  onDate: Date;
58
58
  }) => Promise<DatedUserAchievement[]>;
@@ -6,7 +6,7 @@ import type { GameInfoAndUserProgress } from "./models";
6
6
  * about a game, in addition to a user's progress about a game.
7
7
  * This is targeted via a game's unique ID and a given username.
8
8
  *
9
- * @param authorization An object containing your userName and webApiKey.
9
+ * @param authorization An object containing your username and webApiKey.
10
10
  * This can be constructed with `buildAuthorization()`.
11
11
  *
12
12
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -14,14 +14,17 @@ import type { GameInfoAndUserProgress } from "./models";
14
14
  * URL is https://retroachievements.org/game/14402. We can see from the
15
15
  * URL that the game ID is "14402".
16
16
  *
17
- * @param payload.userName The user for which to retrieve the
17
+ * @param payload.username The user for which to retrieve the
18
18
  * game progress for.
19
19
  *
20
+ * @param payload.shouldIncludeHighestAwardMetadata Include a "HighestAwardKind"
21
+ * and a "HighestAwardDate" for the given user and game ID.
22
+ *
20
23
  * @example
21
24
  * ```
22
25
  * const gameInfoAndUserProgress = await getGameInfoAndUserProgress(
23
26
  * authorization,
24
- * { gameId: 14402, userName: "wv_pinball" }
27
+ * { gameId: 14402, username: "wv_pinball" }
25
28
  * );
26
29
  * ```
27
30
  *
@@ -41,7 +44,7 @@ import type { GameInfoAndUserProgress } from "./models";
41
44
  * publisher: "Activision",
42
45
  * developer: "David Crane",
43
46
  * genre: "Racing",
44
- * released: 1980,
47
+ * released: "1980",
45
48
  * isFinal: false,
46
49
  * consoleName: "Atari 2600",
47
50
  * richPresencePatch: "2b92fa1bf9635c303b3b7f8feea3ed3c",
@@ -77,5 +80,6 @@ import type { GameInfoAndUserProgress } from "./models";
77
80
  */
78
81
  export declare const getGameInfoAndUserProgress: (authorization: AuthObject, payload: {
79
82
  gameId: ID;
80
- userName: string;
83
+ username: string;
84
+ shouldIncludeHighestAwardMetadata?: boolean;
81
85
  }) => Promise<GameInfoAndUserProgress>;
@@ -4,16 +4,16 @@ import type { UserAwards } from "./models";
4
4
  * A call to this function will retrieve metadata about the target user's
5
5
  * site awards, via their username.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the site awards for.
10
+ * @param payload.username The user for which to retrieve the site awards for.
11
11
  *
12
12
  * @example
13
13
  * ```
14
14
  * const userAwards = await getUserAwards(
15
15
  * authorization,
16
- * { userName: "xelnia" }
16
+ * { username: "xelnia" }
17
17
  * )
18
18
  * ```
19
19
  *
@@ -45,5 +45,5 @@ import type { UserAwards } from "./models";
45
45
  * ```
46
46
  */
47
47
  export declare const getUserAwards: (authorization: AuthObject, payload: {
48
- userName: string;
48
+ username: string;
49
49
  }) => Promise<UserAwards>;
@@ -5,17 +5,17 @@ import type { UserClaims } from "./models";
5
5
  * achievement set claims made over the lifetime of a given
6
6
  * user, targeted by their username.
7
7
  *
8
- * @param authorization An object containing your userName and webApiKey.
8
+ * @param authorization An object containing your username and webApiKey.
9
9
  * This can be constructed with `buildAuthorization()`.
10
10
  *
11
- * @param payload.userName The user for which to retrieve the historical
11
+ * @param payload.username The user for which to retrieve the historical
12
12
  * achievement set claims list for.
13
13
  *
14
14
  * @example
15
15
  * ```
16
16
  * const userClaims = await getUserClaims(
17
17
  * authorization,
18
- * { userName: "Jamiras" }
18
+ * { username: "Jamiras" }
19
19
  * );
20
20
  * ```
21
21
  *
@@ -23,5 +23,5 @@ import type { UserClaims } from "./models";
23
23
  * made over the lifetime of the given user.
24
24
  */
25
25
  export declare const getUserClaims: (authorization: AuthObject, payload: {
26
- userName: string;
26
+ username: string;
27
27
  }) => Promise<UserClaims>;
@@ -7,17 +7,17 @@ import type { UserCompletedGames } from "./models";
7
7
  * one for the hardcore completion. These are designated by
8
8
  * the `hardcoreMode` property on each completion object.
9
9
  *
10
- * @param authorization An object containing your userName and webApiKey.
10
+ * @param authorization An object containing your username and webApiKey.
11
11
  * This can be constructed with `buildAuthorization()`.
12
12
  *
13
- * @param payload.userName The user for which to retrieve the
13
+ * @param payload.username The user for which to retrieve the
14
14
  * completion metadata for.
15
15
  *
16
16
  * @example
17
17
  * ```
18
18
  * const userCompletedGames = await getUserCompletedGames(
19
19
  * authorization,
20
- * { userName: "xelnia" }
20
+ * { username: "xelnia" }
21
21
  * );
22
22
  * ```
23
23
  *
@@ -52,5 +52,5 @@ import type { UserCompletedGames } from "./models";
52
52
  * ```
53
53
  */
54
54
  export declare const getUserCompletedGames: (authorization: AuthObject, payload: {
55
- userName: string;
55
+ username: string;
56
56
  }) => Promise<UserCompletedGames>;
@@ -4,10 +4,10 @@ import type { UserCompletionProgress } from "./models";
4
4
  * A call to this function will retrieve a given user's completion
5
5
  * progress, targeted by their username.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the progress for.
10
+ * @param payload.username The user for which to retrieve the progress for.
11
11
  *
12
12
  * @param payload.offset Defaults to 0. The number of entries to skip.
13
13
  *
@@ -17,7 +17,7 @@ import type { UserCompletionProgress } from "./models";
17
17
  * ```
18
18
  * const userCompletionProgress = await getUserCompletionProgress(
19
19
  * authorization,
20
- * { userName: "xelnia" }
20
+ * { username: "xelnia" }
21
21
  * );
22
22
  * ```
23
23
  *
@@ -45,7 +45,7 @@ import type { UserCompletionProgress } from "./models";
45
45
  * ```
46
46
  */
47
47
  export declare const getUserCompletionProgress: (authorization: AuthObject, payload: {
48
- userName: string;
48
+ username: string;
49
49
  offset?: number;
50
50
  count?: number;
51
51
  }) => Promise<UserCompletionProgress>;
@@ -6,7 +6,7 @@ import type { UserGameRankAndScore } from "./models";
6
6
  * how a particular user has performed/ranked on a particular
7
7
  * game, targeted by game ID.
8
8
  *
9
- * @param authorization An object containing your userName and webApiKey.
9
+ * @param authorization An object containing your username and webApiKey.
10
10
  * This can be constructed with `buildAuthorization()`.
11
11
  *
12
12
  * @param payload.gameId The unique game ID. If you are unsure, open the
@@ -14,14 +14,14 @@ import type { UserGameRankAndScore } from "./models";
14
14
  * URL is https://retroachievements.org/game/14402. We can see from the
15
15
  * URL that the game ID is "14402".
16
16
  *
17
- * @param payload.userName The user for which to retrieve the
17
+ * @param payload.username The user for which to retrieve the
18
18
  * game ranking metadata for.
19
19
  *
20
20
  * @example
21
21
  * ```
22
22
  * const userGameRankAndScore = await getUserGameRankAndScore(
23
23
  * authorization,
24
- * { gameId: 14402, userName: "xelnia" }
24
+ * { gameId: 14402, username: "xelnia" }
25
25
  * );
26
26
  * ```
27
27
  *
@@ -41,5 +41,5 @@ import type { UserGameRankAndScore } from "./models";
41
41
  */
42
42
  export declare const getUserGameRankAndScore: (authorization: AuthObject, payload: {
43
43
  gameId: ID;
44
- userName: string;
44
+ username: string;
45
45
  }) => Promise<UserGameRankAndScore>;
@@ -4,16 +4,16 @@ import type { UserPoints } from "./models";
4
4
  * A call to this function will retrieve a given user's hardcore
5
5
  * and softcore points.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the point totals for.
10
+ * @param payload.username The user for which to retrieve the point totals for.
11
11
  *
12
12
  * @example
13
13
  * ```
14
14
  * const userPoints = await getUserPoints(
15
15
  * authorization,
16
- * { userName: "xelnia" }
16
+ * { username: "xelnia" }
17
17
  * );
18
18
  * ```
19
19
  *
@@ -26,5 +26,5 @@ import type { UserPoints } from "./models";
26
26
  * ```
27
27
  */
28
28
  export declare const getUserPoints: (authorization: AuthObject, payload: {
29
- userName: string;
29
+ username: string;
30
30
  }) => Promise<UserPoints>;
@@ -4,21 +4,21 @@ import type { UserProfile } from "./models";
4
4
  * A call to this function will retrieve summary information about
5
5
  * a given user, targeted by username.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the summary for.
10
+ * @param payload.username The user for which to retrieve the summary for.
11
11
  *
12
12
  * @example
13
13
  * ```
14
14
  * const userSummary = await getUserProfile(
15
15
  * authorization,
16
- * { userName: "xelnia" }
16
+ * { username: "xelnia" }
17
17
  * );
18
18
  * ```
19
19
  *
20
20
  * @returns An object containing profile summary metadata about a target user.
21
21
  */
22
22
  export declare const getUserProfile: (authorization: AuthObject, payload: {
23
- userName: string;
23
+ username: string;
24
24
  }) => Promise<UserProfile>;
@@ -5,10 +5,10 @@ import type { UserProgress } from "./models";
5
5
  * A call to this function will retrieve a given user's
6
6
  * progress on a given list of games, targeted by game ID.
7
7
  *
8
- * @param authorization An object containing your userName and webApiKey.
8
+ * @param authorization An object containing your username and webApiKey.
9
9
  * This can be constructed with `buildAuthorization()`.
10
10
  *
11
- * @param payload.userName The user for which to retrieve the progress for.
11
+ * @param payload.username The user for which to retrieve the progress for.
12
12
  *
13
13
  * @param payload.gameIds An array of RetroAchievements game IDs. If you aren't
14
14
  * sure of the game ID, visit the game's page on the website and copy the number
@@ -18,7 +18,7 @@ import type { UserProgress } from "./models";
18
18
  * ```
19
19
  * const userProgress = await getUserProgress(
20
20
  * authorization,
21
- * { userName: "xelnia", gameIds: [1, 14402] }
21
+ * { username: "xelnia", gameIds: [1, 14402] }
22
22
  * );
23
23
  * ```
24
24
  *
@@ -45,6 +45,6 @@ import type { UserProgress } from "./models";
45
45
  * ```
46
46
  */
47
47
  export declare const getUserProgress: (authorization: AuthObject, payload: {
48
- userName: string;
48
+ username: string;
49
49
  gameIds: ID[];
50
50
  }) => Promise<UserProgress>;
@@ -5,10 +5,10 @@ import type { UserRecentAchievement } from "./models";
5
5
  * recently earned achievements, via their username. By default, it
6
6
  * fetches achievements earned in the last hour.
7
7
  *
8
- * @param authorization An object containing your userName and webApiKey.
8
+ * @param authorization An object containing your username and webApiKey.
9
9
  * This can be constructed with `buildAuthorization()`.
10
10
  *
11
- * @param payload.userName The user for which to retrieve the recent achievements for.
11
+ * @param payload.username The user for which to retrieve the recent achievements for.
12
12
  *
13
13
  * @param payload.recentMinutes Optional. Defaults to 60. How many minutes
14
14
  * back to fetch for the given user.
@@ -17,7 +17,7 @@ import type { UserRecentAchievement } from "./models";
17
17
  * ```
18
18
  * const userRecentAchievements = await getUserRecentAchievements(
19
19
  * authorization,
20
- * { userName: "xelnia" }
20
+ * { username: "xelnia" }
21
21
  * );
22
22
  * ```
23
23
  *
@@ -44,6 +44,6 @@ import type { UserRecentAchievement } from "./models";
44
44
  * ```
45
45
  */
46
46
  export declare const getUserRecentAchievements: (authorization: AuthObject, payload: {
47
- userName: string;
47
+ username: string;
48
48
  recentMinutes?: number;
49
49
  }) => Promise<UserRecentAchievement[]>;
@@ -4,10 +4,10 @@ import type { UserRecentlyPlayedGames } from "./models";
4
4
  * A call to this function will retrieve a list of a target user's
5
5
  * recently played games, via their username.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the summary for.
10
+ * @param payload.username The user for which to retrieve the summary for.
11
11
  *
12
12
  * @param payload.count Optional. Defaults to 10. Max is 50. How many
13
13
  * recently played games for the user to retrieve.
@@ -19,7 +19,7 @@ import type { UserRecentlyPlayedGames } from "./models";
19
19
  * ```
20
20
  * const userRecentlyPlayedGames = await getUserRecentlyPlayedGames(
21
21
  * authorization,
22
- * { userName: "xelnia" }
22
+ * { username: "xelnia" }
23
23
  * );
24
24
  * ```
25
25
  *
@@ -44,7 +44,7 @@ import type { UserRecentlyPlayedGames } from "./models";
44
44
  * ```
45
45
  */
46
46
  export declare const getUserRecentlyPlayedGames: (authorization: AuthObject, payload: {
47
- userName: string;
47
+ username: string;
48
48
  offset?: number;
49
49
  count?: number;
50
50
  }) => Promise<UserRecentlyPlayedGames>;
@@ -4,10 +4,10 @@ import type { UserSummary } from "./models";
4
4
  * A call to this function will retrieve summary information about
5
5
  * a given user, targeted by username.
6
6
  *
7
- * @param authorization An object containing your userName and webApiKey.
7
+ * @param authorization An object containing your username and webApiKey.
8
8
  * This can be constructed with `buildAuthorization()`.
9
9
  *
10
- * @param payload.userName The user for which to retrieve the summary for.
10
+ * @param payload.username The user for which to retrieve the summary for.
11
11
  *
12
12
  * @param payload.recentGamesCount Optional. The number of recent games to return.
13
13
  * This defaults to 0.
@@ -19,14 +19,14 @@ import type { UserSummary } from "./models";
19
19
  * ```
20
20
  * const userSummary = await getUserSummary(
21
21
  * authorization,
22
- * { userName: "xelnia" }
22
+ * { username: "xelnia" }
23
23
  * );
24
24
  * ```
25
25
  *
26
26
  * @returns An object containing summary metadata about a target user.
27
27
  */
28
28
  export declare const getUserSummary: (authorization: AuthObject, payload: {
29
- userName: string;
29
+ username: string;
30
30
  recentGamesCount?: number;
31
31
  recentAchievementsCount?: number;
32
32
  }) => Promise<UserSummary>;