@retroachievements/api 1.2.1 → 1.4.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 (214) hide show
  1. package/README.md +38 -49
  2. package/dist/__playground.d.ts +8 -8
  3. package/dist/achievement/getAchievementUnlocks.d.ts +46 -46
  4. package/dist/achievement/getAchievementUnlocks.test.d.ts +1 -1
  5. package/dist/achievement/index.d.ts +2 -2
  6. package/dist/achievement/models/achievement-unlock-entity.model.d.ts +29 -29
  7. package/dist/achievement/models/get-achievement-unlocks-response.model.d.ts +30 -30
  8. package/dist/achievement/models/index.d.ts +2 -2
  9. package/dist/api.cjs +1 -1
  10. package/dist/api.cjs.map +1 -1
  11. package/dist/api.modern.js +1 -1
  12. package/dist/api.modern.js.map +1 -1
  13. package/dist/api.module.js +1 -1
  14. package/dist/api.module.js.map +1 -1
  15. package/dist/api.umd.js +1 -1
  16. package/dist/api.umd.js.map +1 -1
  17. package/dist/console/getConsoleIds.d.ts +22 -22
  18. package/dist/console/getConsoleIds.test.d.ts +1 -1
  19. package/dist/console/getGameList.d.ts +53 -53
  20. package/dist/console/getGameList.test.d.ts +1 -1
  21. package/dist/console/index.d.ts +3 -3
  22. package/dist/console/models/console-id.model.d.ts +4 -4
  23. package/dist/console/models/game-list.model.d.ts +15 -15
  24. package/dist/console/models/get-console-ids-response.model.d.ts +4 -4
  25. package/dist/console/models/get-game-list-response.model.d.ts +15 -15
  26. package/dist/console/models/index.d.ts +4 -4
  27. package/dist/feed/getAchievementOfTheWeek.d.ts +48 -48
  28. package/dist/feed/getAchievementOfTheWeek.test.d.ts +1 -1
  29. package/dist/feed/getActiveClaims.d.ts +40 -40
  30. package/dist/feed/getActiveClaims.test.d.ts +1 -1
  31. package/dist/feed/getClaims.d.ts +7 -7
  32. package/dist/feed/getClaims.test.d.ts +1 -1
  33. package/dist/feed/getTopTenUsers.d.ts +24 -24
  34. package/dist/feed/getTopTenUsers.test.d.ts +1 -1
  35. package/dist/feed/index.d.ts +5 -5
  36. package/dist/feed/models/achievement-of-the-week.model.d.ts +32 -32
  37. package/dist/feed/models/claim-set-type.enum.d.ts +4 -4
  38. package/dist/feed/models/claim-status.enum.d.ts +5 -5
  39. package/dist/feed/models/claim-type.enum.d.ts +4 -4
  40. package/dist/feed/models/get-achievement-of-the-week-response.model.d.ts +32 -32
  41. package/dist/feed/models/get-set-claims-response.model.d.ts +21 -21
  42. package/dist/feed/models/get-top-ten-users-response.model.d.ts +10 -10
  43. package/dist/feed/models/index.d.ts +10 -10
  44. package/dist/feed/models/set-claim.model.d.ts +43 -43
  45. package/dist/feed/models/top-ten-users-entity.model.d.ts +5 -5
  46. package/dist/feed/models/top-ten-users.model.d.ts +2 -2
  47. package/dist/game/getAchievementCount.d.ts +32 -32
  48. package/dist/game/getAchievementCount.test.d.ts +1 -1
  49. package/dist/game/getAchievementDistribution.d.ts +58 -58
  50. package/dist/game/getAchievementDistribution.test.d.ts +1 -1
  51. package/dist/game/getGame.d.ts +49 -49
  52. package/dist/game/getGame.test.d.ts +1 -1
  53. package/dist/game/getGameExtended.d.ts +70 -69
  54. package/dist/game/getGameExtended.test.d.ts +1 -1
  55. package/dist/game/getGameRankAndScore.d.ts +39 -39
  56. package/dist/game/getGameRankAndScore.test.d.ts +1 -1
  57. package/dist/game/getGameRating.d.ts +39 -39
  58. package/dist/game/getGameRating.test.d.ts +1 -1
  59. package/dist/game/index.d.ts +7 -7
  60. package/dist/game/models/achievement-count.model.d.ts +4 -4
  61. package/dist/game/models/achievement-distribution-flags.enum.d.ts +4 -4
  62. package/dist/game/models/game-extended-achievement-entity.model.d.ts +15 -15
  63. package/dist/game/models/game-extended-claim-entity.model.d.ts +7 -7
  64. package/dist/game/models/game-extended.model.d.ts +25 -25
  65. package/dist/game/models/game-rank-and-score-entity.model.d.ts +6 -6
  66. package/dist/game/models/game-rating.model.d.ts +9 -9
  67. package/dist/game/models/game.model.d.ts +19 -19
  68. package/dist/game/models/get-achievement-count-response.model.d.ts +4 -4
  69. package/dist/game/models/get-achievement-distribution-response.model.d.ts +1 -1
  70. package/dist/game/models/get-game-extended-response.model.d.ts +50 -50
  71. package/dist/game/models/get-game-rank-and-score-response.model.d.ts +8 -8
  72. package/dist/game/models/get-game-rating-response.model.d.ts +9 -9
  73. package/dist/game/models/get-game-response.model.d.ts +19 -19
  74. package/dist/game/models/index.d.ts +14 -14
  75. package/dist/index.d.ts +7 -7
  76. package/dist/ticket/getTicketData.d.ts +159 -159
  77. package/dist/ticket/getTicketData.test.d.ts +1 -1
  78. package/dist/ticket/index.d.ts +2 -2
  79. package/dist/ticket/models/achievement-ticket-stats-response.model.d.ts +7 -7
  80. package/dist/ticket/models/achievement-ticket-stats.model.d.ts +7 -7
  81. package/dist/ticket/models/game-ticket-stats.model.d.ts +9 -9
  82. package/dist/ticket/models/game-tickets-response.model.d.ts +7 -7
  83. package/dist/ticket/models/index.d.ts +12 -12
  84. package/dist/ticket/models/most-ticketed-games-response.model.d.ts +12 -12
  85. package/dist/ticket/models/most-ticketed-games.model.d.ts +11 -11
  86. package/dist/ticket/models/recent-tickets-response.model.d.ts +6 -6
  87. package/dist/ticket/models/recent-tickets.model.d.ts +6 -6
  88. package/dist/ticket/models/response-ticket-entity.model.d.ts +24 -24
  89. package/dist/ticket/models/ticket-entity.model.d.ts +24 -24
  90. package/dist/ticket/models/tickets-by-user-response.model.d.ts +8 -8
  91. package/dist/ticket/models/user-ticket-stats.model.d.ts +8 -8
  92. package/dist/user/getAchievementsEarnedBetween.d.ts +59 -59
  93. package/dist/user/getAchievementsEarnedBetween.test.d.ts +1 -1
  94. package/dist/user/getAchievementsEarnedOnDay.d.ts +57 -57
  95. package/dist/user/getAchievementsEarnedOnDay.test.d.ts +1 -1
  96. package/dist/user/getGameInfoAndUserProgress.d.ts +81 -81
  97. package/dist/user/getGameInfoAndUserProgress.test.d.ts +1 -1
  98. package/dist/user/getUserAwards.d.ts +49 -47
  99. package/dist/user/getUserAwards.test.d.ts +1 -1
  100. package/dist/user/getUserClaims.d.ts +27 -27
  101. package/dist/user/getUserClaims.test.d.ts +1 -1
  102. package/dist/user/getUserCompletedGames.d.ts +56 -56
  103. package/dist/user/getUserCompletedGames.test.d.ts +1 -1
  104. package/dist/user/getUserCompletionProgress.d.ts +51 -0
  105. package/dist/user/getUserCompletionProgress.test.d.ts +1 -0
  106. package/dist/user/getUserGameRankAndScore.d.ts +45 -45
  107. package/dist/user/getUserGameRankAndScore.test.d.ts +1 -1
  108. package/dist/user/getUserPoints.d.ts +30 -30
  109. package/dist/user/getUserPoints.test.d.ts +1 -1
  110. package/dist/user/getUserProfile.d.ts +24 -0
  111. package/dist/user/getUserProfile.test.d.ts +1 -0
  112. package/dist/user/getUserProgress.d.ts +50 -50
  113. package/dist/user/getUserProgress.test.d.ts +1 -1
  114. package/dist/user/getUserRecentAchievements.d.ts +49 -49
  115. package/dist/user/getUserRecentAchievements.test.d.ts +1 -1
  116. package/dist/user/getUserRecentlyPlayedGames.d.ts +50 -50
  117. package/dist/user/getUserRecentlyPlayedGames.test.d.ts +1 -1
  118. package/dist/user/getUserSummary.d.ts +32 -32
  119. package/dist/user/getUserSummary.test.d.ts +1 -1
  120. package/dist/user/index.d.ts +15 -13
  121. package/dist/user/models/award-type.model.d.ts +1 -1
  122. package/dist/user/models/dated-user-achievement.model.d.ts +17 -17
  123. package/dist/user/models/dated-user-achievements-response.model.d.ts +19 -19
  124. package/dist/user/models/game-info-and-user-progress.model.d.ts +12 -12
  125. package/dist/user/models/get-game-info-and-user-progress-response.model.d.ts +14 -14
  126. package/dist/user/models/get-user-awards-response.model.d.ts +24 -22
  127. package/dist/user/models/get-user-completed-games-response.model.d.ts +13 -13
  128. package/dist/user/models/get-user-completion-progress-response.model.d.ts +19 -0
  129. package/dist/user/models/get-user-game-rank-and-score-response.model.d.ts +8 -8
  130. package/dist/user/models/get-user-points-response.model.d.ts +4 -4
  131. package/dist/user/models/get-user-profile-response.model.d.ts +17 -0
  132. package/dist/user/models/get-user-progress-response.model.d.ts +10 -10
  133. package/dist/user/models/get-user-recent-achievements-response.model.d.ts +18 -18
  134. package/dist/user/models/get-user-recently-played-games-response.model.d.ts +17 -17
  135. package/dist/user/models/get-user-summary-response.model.d.ts +82 -82
  136. package/dist/user/models/index.d.ts +28 -23
  137. package/dist/user/models/user-awards.model.d.ts +24 -22
  138. package/dist/user/models/user-claims-response.model.d.ts +19 -19
  139. package/dist/user/models/user-claims.model.d.ts +19 -19
  140. package/dist/user/models/user-completed-games.model.d.ts +12 -12
  141. package/dist/user/models/user-completion-progress-entity.model.d.ts +13 -0
  142. package/dist/user/models/user-completion-progress.model.d.ts +6 -0
  143. package/dist/user/models/user-game-rank-and-score.model.d.ts +7 -7
  144. package/dist/user/models/user-points.model.d.ts +4 -4
  145. package/dist/user/models/user-profile.model.d.ts +17 -0
  146. package/dist/user/models/user-progress.model.d.ts +9 -9
  147. package/dist/user/models/user-recent-achievement.model.d.ts +16 -16
  148. package/dist/user/models/user-recently-played-games.model.d.ts +16 -16
  149. package/dist/user/models/user-summary.model.d.ts +82 -82
  150. package/dist/utils/internal/apiBaseUrl.d.ts +1 -1
  151. package/dist/utils/internal/buildRequestUrl.d.ts +2 -2
  152. package/dist/utils/internal/buildRequestUrl.test.d.ts +1 -1
  153. package/dist/utils/internal/call.d.ts +11 -20
  154. package/dist/utils/internal/call.test.d.ts +1 -1
  155. package/dist/utils/internal/id.model.d.ts +1 -1
  156. package/dist/utils/internal/index.d.ts +5 -5
  157. package/dist/utils/internal/serializeProperties.d.ts +4 -4
  158. package/dist/utils/internal/serializeProperties.test.d.ts +1 -1
  159. package/dist/utils/public/buildAuthorization.d.ts +22 -22
  160. package/dist/utils/public/buildAuthorization.test.d.ts +1 -1
  161. package/dist/utils/public/index.d.ts +3 -3
  162. package/dist/utils/public/models/auth-object.model.d.ts +19 -19
  163. package/dist/utils/public/models/index.d.ts +1 -1
  164. package/package.json +24 -31
  165. package/src/achievement/getAchievementUnlocks.test.ts +9 -12
  166. package/src/console/getConsoleIds.test.ts +3 -3
  167. package/src/console/getGameList.test.ts +3 -3
  168. package/src/feed/getAchievementOfTheWeek.test.ts +5 -5
  169. package/src/feed/getActiveClaims.test.ts +3 -3
  170. package/src/feed/getClaims.test.ts +3 -3
  171. package/src/feed/getTopTenUsers.test.ts +3 -3
  172. package/src/game/getAchievementCount.test.ts +3 -3
  173. package/src/game/getAchievementDistribution.test.ts +33 -44
  174. package/src/game/getGame.test.ts +4 -4
  175. package/src/game/getGame.ts +2 -8
  176. package/src/game/getGameExtended.test.ts +4 -4
  177. package/src/game/getGameExtended.ts +13 -8
  178. package/src/game/getGameRankAndScore.test.ts +3 -3
  179. package/src/game/getGameRating.test.ts +3 -3
  180. package/src/game/models/game-extended.model.ts +1 -1
  181. package/src/game/models/game.model.ts +1 -1
  182. package/src/ticket/getTicketData.test.ts +13 -13
  183. package/src/user/getAchievementsEarnedBetween.test.ts +3 -4
  184. package/src/user/getAchievementsEarnedOnDay.test.ts +3 -4
  185. package/src/user/getGameInfoAndUserProgress.test.ts +3 -4
  186. package/src/user/getUserAwards.test.ts +7 -3
  187. package/src/user/getUserAwards.ts +2 -0
  188. package/src/user/getUserClaims.test.ts +3 -3
  189. package/src/user/getUserCompletedGames.test.ts +3 -3
  190. package/src/user/getUserCompletionProgress.test.ts +81 -0
  191. package/src/user/getUserCompletionProgress.ts +83 -0
  192. package/src/user/getUserGameRankAndScore.test.ts +3 -3
  193. package/src/user/getUserPoints.test.ts +3 -3
  194. package/src/user/getUserProfile.test.ts +79 -0
  195. package/src/user/getUserProfile.ts +55 -0
  196. package/src/user/getUserProgress.test.ts +3 -3
  197. package/src/user/getUserRecentAchievements.test.ts +3 -4
  198. package/src/user/getUserRecentlyPlayedGames.test.ts +3 -4
  199. package/src/user/getUserSummary.test.ts +5 -5
  200. package/src/user/getUserSummary.ts +1 -3
  201. package/src/user/index.ts +2 -0
  202. package/src/user/models/award-type.model.ts +5 -4
  203. package/src/user/models/get-user-awards-response.model.ts +2 -0
  204. package/src/user/models/get-user-completion-progress-response.model.ts +25 -0
  205. package/src/user/models/get-user-profile-response.model.ts +17 -0
  206. package/src/user/models/index.ts +5 -0
  207. package/src/user/models/user-awards.model.ts +2 -0
  208. package/src/user/models/user-completion-progress-entity.model.ts +19 -0
  209. package/src/user/models/user-completion-progress.model.ts +7 -0
  210. package/src/user/models/user-profile.model.ts +17 -0
  211. package/src/utils/internal/buildRequestUrl.ts +1 -1
  212. package/src/utils/internal/call.test.ts +9 -10
  213. package/src/utils/internal/call.ts +1 -12
  214. package/src/utils/internal/serializeProperties.ts +4 -4
@@ -1,56 +1,56 @@
1
- import type { AuthObject } from "../utils/public";
2
- import type { UserCompletedGames } from "./models";
3
- /**
4
- * A call to this function will retrieve completion metadata
5
- * about the games a given user has played. It returns two
6
- * entries per each game: one for the softcore completion and
7
- * one for the hardcore completion. These are designated by
8
- * the `hardcoreMode` property on each completion object.
9
- *
10
- * @param authorization An object containing your userName and webApiKey.
11
- * This can be constructed with `buildAuthorization()`.
12
- *
13
- * @param payload.userName The user for which to retrieve the
14
- * completion metadata for.
15
- *
16
- * @example
17
- * ```
18
- * const userCompletedGames = await getUserCompletedGames(
19
- * authorization,
20
- * { userName: "xelnia" }
21
- * );
22
- * ```
23
- *
24
- * @returns An array containing completion metadata objects
25
- * for a given user. Each game contains two completion records,
26
- * one for softcore and another for hardcore.
27
- * ```json
28
- * [
29
- * {
30
- * gameId: 14976,
31
- * title: 'Mortal Kombat',
32
- * imageIcon: '/Images/036812.png',
33
- * consoleId: 27,
34
- * consoleName: 'Arcade',
35
- * maxPossible: 35,
36
- * numAwarded: 13,
37
- * pctWon: 0.3714,
38
- * hardcoreMode: false
39
- * },
40
- * {
41
- * gameId: 14976,
42
- * title: 'Mortal Kombat',
43
- * imageIcon: '/Images/036812.png',
44
- * consoleId: 27,
45
- * consoleName: 'Arcade',
46
- * maxPossible: 35,
47
- * numAwarded: 13,
48
- * pctWon: 0.3714,
49
- * hardcoreMode: true
50
- * },
51
- * ]
52
- * ```
53
- */
54
- export declare const getUserCompletedGames: (authorization: AuthObject, payload: {
55
- userName: string;
56
- }) => Promise<UserCompletedGames>;
1
+ import type { AuthObject } from "../utils/public";
2
+ import type { UserCompletedGames } from "./models";
3
+ /**
4
+ * A call to this function will retrieve completion metadata
5
+ * about the games a given user has played. It returns two
6
+ * entries per each game: one for the softcore completion and
7
+ * one for the hardcore completion. These are designated by
8
+ * the `hardcoreMode` property on each completion object.
9
+ *
10
+ * @param authorization An object containing your userName and webApiKey.
11
+ * This can be constructed with `buildAuthorization()`.
12
+ *
13
+ * @param payload.userName The user for which to retrieve the
14
+ * completion metadata for.
15
+ *
16
+ * @example
17
+ * ```
18
+ * const userCompletedGames = await getUserCompletedGames(
19
+ * authorization,
20
+ * { userName: "xelnia" }
21
+ * );
22
+ * ```
23
+ *
24
+ * @returns An array containing completion metadata objects
25
+ * for a given user. Each game contains two completion records,
26
+ * one for softcore and another for hardcore.
27
+ * ```json
28
+ * [
29
+ * {
30
+ * gameId: 14976,
31
+ * title: 'Mortal Kombat',
32
+ * imageIcon: '/Images/036812.png',
33
+ * consoleId: 27,
34
+ * consoleName: 'Arcade',
35
+ * maxPossible: 35,
36
+ * numAwarded: 13,
37
+ * pctWon: 0.3714,
38
+ * hardcoreMode: false
39
+ * },
40
+ * {
41
+ * gameId: 14976,
42
+ * title: 'Mortal Kombat',
43
+ * imageIcon: '/Images/036812.png',
44
+ * consoleId: 27,
45
+ * consoleName: 'Arcade',
46
+ * maxPossible: 35,
47
+ * numAwarded: 13,
48
+ * pctWon: 0.3714,
49
+ * hardcoreMode: true
50
+ * },
51
+ * ]
52
+ * ```
53
+ */
54
+ export declare const getUserCompletedGames: (authorization: AuthObject, payload: {
55
+ userName: string;
56
+ }) => Promise<UserCompletedGames>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -0,0 +1,51 @@
1
+ import type { AuthObject } from "../utils/public";
2
+ import type { UserCompletionProgress } from "./models";
3
+ /**
4
+ * A call to this function will retrieve a given user's completion
5
+ * progress, targeted by their username.
6
+ *
7
+ * @param authorization An object containing your userName and webApiKey.
8
+ * This can be constructed with `buildAuthorization()`.
9
+ *
10
+ * @param payload.userName The user for which to retrieve the progress for.
11
+ *
12
+ * @param payload.offset Defaults to 0. The number of entries to skip.
13
+ *
14
+ * @param payload.count Defaults to 100, has a max of 500.
15
+ *
16
+ * @example
17
+ * ```
18
+ * const userCompletionProgress = await getUserCompletionProgress(
19
+ * authorization,
20
+ * { userName: "xelnia" }
21
+ * );
22
+ * ```
23
+ *
24
+ * @returns
25
+ * ```
26
+ * {
27
+ * "count": 100,
28
+ * "total": 752,
29
+ * "results": [
30
+ * {
31
+ gameId: 11406,
32
+ title: 'Mortal Kombat 4',
33
+ imageIcon: '/Images/042133.png',
34
+ consoleId: 12,
35
+ consoleName: 'PlayStation',
36
+ maxPossible: 131,
37
+ numAwarded: 131,
38
+ numAwardedHardcore: 131,
39
+ mostRecentAwardedDate: '2022-08-07T18:24:44+00:00',
40
+ highestAwardKind: 'mastered',
41
+ highestAwardDate: '2022-08-07T18:24:44+00:00'
42
+ * }
43
+ * ]
44
+ * }
45
+ * ```
46
+ */
47
+ export declare const getUserCompletionProgress: (authorization: AuthObject, payload: {
48
+ userName: string;
49
+ offset?: number;
50
+ count?: number;
51
+ }) => Promise<UserCompletionProgress>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,45 +1,45 @@
1
- import type { ID } from "../utils/internal";
2
- import type { AuthObject } from "../utils/public";
3
- import type { UserGameRankAndScore } from "./models";
4
- /**
5
- * A call to this function will retrieve metadata about
6
- * how a particular user has performed/ranked on a particular
7
- * game, targeted by game ID.
8
- *
9
- * @param authorization An object containing your userName and webApiKey.
10
- * This can be constructed with `buildAuthorization()`.
11
- *
12
- * @param payload.gameId The unique game ID. If you are unsure, open the
13
- * game's page on the RetroAchievements.org website. For example, Dragster's
14
- * URL is https://retroachievements.org/game/14402. We can see from the
15
- * URL that the game ID is "14402".
16
- *
17
- * @param payload.userName The user for which to retrieve the
18
- * game ranking metadata for.
19
- *
20
- * @example
21
- * ```
22
- * const userGameRankAndScore = await getUserGameRankAndScore(
23
- * authorization,
24
- * { gameId: 14402, userName: "xelnia" }
25
- * );
26
- * ```
27
- *
28
- * @returns An array containing metadata about the user's
29
- * rank and score for the target game ID. If metadata
30
- * cannot be found, the array is empty.
31
- * ```json
32
- * [
33
- * {
34
- * user: "xelnia",
35
- * totalScore: 378,
36
- * lastAward: "2022-09-01 21:51:23",
37
- * userRank: 3
38
- * }
39
- * ]
40
- * ```
41
- */
42
- export declare const getUserGameRankAndScore: (authorization: AuthObject, payload: {
43
- gameId: ID;
44
- userName: string;
45
- }) => Promise<UserGameRankAndScore>;
1
+ import type { ID } from "../utils/internal";
2
+ import type { AuthObject } from "../utils/public";
3
+ import type { UserGameRankAndScore } from "./models";
4
+ /**
5
+ * A call to this function will retrieve metadata about
6
+ * how a particular user has performed/ranked on a particular
7
+ * game, targeted by game ID.
8
+ *
9
+ * @param authorization An object containing your userName and webApiKey.
10
+ * This can be constructed with `buildAuthorization()`.
11
+ *
12
+ * @param payload.gameId The unique game ID. If you are unsure, open the
13
+ * game's page on the RetroAchievements.org website. For example, Dragster's
14
+ * URL is https://retroachievements.org/game/14402. We can see from the
15
+ * URL that the game ID is "14402".
16
+ *
17
+ * @param payload.userName The user for which to retrieve the
18
+ * game ranking metadata for.
19
+ *
20
+ * @example
21
+ * ```
22
+ * const userGameRankAndScore = await getUserGameRankAndScore(
23
+ * authorization,
24
+ * { gameId: 14402, userName: "xelnia" }
25
+ * );
26
+ * ```
27
+ *
28
+ * @returns An array containing metadata about the user's
29
+ * rank and score for the target game ID. If metadata
30
+ * cannot be found, the array is empty.
31
+ * ```json
32
+ * [
33
+ * {
34
+ * user: "xelnia",
35
+ * totalScore: 378,
36
+ * lastAward: "2022-09-01 21:51:23",
37
+ * userRank: 3
38
+ * }
39
+ * ]
40
+ * ```
41
+ */
42
+ export declare const getUserGameRankAndScore: (authorization: AuthObject, payload: {
43
+ gameId: ID;
44
+ userName: string;
45
+ }) => Promise<UserGameRankAndScore>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,30 +1,30 @@
1
- import type { AuthObject } from "../utils/public";
2
- import type { UserPoints } from "./models";
3
- /**
4
- * A call to this function will retrieve a given user's hardcore
5
- * and softcore points.
6
- *
7
- * @param authorization An object containing your userName and webApiKey.
8
- * This can be constructed with `buildAuthorization()`.
9
- *
10
- * @param payload.userName The user for which to retrieve the point totals for.
11
- *
12
- * @example
13
- * ```
14
- * const userPoints = await getUserPoints(
15
- * authorization,
16
- * { userName: "xelnia" }
17
- * );
18
- * ```
19
- *
20
- * @returns An object containing metadata about a target user's points.
21
- * ```json
22
- * {
23
- * points: 7640,
24
- * softcorePoints: 25
25
- * }
26
- * ```
27
- */
28
- export declare const getUserPoints: (authorization: AuthObject, payload: {
29
- userName: string;
30
- }) => Promise<UserPoints>;
1
+ import type { AuthObject } from "../utils/public";
2
+ import type { UserPoints } from "./models";
3
+ /**
4
+ * A call to this function will retrieve a given user's hardcore
5
+ * and softcore points.
6
+ *
7
+ * @param authorization An object containing your userName and webApiKey.
8
+ * This can be constructed with `buildAuthorization()`.
9
+ *
10
+ * @param payload.userName The user for which to retrieve the point totals for.
11
+ *
12
+ * @example
13
+ * ```
14
+ * const userPoints = await getUserPoints(
15
+ * authorization,
16
+ * { userName: "xelnia" }
17
+ * );
18
+ * ```
19
+ *
20
+ * @returns An object containing metadata about a target user's points.
21
+ * ```json
22
+ * {
23
+ * points: 7640,
24
+ * softcorePoints: 25
25
+ * }
26
+ * ```
27
+ */
28
+ export declare const getUserPoints: (authorization: AuthObject, payload: {
29
+ userName: string;
30
+ }) => Promise<UserPoints>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { AuthObject } from "../utils/public";
2
+ import type { UserProfile } from "./models";
3
+ /**
4
+ * A call to this function will retrieve summary information about
5
+ * a given user, targeted by username.
6
+ *
7
+ * @param authorization An object containing your userName and webApiKey.
8
+ * This can be constructed with `buildAuthorization()`.
9
+ *
10
+ * @param payload.userName The user for which to retrieve the summary for.
11
+ *
12
+ * @example
13
+ * ```
14
+ * const userSummary = await getUserProfile(
15
+ * authorization,
16
+ * { userName: "xelnia" }
17
+ * );
18
+ * ```
19
+ *
20
+ * @returns An object containing profile summary metadata about a target user.
21
+ */
22
+ export declare const getUserProfile: (authorization: AuthObject, payload: {
23
+ userName: string;
24
+ }) => Promise<UserProfile>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,50 +1,50 @@
1
- import type { ID } from "../utils/internal";
2
- import type { AuthObject } from "../utils/public";
3
- import type { UserProgress } from "./models";
4
- /**
5
- * A call to this function will retrieve a given user's
6
- * progress on a given list of games, targeted by game ID.
7
- *
8
- * @param authorization An object containing your userName and webApiKey.
9
- * This can be constructed with `buildAuthorization()`.
10
- *
11
- * @param payload.userName The user for which to retrieve the progress for.
12
- *
13
- * @param payload.gameIds An array of RetroAchievements game IDs. If you aren't
14
- * sure of the game ID, visit the game's page on the website and copy the number
15
- * at the end of the URL.
16
- *
17
- * @example
18
- * ```
19
- * const userProgress = await getUserProgress(
20
- * authorization,
21
- * { userName: "xelnia", gameIds: [1, 14402] }
22
- * );
23
- * ```
24
- *
25
- * @returns An object which is a map of summarized progress for games.
26
- * ```json
27
- * {
28
- * "1": {
29
- * numPossibleAchievements: 24,
30
- * possibleScore: 255,
31
- * numAchieved: 0,
32
- * scoreAchieved: 0,
33
- * numAchievedHardcore: 0,
34
- * scoreAchievedHardcore: 0
35
- * },
36
- * "14402": {
37
- * numPossibleAchievements: 24,
38
- * possibleScore: 255,
39
- * numAchieved: 0,
40
- * scoreAchieved: 0,
41
- * numAchievedHardcore: 0,
42
- * scoreAchievedHardcore: 0
43
- * }
44
- * }
45
- * ```
46
- */
47
- export declare const getUserProgress: (authorization: AuthObject, payload: {
48
- userName: string;
49
- gameIds: ID[];
50
- }) => Promise<UserProgress>;
1
+ import type { ID } from "../utils/internal";
2
+ import type { AuthObject } from "../utils/public";
3
+ import type { UserProgress } from "./models";
4
+ /**
5
+ * A call to this function will retrieve a given user's
6
+ * progress on a given list of games, targeted by game ID.
7
+ *
8
+ * @param authorization An object containing your userName and webApiKey.
9
+ * This can be constructed with `buildAuthorization()`.
10
+ *
11
+ * @param payload.userName The user for which to retrieve the progress for.
12
+ *
13
+ * @param payload.gameIds An array of RetroAchievements game IDs. If you aren't
14
+ * sure of the game ID, visit the game's page on the website and copy the number
15
+ * at the end of the URL.
16
+ *
17
+ * @example
18
+ * ```
19
+ * const userProgress = await getUserProgress(
20
+ * authorization,
21
+ * { userName: "xelnia", gameIds: [1, 14402] }
22
+ * );
23
+ * ```
24
+ *
25
+ * @returns An object which is a map of summarized progress for games.
26
+ * ```json
27
+ * {
28
+ * "1": {
29
+ * numPossibleAchievements: 24,
30
+ * possibleScore: 255,
31
+ * numAchieved: 0,
32
+ * scoreAchieved: 0,
33
+ * numAchievedHardcore: 0,
34
+ * scoreAchievedHardcore: 0
35
+ * },
36
+ * "14402": {
37
+ * numPossibleAchievements: 24,
38
+ * possibleScore: 255,
39
+ * numAchieved: 0,
40
+ * scoreAchieved: 0,
41
+ * numAchievedHardcore: 0,
42
+ * scoreAchievedHardcore: 0
43
+ * }
44
+ * }
45
+ * ```
46
+ */
47
+ export declare const getUserProgress: (authorization: AuthObject, payload: {
48
+ userName: string;
49
+ gameIds: ID[];
50
+ }) => Promise<UserProgress>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,49 +1,49 @@
1
- import type { AuthObject } from "../utils/public";
2
- import type { UserRecentAchievement } from "./models";
3
- /**
4
- * A call to this function will retrieve a list of a target user's
5
- * recently earned achievements, via their username. By default, it
6
- * fetches achievements earned in the last hour.
7
- *
8
- * @param authorization An object containing your userName and webApiKey.
9
- * This can be constructed with `buildAuthorization()`.
10
- *
11
- * @param payload.userName The user for which to retrieve the recent achievements for.
12
- *
13
- * @param payload.recentMinutes Optional. Defaults to 60. How many minutes
14
- * back to fetch for the given user.
15
- *
16
- * @example
17
- * ```
18
- * const userRecentAchievements = await getUserRecentAchievements(
19
- * authorization,
20
- * { userName: "xelnia" }
21
- * );
22
- * ```
23
- *
24
- * @returns An array containing metadata about a user's recently earned achievements.
25
- * ```json
26
- * [
27
- * {
28
- * date: '2023-05-23 22:32:24',
29
- * hardcoreMode: true,
30
- * achievementId: 51214,
31
- * title: "You're a special Champ!",
32
- * description: 'Win the Tournament as [You] on Hard with 1 attribute on max. and 1 attribute on min.',
33
- * badgeName: '121991',
34
- * points: 25,
35
- * author: 'Som1',
36
- * gameTitle: 'WWF King of the Ring',
37
- * gameIcon: '/Images/062599.png',
38
- * gameId: 6316,
39
- * consoleName: 'Game Boy',
40
- * badgeUrl: '/Badge/121991.png',
41
- * gameUrl: '/game/6316'
42
- * }
43
- * ]
44
- * ```
45
- */
46
- export declare const getUserRecentAchievements: (authorization: AuthObject, payload: {
47
- userName: string;
48
- recentMinutes?: number;
49
- }) => Promise<UserRecentAchievement[]>;
1
+ import type { AuthObject } from "../utils/public";
2
+ import type { UserRecentAchievement } from "./models";
3
+ /**
4
+ * A call to this function will retrieve a list of a target user's
5
+ * recently earned achievements, via their username. By default, it
6
+ * fetches achievements earned in the last hour.
7
+ *
8
+ * @param authorization An object containing your userName and webApiKey.
9
+ * This can be constructed with `buildAuthorization()`.
10
+ *
11
+ * @param payload.userName The user for which to retrieve the recent achievements for.
12
+ *
13
+ * @param payload.recentMinutes Optional. Defaults to 60. How many minutes
14
+ * back to fetch for the given user.
15
+ *
16
+ * @example
17
+ * ```
18
+ * const userRecentAchievements = await getUserRecentAchievements(
19
+ * authorization,
20
+ * { userName: "xelnia" }
21
+ * );
22
+ * ```
23
+ *
24
+ * @returns An array containing metadata about a user's recently earned achievements.
25
+ * ```json
26
+ * [
27
+ * {
28
+ * date: '2023-05-23 22:32:24',
29
+ * hardcoreMode: true,
30
+ * achievementId: 51214,
31
+ * title: "You're a special Champ!",
32
+ * description: 'Win the Tournament as [You] on Hard with 1 attribute on max. and 1 attribute on min.',
33
+ * badgeName: '121991',
34
+ * points: 25,
35
+ * author: 'Som1',
36
+ * gameTitle: 'WWF King of the Ring',
37
+ * gameIcon: '/Images/062599.png',
38
+ * gameId: 6316,
39
+ * consoleName: 'Game Boy',
40
+ * badgeUrl: '/Badge/121991.png',
41
+ * gameUrl: '/game/6316'
42
+ * }
43
+ * ]
44
+ * ```
45
+ */
46
+ export declare const getUserRecentAchievements: (authorization: AuthObject, payload: {
47
+ userName: string;
48
+ recentMinutes?: number;
49
+ }) => Promise<UserRecentAchievement[]>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,50 +1,50 @@
1
- import type { AuthObject } from "../utils/public";
2
- import type { UserRecentlyPlayedGames } from "./models";
3
- /**
4
- * A call to this function will retrieve a list of a target user's
5
- * recently played games, via their username.
6
- *
7
- * @param authorization An object containing your userName and webApiKey.
8
- * This can be constructed with `buildAuthorization()`.
9
- *
10
- * @param payload.userName The user for which to retrieve the summary for.
11
- *
12
- * @param payload.count Optional. Defaults to 10. Max is 50. How many
13
- * recently played games for the user to retrieve.
14
- *
15
- * @param payload.offset Optional. Defaults to 0. Number of recently played
16
- * game entries to skip. This can be used for pagination.
17
- *
18
- * @example
19
- * ```
20
- * const userRecentlyPlayedGames = await getUserRecentlyPlayedGames(
21
- * authorization,
22
- * { userName: "xelnia" }
23
- * );
24
- * ```
25
- *
26
- * @returns An array containing metadata about a user's recently played games.
27
- * ```json
28
- * [
29
- * {
30
- * gameId: 19010,
31
- * consoleId: 21,
32
- * consoleName: "PlayStation 2",
33
- * title: "Simpsons, The: Hit & Run",
34
- * imageIcon: "/Images/066024.png",
35
- * lastPlayed: "2022-10-24 22:05:12",
36
- * numPossibleAchievements: 131,
37
- * possibleScore: 865,
38
- * numAchieved: 23,
39
- * scoreAchieved: 84,
40
- * numAchievedHardcore: 23,
41
- * scoreAchievedHardcore: 84
42
- * }
43
- * ]
44
- * ```
45
- */
46
- export declare const getUserRecentlyPlayedGames: (authorization: AuthObject, payload: {
47
- userName: string;
48
- offset?: number;
49
- count?: number;
50
- }) => Promise<UserRecentlyPlayedGames>;
1
+ import type { AuthObject } from "../utils/public";
2
+ import type { UserRecentlyPlayedGames } from "./models";
3
+ /**
4
+ * A call to this function will retrieve a list of a target user's
5
+ * recently played games, via their username.
6
+ *
7
+ * @param authorization An object containing your userName and webApiKey.
8
+ * This can be constructed with `buildAuthorization()`.
9
+ *
10
+ * @param payload.userName The user for which to retrieve the summary for.
11
+ *
12
+ * @param payload.count Optional. Defaults to 10. Max is 50. How many
13
+ * recently played games for the user to retrieve.
14
+ *
15
+ * @param payload.offset Optional. Defaults to 0. Number of recently played
16
+ * game entries to skip. This can be used for pagination.
17
+ *
18
+ * @example
19
+ * ```
20
+ * const userRecentlyPlayedGames = await getUserRecentlyPlayedGames(
21
+ * authorization,
22
+ * { userName: "xelnia" }
23
+ * );
24
+ * ```
25
+ *
26
+ * @returns An array containing metadata about a user's recently played games.
27
+ * ```json
28
+ * [
29
+ * {
30
+ * gameId: 19010,
31
+ * consoleId: 21,
32
+ * consoleName: "PlayStation 2",
33
+ * title: "Simpsons, The: Hit & Run",
34
+ * imageIcon: "/Images/066024.png",
35
+ * lastPlayed: "2022-10-24 22:05:12",
36
+ * numPossibleAchievements: 131,
37
+ * possibleScore: 865,
38
+ * numAchieved: 23,
39
+ * scoreAchieved: 84,
40
+ * numAchievedHardcore: 23,
41
+ * scoreAchievedHardcore: 84
42
+ * }
43
+ * ]
44
+ * ```
45
+ */
46
+ export declare const getUserRecentlyPlayedGames: (authorization: AuthObject, payload: {
47
+ userName: string;
48
+ offset?: number;
49
+ count?: number;
50
+ }) => Promise<UserRecentlyPlayedGames>;