@retroachievements/api 1.2.0 → 1.3.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 (190) hide show
  1. package/README.md +37 -37
  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 +69 -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/getUserGameRankAndScore.d.ts +45 -45
  105. package/dist/user/getUserGameRankAndScore.test.d.ts +1 -1
  106. package/dist/user/getUserPoints.d.ts +30 -30
  107. package/dist/user/getUserPoints.test.d.ts +1 -1
  108. package/dist/user/getUserProgress.d.ts +50 -50
  109. package/dist/user/getUserProgress.test.d.ts +1 -1
  110. package/dist/user/getUserRecentAchievements.d.ts +49 -49
  111. package/dist/user/getUserRecentAchievements.test.d.ts +1 -1
  112. package/dist/user/getUserRecentlyPlayedGames.d.ts +50 -50
  113. package/dist/user/getUserRecentlyPlayedGames.test.d.ts +1 -1
  114. package/dist/user/getUserSummary.d.ts +32 -32
  115. package/dist/user/getUserSummary.test.d.ts +1 -1
  116. package/dist/user/index.d.ts +13 -13
  117. package/dist/user/models/award-type.model.d.ts +1 -1
  118. package/dist/user/models/dated-user-achievement.model.d.ts +17 -17
  119. package/dist/user/models/dated-user-achievements-response.model.d.ts +19 -19
  120. package/dist/user/models/game-info-and-user-progress.model.d.ts +12 -12
  121. package/dist/user/models/get-game-info-and-user-progress-response.model.d.ts +14 -14
  122. package/dist/user/models/get-user-awards-response.model.d.ts +24 -22
  123. package/dist/user/models/get-user-completed-games-response.model.d.ts +13 -13
  124. package/dist/user/models/get-user-game-rank-and-score-response.model.d.ts +8 -8
  125. package/dist/user/models/get-user-points-response.model.d.ts +4 -4
  126. package/dist/user/models/get-user-progress-response.model.d.ts +10 -10
  127. package/dist/user/models/get-user-recent-achievements-response.model.d.ts +18 -18
  128. package/dist/user/models/get-user-recently-played-games-response.model.d.ts +17 -17
  129. package/dist/user/models/get-user-summary-response.model.d.ts +82 -82
  130. package/dist/user/models/index.d.ts +23 -23
  131. package/dist/user/models/user-awards.model.d.ts +24 -22
  132. package/dist/user/models/user-claims-response.model.d.ts +19 -19
  133. package/dist/user/models/user-claims.model.d.ts +19 -19
  134. package/dist/user/models/user-completed-games.model.d.ts +12 -12
  135. package/dist/user/models/user-game-rank-and-score.model.d.ts +7 -7
  136. package/dist/user/models/user-points.model.d.ts +4 -4
  137. package/dist/user/models/user-progress.model.d.ts +9 -9
  138. package/dist/user/models/user-recent-achievement.model.d.ts +16 -16
  139. package/dist/user/models/user-recently-played-games.model.d.ts +16 -16
  140. package/dist/user/models/user-summary.model.d.ts +82 -82
  141. package/dist/utils/internal/apiBaseUrl.d.ts +1 -1
  142. package/dist/utils/internal/buildRequestUrl.d.ts +2 -2
  143. package/dist/utils/internal/buildRequestUrl.test.d.ts +1 -1
  144. package/dist/utils/internal/call.d.ts +11 -20
  145. package/dist/utils/internal/call.test.d.ts +1 -1
  146. package/dist/utils/internal/id.model.d.ts +1 -1
  147. package/dist/utils/internal/index.d.ts +5 -5
  148. package/dist/utils/internal/serializeProperties.d.ts +4 -4
  149. package/dist/utils/internal/serializeProperties.test.d.ts +1 -1
  150. package/dist/utils/public/buildAuthorization.d.ts +22 -22
  151. package/dist/utils/public/buildAuthorization.test.d.ts +1 -1
  152. package/dist/utils/public/index.d.ts +3 -3
  153. package/dist/utils/public/models/auth-object.model.d.ts +19 -19
  154. package/dist/utils/public/models/index.d.ts +1 -1
  155. package/package.json +24 -31
  156. package/src/achievement/getAchievementUnlocks.test.ts +9 -12
  157. package/src/console/getConsoleIds.test.ts +3 -3
  158. package/src/console/getGameList.test.ts +3 -3
  159. package/src/feed/getAchievementOfTheWeek.test.ts +5 -5
  160. package/src/feed/getActiveClaims.test.ts +3 -3
  161. package/src/feed/getClaims.test.ts +3 -3
  162. package/src/feed/getTopTenUsers.test.ts +3 -3
  163. package/src/game/getAchievementCount.test.ts +3 -3
  164. package/src/game/getAchievementDistribution.test.ts +33 -44
  165. package/src/game/getGame.test.ts +3 -3
  166. package/src/game/getGameExtended.test.ts +3 -3
  167. package/src/game/getGameRankAndScore.test.ts +3 -3
  168. package/src/game/getGameRating.test.ts +3 -3
  169. package/src/ticket/getTicketData.test.ts +13 -13
  170. package/src/user/getAchievementsEarnedBetween.test.ts +3 -4
  171. package/src/user/getAchievementsEarnedOnDay.test.ts +3 -4
  172. package/src/user/getGameInfoAndUserProgress.test.ts +3 -4
  173. package/src/user/getUserAwards.test.ts +7 -3
  174. package/src/user/getUserAwards.ts +2 -0
  175. package/src/user/getUserClaims.test.ts +3 -3
  176. package/src/user/getUserCompletedGames.test.ts +3 -3
  177. package/src/user/getUserGameRankAndScore.test.ts +3 -3
  178. package/src/user/getUserPoints.test.ts +3 -3
  179. package/src/user/getUserProgress.test.ts +3 -3
  180. package/src/user/getUserRecentAchievements.test.ts +3 -4
  181. package/src/user/getUserRecentlyPlayedGames.test.ts +3 -4
  182. package/src/user/getUserSummary.test.ts +24 -3
  183. package/src/user/getUserSummary.ts +1 -3
  184. package/src/user/models/award-type.model.ts +5 -4
  185. package/src/user/models/get-user-awards-response.model.ts +2 -0
  186. package/src/user/models/user-awards.model.ts +2 -0
  187. package/src/utils/internal/buildRequestUrl.ts +1 -1
  188. package/src/utils/internal/call.test.ts +20 -4
  189. package/src/utils/internal/call.ts +8 -12
  190. package/src/utils/internal/serializeProperties.ts +4 -4
@@ -1,43 +1,43 @@
1
- import type { ClaimSetType } from "./claim-set-type.enum";
2
- import type { ClaimStatus } from "./claim-status.enum";
3
- import type { ClaimType } from "./claim-type.enum";
4
- export interface SetClaim {
5
- /** Unique ID of the claim. */
6
- id: number;
7
- /** User who made the claim. */
8
- user: string;
9
- /** ID of the claimed game. */
10
- gameId: number;
11
- /** Title of the claimed game. */
12
- gameTitle: string;
13
- /** Site-relative path of the game's icon image. */
14
- gameIcon: string;
15
- /** Console name of the claimed game. */
16
- consoleName: string;
17
- /** Console ID of the claimed game. */
18
- consoleId: number;
19
- /** Whether the claim is primary or a collaboration. */
20
- claimType: ClaimType;
21
- /** Whether the claim is for a new set or a revision. */
22
- setType: ClaimSetType;
23
- /** Whether the claim is active, complete, or dropped. */
24
- status: ClaimStatus;
25
- /** Number of times the claim has been extended. */
26
- extension: number;
27
- /** Flag indicating a special type of claim. */
28
- special: number;
29
- /** Date the claim was made. */
30
- created: string;
31
- /**
32
- * Date the claim is done. This is an expiration
33
- * date for active claims, completion date for complete
34
- * claims, and dropped date for dropped claims.
35
- */
36
- doneTime: string;
37
- /** Date the claim was updated. */
38
- updated: string;
39
- /** Time in minutes left until the claim expires. */
40
- minutesLeft: number;
41
- /** True if the user is a junior dev. */
42
- userIsJrDev: boolean;
43
- }
1
+ import type { ClaimSetType } from "./claim-set-type.enum";
2
+ import type { ClaimStatus } from "./claim-status.enum";
3
+ import type { ClaimType } from "./claim-type.enum";
4
+ export interface SetClaim {
5
+ /** Unique ID of the claim. */
6
+ id: number;
7
+ /** User who made the claim. */
8
+ user: string;
9
+ /** ID of the claimed game. */
10
+ gameId: number;
11
+ /** Title of the claimed game. */
12
+ gameTitle: string;
13
+ /** Site-relative path of the game's icon image. */
14
+ gameIcon: string;
15
+ /** Console name of the claimed game. */
16
+ consoleName: string;
17
+ /** Console ID of the claimed game. */
18
+ consoleId: number;
19
+ /** Whether the claim is primary or a collaboration. */
20
+ claimType: ClaimType;
21
+ /** Whether the claim is for a new set or a revision. */
22
+ setType: ClaimSetType;
23
+ /** Whether the claim is active, complete, or dropped. */
24
+ status: ClaimStatus;
25
+ /** Number of times the claim has been extended. */
26
+ extension: number;
27
+ /** Flag indicating a special type of claim. */
28
+ special: number;
29
+ /** Date the claim was made. */
30
+ created: string;
31
+ /**
32
+ * Date the claim is done. This is an expiration
33
+ * date for active claims, completion date for complete
34
+ * claims, and dropped date for dropped claims.
35
+ */
36
+ doneTime: string;
37
+ /** Date the claim was updated. */
38
+ updated: string;
39
+ /** Time in minutes left until the claim expires. */
40
+ minutesLeft: number;
41
+ /** True if the user is a junior dev. */
42
+ userIsJrDev: boolean;
43
+ }
@@ -1,5 +1,5 @@
1
- export interface TopTenUsersEntity {
2
- userName: string;
3
- totalPoints: number;
4
- totalRatioPoints: number;
5
- }
1
+ export interface TopTenUsersEntity {
2
+ userName: string;
3
+ totalPoints: number;
4
+ totalRatioPoints: number;
5
+ }
@@ -1,2 +1,2 @@
1
- import type { TopTenUsersEntity } from "./top-ten-users-entity.model";
2
- export type TopTenUsers = TopTenUsersEntity[];
1
+ import type { TopTenUsersEntity } from "./top-ten-users-entity.model";
2
+ export type TopTenUsers = TopTenUsersEntity[];
@@ -1,32 +1,32 @@
1
- import type { ID } from "../utils/internal";
2
- import type { AuthObject } from "../utils/public";
3
- import type { AchievementCount } from "./models";
4
- /**
5
- * A call to this function will retrieve the list of
6
- * achievement IDs for a game, 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.gameId The unique game ID. If you are unsure, open the
12
- * game's page on the RetroAchievements.org website. For example, Dragster's
13
- * URL is https://retroachievements.org/game/14402. We can see from the
14
- * URL that the game ID is "14402".
15
- *
16
- * @example
17
- * ```
18
- * const achievementCount = await getAchievementCount(
19
- * authorization,
20
- * { gameId: 14402 }
21
- * );
22
- * ```
23
- *
24
- * @returns An object containing a gameId and a list of
25
- * achievementIds.
26
- * ```
27
- * { gameId: 14402, achievementIds: [1,2,3,4,5] }
28
- * ```
29
- */
30
- export declare const getAchievementCount: (authorization: AuthObject, payload: {
31
- gameId: ID;
32
- }) => Promise<AchievementCount>;
1
+ import type { ID } from "../utils/internal";
2
+ import type { AuthObject } from "../utils/public";
3
+ import type { AchievementCount } from "./models";
4
+ /**
5
+ * A call to this function will retrieve the list of
6
+ * achievement IDs for a game, 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.gameId The unique game ID. If you are unsure, open the
12
+ * game's page on the RetroAchievements.org website. For example, Dragster's
13
+ * URL is https://retroachievements.org/game/14402. We can see from the
14
+ * URL that the game ID is "14402".
15
+ *
16
+ * @example
17
+ * ```
18
+ * const achievementCount = await getAchievementCount(
19
+ * authorization,
20
+ * { gameId: 14402 }
21
+ * );
22
+ * ```
23
+ *
24
+ * @returns An object containing a gameId and a list of
25
+ * achievementIds.
26
+ * ```
27
+ * { gameId: 14402, achievementIds: [1,2,3,4,5] }
28
+ * ```
29
+ */
30
+ export declare const getAchievementCount: (authorization: AuthObject, payload: {
31
+ gameId: ID;
32
+ }) => Promise<AchievementCount>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,58 +1,58 @@
1
- import type { ID } from "../utils/internal";
2
- import type { AuthObject } from "../utils/public";
3
- import type { AchievementDistributionFlags, GetAchievementDistributionResponse } from "./models";
4
- /**
5
- * A call to this function will retrieve a dictionary
6
- * of the number of players who have earned a specific
7
- * number of achievements for a given 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.flags Optional. By default, only official achievement
18
- * tallies are returned in the response. Import the `AchievementDistributionFlags`
19
- * enum for possible values. This lets you see the count of players who have
20
- * unlocked unofficial achievements.
21
- *
22
- * @param payload.hardcore Optional. By default, set to false, with both
23
- * softcore and hardcore tallies returned in the response. If this option
24
- * is set to true, only hardcore unlocks will be included in the totals.
25
- *
26
- * @example
27
- * ```
28
- * const achievementDistribution = await getAchievementDistribution(
29
- * authorization,
30
- * { gameId: 14402, hardcore: true }
31
- * );
32
- * ```
33
- *
34
- * @returns A dictionary where the keys represent the earned achievement
35
- * count and the values represent the number of players who have unlocked
36
- * that many achievements.
37
- * ```
38
- * {
39
- * '1': 64,
40
- * '2': 19,
41
- * '3': 11,
42
- * '4': 18,
43
- * '5': 25,
44
- * '6': 20,
45
- * '7': 26,
46
- * '8': 29,
47
- * '9': 54,
48
- * '10': 17,
49
- * '11': 29,
50
- * '12': 4
51
- * }
52
- * ```
53
- */
54
- export declare const getAchievementDistribution: (authorization: AuthObject, payload: {
55
- gameId: ID;
56
- flags?: AchievementDistributionFlags;
57
- hardcore?: boolean;
58
- }) => Promise<GetAchievementDistributionResponse>;
1
+ import type { ID } from "../utils/internal";
2
+ import type { AuthObject } from "../utils/public";
3
+ import type { AchievementDistributionFlags, GetAchievementDistributionResponse } from "./models";
4
+ /**
5
+ * A call to this function will retrieve a dictionary
6
+ * of the number of players who have earned a specific
7
+ * number of achievements for a given 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.flags Optional. By default, only official achievement
18
+ * tallies are returned in the response. Import the `AchievementDistributionFlags`
19
+ * enum for possible values. This lets you see the count of players who have
20
+ * unlocked unofficial achievements.
21
+ *
22
+ * @param payload.hardcore Optional. By default, set to false, with both
23
+ * softcore and hardcore tallies returned in the response. If this option
24
+ * is set to true, only hardcore unlocks will be included in the totals.
25
+ *
26
+ * @example
27
+ * ```
28
+ * const achievementDistribution = await getAchievementDistribution(
29
+ * authorization,
30
+ * { gameId: 14402, hardcore: true }
31
+ * );
32
+ * ```
33
+ *
34
+ * @returns A dictionary where the keys represent the earned achievement
35
+ * count and the values represent the number of players who have unlocked
36
+ * that many achievements.
37
+ * ```
38
+ * {
39
+ * '1': 64,
40
+ * '2': 19,
41
+ * '3': 11,
42
+ * '4': 18,
43
+ * '5': 25,
44
+ * '6': 20,
45
+ * '7': 26,
46
+ * '8': 29,
47
+ * '9': 54,
48
+ * '10': 17,
49
+ * '11': 29,
50
+ * '12': 4
51
+ * }
52
+ * ```
53
+ */
54
+ export declare const getAchievementDistribution: (authorization: AuthObject, payload: {
55
+ gameId: ID;
56
+ flags?: AchievementDistributionFlags;
57
+ hardcore?: boolean;
58
+ }) => Promise<GetAchievementDistributionResponse>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,49 +1,49 @@
1
- import type { ID } from "../utils/internal";
2
- import type { AuthObject } from "../utils/public";
3
- import type { Game } from "./models";
4
- /**
5
- * A call to this function will retrieve basic metadata about
6
- * a game, targeted via its unique ID.
7
- *
8
- * @param authorization An object containing your userName and webApiKey.
9
- * This can be constructed with `buildAuthorization()`.
10
- *
11
- * @param payload.gameId The unique game ID. If you are unsure, open the
12
- * game's page on the RetroAchievements.org website. For example, Dragster's
13
- * URL is https://retroachievements.org/game/14402. We can see from the
14
- * URL that the game ID is "14402".
15
- *
16
- * @example
17
- * ```
18
- * const game = await getGame(
19
- * authorization,
20
- * { gameId: 14402 }
21
- * );
22
- * ```
23
- *
24
- * @returns An object containing basic metadata about a target game.
25
- * ```json
26
- * {
27
- * id: 14402,
28
- * title: "Dragster",
29
- * forumTopicId: 9145,
30
- * consoleId: 25,
31
- * consoleName: "Atari 2600",
32
- * flags: 0,
33
- * imageIcon: "/Images/026368.png",
34
- * gameIcon: "/Images/026368.png",
35
- * imageTitle: "/Images/026366.png",
36
- * imageIngame: "/Images/026367.png",
37
- * imageBoxArt: "/Images/026365.png",
38
- * publisher: "Activision",
39
- * developer: "David Crane",
40
- * genre: "Racing",
41
- * released: 1980,
42
- * gameTitle: "Dragster",
43
- * console: "Atari 2600"
44
- * }
45
- * ```
46
- */
47
- export declare const getGame: (authorization: AuthObject, payload: {
48
- gameId: ID;
49
- }) => Promise<Game>;
1
+ import type { ID } from "../utils/internal";
2
+ import type { AuthObject } from "../utils/public";
3
+ import type { Game } from "./models";
4
+ /**
5
+ * A call to this function will retrieve basic metadata about
6
+ * a game, targeted via its unique ID.
7
+ *
8
+ * @param authorization An object containing your userName and webApiKey.
9
+ * This can be constructed with `buildAuthorization()`.
10
+ *
11
+ * @param payload.gameId The unique game ID. If you are unsure, open the
12
+ * game's page on the RetroAchievements.org website. For example, Dragster's
13
+ * URL is https://retroachievements.org/game/14402. We can see from the
14
+ * URL that the game ID is "14402".
15
+ *
16
+ * @example
17
+ * ```
18
+ * const game = await getGame(
19
+ * authorization,
20
+ * { gameId: 14402 }
21
+ * );
22
+ * ```
23
+ *
24
+ * @returns An object containing basic metadata about a target game.
25
+ * ```json
26
+ * {
27
+ * id: 14402,
28
+ * title: "Dragster",
29
+ * forumTopicId: 9145,
30
+ * consoleId: 25,
31
+ * consoleName: "Atari 2600",
32
+ * flags: 0,
33
+ * imageIcon: "/Images/026368.png",
34
+ * gameIcon: "/Images/026368.png",
35
+ * imageTitle: "/Images/026366.png",
36
+ * imageIngame: "/Images/026367.png",
37
+ * imageBoxArt: "/Images/026365.png",
38
+ * publisher: "Activision",
39
+ * developer: "David Crane",
40
+ * genre: "Racing",
41
+ * released: 1980,
42
+ * gameTitle: "Dragster",
43
+ * console: "Atari 2600"
44
+ * }
45
+ * ```
46
+ */
47
+ export declare const getGame: (authorization: AuthObject, payload: {
48
+ gameId: ID;
49
+ }) => Promise<Game>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,69 +1,69 @@
1
- import type { ID } from "../utils/internal";
2
- import type { AuthObject } from "../utils/public";
3
- import type { GameExtended } from "./models";
4
- /**
5
- * A call to this function will retrieve extended metadata
6
- * about a game, targeted via its unique ID.
7
- *
8
- * @param authorization An object containing your userName and webApiKey.
9
- * This can be constructed with `buildAuthorization()`.
10
- *
11
- * @param payload.gameId The unique game ID. If you are unsure, open the
12
- * game's page on the RetroAchievements.org website. For example, Dragster's
13
- * URL is https://retroachievements.org/game/14402. We can see from the
14
- * URL that the game ID is "14402".
15
- *
16
- * @example
17
- * ```
18
- * const gameExtended = await getGameExtended(
19
- * authorization,
20
- * { gameId: 14402 }
21
- * );
22
- * ```
23
- *
24
- * @returns An object containing extended metadata about a target game.
25
- * ```json
26
- * {
27
- * id: 14402,
28
- * title: "Dragster",
29
- * consoleId: 25,
30
- * forumTopicId: 9145,
31
- * flags: 0,
32
- * imageIcon: "/Images/026368.png",
33
- * imageTitle: "/Images/026366.png",
34
- * imageIngame: "/Images/026367.png",
35
- * imageBoxArt: "/Images/026365.png",
36
- * publisher: "Activision",
37
- * developer: "David Crane",
38
- * genre: "Racing",
39
- * released: 1980,
40
- * isFinal: false,
41
- * consoleName: "Atari 2600",
42
- * richPresencePatch: "2b92fa1bf9635c303b3b7f8feea3ed3c",
43
- * numAchievements: 12,
44
- * numDistinctPlayersCasual: 454,
45
- * numDistinctPlayersHardcore: 323,
46
- * claims: [],
47
- * achievements: {
48
- * '79434': {
49
- * id: 79434,
50
- * numAwarded: 338,
51
- * numAwardedHardcore: 253,
52
- * title: "Novice Dragster Driver 1",
53
- * description: "Complete your very first race in game 1.",
54
- * points: 1,
55
- * trueRatio: 1,
56
- * author: "Boldewin",
57
- * dateModified: "2019-08-01 19:03:46",
58
- * dateCreated: "2019-07-31 18:49:57",
59
- * badgeName: "85541",
60
- * displayOrder: 0,
61
- * memAddr: "f5c41fa0b5fa0d5fbb8a74c598f18582"
62
- * }
63
- * }
64
- * }
65
- * ```
66
- */
67
- export declare const getGameExtended: (authorization: AuthObject, payload: {
68
- gameId: ID;
69
- }) => Promise<GameExtended>;
1
+ import type { ID } from "../utils/internal";
2
+ import type { AuthObject } from "../utils/public";
3
+ import type { GameExtended } from "./models";
4
+ /**
5
+ * A call to this function will retrieve extended metadata
6
+ * about a game, targeted via its unique ID.
7
+ *
8
+ * @param authorization An object containing your userName and webApiKey.
9
+ * This can be constructed with `buildAuthorization()`.
10
+ *
11
+ * @param payload.gameId The unique game ID. If you are unsure, open the
12
+ * game's page on the RetroAchievements.org website. For example, Dragster's
13
+ * URL is https://retroachievements.org/game/14402. We can see from the
14
+ * URL that the game ID is "14402".
15
+ *
16
+ * @example
17
+ * ```
18
+ * const gameExtended = await getGameExtended(
19
+ * authorization,
20
+ * { gameId: 14402 }
21
+ * );
22
+ * ```
23
+ *
24
+ * @returns An object containing extended metadata about a target game.
25
+ * ```json
26
+ * {
27
+ * id: 14402,
28
+ * title: "Dragster",
29
+ * consoleId: 25,
30
+ * forumTopicId: 9145,
31
+ * flags: 0,
32
+ * imageIcon: "/Images/026368.png",
33
+ * imageTitle: "/Images/026366.png",
34
+ * imageIngame: "/Images/026367.png",
35
+ * imageBoxArt: "/Images/026365.png",
36
+ * publisher: "Activision",
37
+ * developer: "David Crane",
38
+ * genre: "Racing",
39
+ * released: 1980,
40
+ * isFinal: false,
41
+ * consoleName: "Atari 2600",
42
+ * richPresencePatch: "2b92fa1bf9635c303b3b7f8feea3ed3c",
43
+ * numAchievements: 12,
44
+ * numDistinctPlayersCasual: 454,
45
+ * numDistinctPlayersHardcore: 323,
46
+ * claims: [],
47
+ * achievements: {
48
+ * '79434': {
49
+ * id: 79434,
50
+ * numAwarded: 338,
51
+ * numAwardedHardcore: 253,
52
+ * title: "Novice Dragster Driver 1",
53
+ * description: "Complete your very first race in game 1.",
54
+ * points: 1,
55
+ * trueRatio: 1,
56
+ * author: "Boldewin",
57
+ * dateModified: "2019-08-01 19:03:46",
58
+ * dateCreated: "2019-07-31 18:49:57",
59
+ * badgeName: "85541",
60
+ * displayOrder: 0,
61
+ * memAddr: "f5c41fa0b5fa0d5fbb8a74c598f18582"
62
+ * }
63
+ * }
64
+ * }
65
+ * ```
66
+ */
67
+ export declare const getGameExtended: (authorization: AuthObject, payload: {
68
+ gameId: ID;
69
+ }) => Promise<GameExtended>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,39 +1,39 @@
1
- import type { ID } from "../utils/internal";
2
- import type { AuthObject } from "../utils/public";
3
- import type { GameRankAndScoreEntity } from "./models";
4
- /**
5
- * A call to this function will retrieve metadata about
6
- * either the latest masters for a game, or the highest
7
- * points earners for a game. The game is targeted via
8
- * its unique ID.
9
- *
10
- * @param authorization An object containing your userName and webApiKey.
11
- * This can be constructed with `buildAuthorization()`.
12
- *
13
- * @param payload.gameId The unique game ID. If you are unsure, open the
14
- * game's page on the RetroAchievements.org website. For example, Dragster's
15
- * URL is https://retroachievements.org/game/14402. We can see from the
16
- * URL that the game ID is "14402".
17
- *
18
- * @param payload.type Can either be "latest-masters" or "high-scores".
19
- *
20
- * @example
21
- * ```
22
- * const gameRankAndScore = await getGameRankAndScore(
23
- * authorization,
24
- * { gameId: 14402, type: "latest-masters" }
25
- * );
26
- * ```
27
- *
28
- * @returns An array containing a list of latest masters or
29
- * high score earners for a given game ID.
30
- * ```json
31
- * [
32
- * { user: 'Arekdias', totalScore: 189, lastAward: '2020-10-10 22:43:32' }
33
- * ]
34
- * ```
35
- */
36
- export declare const getGameRankAndScore: (authorization: AuthObject, payload: {
37
- gameId: ID;
38
- type: "latest-masters" | "high-scores";
39
- }) => Promise<GameRankAndScoreEntity[]>;
1
+ import type { ID } from "../utils/internal";
2
+ import type { AuthObject } from "../utils/public";
3
+ import type { GameRankAndScoreEntity } from "./models";
4
+ /**
5
+ * A call to this function will retrieve metadata about
6
+ * either the latest masters for a game, or the highest
7
+ * points earners for a game. The game is targeted via
8
+ * its unique ID.
9
+ *
10
+ * @param authorization An object containing your userName and webApiKey.
11
+ * This can be constructed with `buildAuthorization()`.
12
+ *
13
+ * @param payload.gameId The unique game ID. If you are unsure, open the
14
+ * game's page on the RetroAchievements.org website. For example, Dragster's
15
+ * URL is https://retroachievements.org/game/14402. We can see from the
16
+ * URL that the game ID is "14402".
17
+ *
18
+ * @param payload.type Can either be "latest-masters" or "high-scores".
19
+ *
20
+ * @example
21
+ * ```
22
+ * const gameRankAndScore = await getGameRankAndScore(
23
+ * authorization,
24
+ * { gameId: 14402, type: "latest-masters" }
25
+ * );
26
+ * ```
27
+ *
28
+ * @returns An array containing a list of latest masters or
29
+ * high score earners for a given game ID.
30
+ * ```json
31
+ * [
32
+ * { user: 'Arekdias', totalScore: 189, lastAward: '2020-10-10 22:43:32' }
33
+ * ]
34
+ * ```
35
+ */
36
+ export declare const getGameRankAndScore: (authorization: AuthObject, payload: {
37
+ gameId: ID;
38
+ type: "latest-masters" | "high-scores";
39
+ }) => Promise<GameRankAndScoreEntity[]>;
@@ -1 +1 @@
1
- export {};
1
+ export {};