Skip to content

Commit

Permalink
feat(getAchievementUnlocks): add new query params
Browse files Browse the repository at this point in the history
  • Loading branch information
gboquizosanchez committed Jun 13, 2024
1 parent 8d88387 commit 7a62042
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/achievement/getAchievementUnlocks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe("Function: getAchievementUnlocks", () => {
{
User: "Tiotroll2022",
RAPoints: "348",
RASoftcorePoints: "363",
DateAwarded: "2023-01-29 21:45:41",
HardcoreMode: "0",
},
Expand Down Expand Up @@ -91,6 +92,7 @@ describe("Function: getAchievementUnlocks", () => {
{
user: "Tiotroll2022",
raPoints: 348,
raSoftcorePoints: 363,
dateAwarded: "2023-01-29 21:45:41",
hardcoreMode: false,
},
Expand Down
2 changes: 1 addition & 1 deletion src/achievement/getAchievementUnlocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const getAchievementUnlocks = async (
const rawResponse = await call<GetAchievementUnlocksResponse>({ url });

return serializeProperties(rawResponse, {
shouldCastToNumbers: ["ID", "Points", "TrueRatio", "RAPoints"],
shouldCastToNumbers: ["ID", "Points", "TrueRatio", "RAPoints", "RASoftcorePoints"],
shouldMapToBooleans: ["HardcoreMode"],
});
};
1 change: 1 addition & 0 deletions src/achievement/models/achievement-unlock-entity.model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface AchievementUnlockEntity {
user: string;
raPoints: number;
raSoftcorePoints: number;
dateAwarded: string;
hardcoreMode: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
interface AchievementUnlocksResponseEntity {
User: string;
RAPoints: string;
RASoftcorePoints: string;
DateAwarded: string;
HardcoreMode: string;
}
Expand Down

0 comments on commit 7a62042

Please sign in to comment.