Skip to content

Commit 6de2e72

Browse files
chore: Fix inconsistency in boolean values actually being Integers from the Web API (#15)
* chore: fix UserWallActive value type, which is expected to be a Boolean * chore: fix a few "Boolean" values that are actually Integer values. * docs: fix a few "Boolean" values that are actually Integer values. * docs: update version
1 parent a422f98 commit 6de2e72

File tree

3 files changed

+102
-102
lines changed

3 files changed

+102
-102
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.retroachievements</groupId>
88
<artifactId>api-kotlin</artifactId>
9-
<version>1.0.4</version>
9+
<version>1.0.5</version>
1010

1111
<dependencyManagement>
1212
<dependencies>

src/main/kotlin/org/retroachivements/api/data/pojo/user/GetUserSummary.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class GetUserSummary {
77
data class Response(
88
@SerializedName("User")
99
val user: String,
10-
10+
1111
@SerializedName("RecentlyPlayedCount")
1212
val recentlyPlayedCount: Long,
1313

@@ -113,7 +113,7 @@ class GetUserSummary {
113113
val dateAwarded: String,
114114

115115
@SerializedName("HardcoreAchieved")
116-
val hardcoreAchieved: Boolean
116+
val hardcoreAchieved: Int
117117
)
118118

119119
data class Award(
@@ -220,7 +220,7 @@ class GetUserSummary {
220220
val released: String,
221221

222222
@SerializedName("IsFinal")
223-
val isFinal: Boolean,
223+
val isFinal: Int,
224224

225225
@SerializedName("ConsoleName")
226226
val consoleName: String,
Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
11
{
2-
"recentlyPlayedCount": 2,
3-
"recentlyPlayed": [
4-
{
5-
"gameId": 19020,
6-
"consoleId": 21,
7-
"consoleName": "PlayStation 2",
8-
"title": "Mortal Kombat: Deadly Alliance",
9-
"imageIcon": "/Images/064938.png",
10-
"lastPlayed": "2023-01-27 02:05:02"
2+
"User": "xelnia",
3+
"MemberSince": "2021-12-20 03:13:20",
4+
"LastActivity": {
5+
"ID": 0,
6+
"timestamp": null,
7+
"lastupdate": null,
8+
"activitytype": null,
9+
"User": "xelnia",
10+
"data": null,
11+
"data2": null
1112
},
12-
{
13-
"gameId": 15922,
14-
"consoleId": 7,
15-
"consoleName": "NES",
16-
"title": "~Hack~ Mega Man 3 Revamped",
17-
"imageIcon": "/Images/061792.png",
18-
"lastPlayed": "2022-11-07 21:49:09"
19-
}
20-
],
21-
"memberSince": "2020-02-02 20:10:35",
22-
"lastActivity": {
23-
"id": 59195489,
24-
"timestamp": "2023-01-27 02:13:21",
25-
"lastupdate": "2023-01-27 02:13:21",
26-
"activitytype": 1,
27-
"user": "WCopeland",
28-
"data": "281263",
29-
"data2": "1"
30-
},
31-
"richPresenceMsg": "Arcade [Match 2] - Nitara vs Drahmin (Novice difficulty)",
32-
"lastGameId": 19020,
33-
"lastGame": {
34-
"id": 19020,
35-
"title": "Mortal Kombat: Deadly Alliance",
36-
"consoleId": 21,
37-
"forumTopicId": 19339,
38-
"flags": 0,
39-
"imageIcon": "/Images/064938.png",
40-
"imageTitle": "/Images/057355.png",
41-
"imageIngame": "/Images/057356.png",
42-
"imageBoxArt": "/Images/056153.png",
43-
"publisher": "Midway",
44-
"developer": "Midway",
45-
"genre": "3D Fighting",
46-
"released": "November 16, 2002",
47-
"isFinal": false,
48-
"consoleName": "PlayStation 2",
49-
"richPresencePatch": "MockRichPresencePatch"
50-
},
51-
"contribCount": 0,
52-
"contribYield": 0,
53-
"totalPoints": 18817,
54-
"totalSoftcorePoints": 25,
55-
"totalTruePoints": 56984,
56-
"permissions": 1,
57-
"untracked": false,
58-
"id": 117089,
59-
"userWallActive": true,
60-
"motto": "https://i.imgur.com/ov30jeD.jpg",
61-
"rank": 1372,
62-
"awarded": {
63-
"1829": {
64-
"numPossibleAchievements": 80,
65-
"possibleScore": 738,
66-
"numAchieved": 16,
67-
"scoreAchieved": 95,
68-
"numAchievedHardcore": 16,
69-
"scoreAchievedHardcore": 95
13+
"RichPresenceMsg": "L=08-1 | 1 lives | 189300 points",
14+
"LastGameID": 15758,
15+
"ContribCount": 0,
16+
"ContribYield": 0,
17+
"TotalPoints": 8317,
18+
"TotalSoftcorePoints": 0,
19+
"TotalTruePoints": 26760,
20+
"Permissions": 1,
21+
"Untracked": 0,
22+
"ID": 224958,
23+
"UserWallActive": 1,
24+
"Motto": "",
25+
"Rank": 4616,
26+
"RecentlyPlayedCount": 1,
27+
"RecentlyPlayed": [
28+
{
29+
"GameID": 15758,
30+
"ConsoleID": 27,
31+
"ConsoleName": "Arcade",
32+
"Title": "Crazy Kong",
33+
"ImageIcon": "/Images/068578.png",
34+
"ImageTitle": "/Images/068579.png",
35+
"ImageIngame": "/Images/068580.png",
36+
"ImageBoxArt": "/Images/068205.png",
37+
"LastPlayed": "2023-03-09 08:20:34",
38+
"AchievementsTotal": 43
39+
}
40+
],
41+
"Awarded": {
42+
"15758": {
43+
"NumPossibleAchievements": 43,
44+
"PossibleScore": 615,
45+
"NumAchieved": 41,
46+
"ScoreAchieved": 490,
47+
"NumAchievedHardcore": 41,
48+
"ScoreAchievedHardcore": 490
49+
}
7050
},
71-
"6278": {
72-
"numPossibleAchievements": 42,
73-
"possibleScore": 478,
74-
"numAchieved": 0,
75-
"scoreAchieved": 0,
76-
"numAchievedHardcore": 0,
77-
"scoreAchievedHardcore": 0
78-
}
79-
},
80-
"recentAchievements": {
81-
"19020": {
82-
"281248": {
83-
"id": 281248,
84-
"gameId": 19020,
85-
"gameTitle": "Mortal Kombat: Deadly Alliance",
86-
"title": "Head Stomp",
87-
"description": "Perform a Fatality as Jax.",
88-
"points": 3,
89-
"badgeName": "311063",
90-
"isAwarded": true,
91-
"dateAwarded": "2023-01-27 02:04:36",
92-
"hardcoreAchieved": false
93-
}
94-
}
95-
},
96-
"points": 18817,
97-
"softcorePoints": 25,
98-
"userPic": "/UserPic/WCopeland.png",
99-
"totalRanked": 34572,
100-
"status": "Offline"
101-
}
51+
"RecentAchievements": {
52+
"15758": {
53+
"293505": {
54+
"ID": 293505,
55+
"GameID": 15758,
56+
"GameTitle": "Crazy Kong",
57+
"Title": "Prodigy of the Arcade",
58+
"Description": "Score 200,000 points",
59+
"Points": 25,
60+
"Type": null,
61+
"BadgeName": "325551",
62+
"IsAwarded": "1",
63+
"DateAwarded": "2023-03-09 08:20:34",
64+
"HardcoreAchieved": 1
65+
},
66+
"293526": {
67+
"ID": 293526,
68+
"GameID": 15758,
69+
"GameTitle": "Crazy Kong",
70+
"Title": "Super Smasher III",
71+
"Description": "Get 6 smashes with a single bottom hammer on any barrel board",
72+
"Points": 10,
73+
"Type": null,
74+
"BadgeName": "325572",
75+
"IsAwarded": "1",
76+
"DateAwarded": "2023-03-09 08:19:37",
77+
"HardcoreAchieved": 1
78+
}
79+
}
80+
},
81+
"LastGame": {
82+
"ID": 15758,
83+
"Title": "Crazy Kong",
84+
"ConsoleID": 27,
85+
"ConsoleName": "Arcade",
86+
"ForumTopicID": 20415,
87+
"Flags": 0,
88+
"ImageIcon": "/Images/068578.png",
89+
"ImageTitle": "/Images/068579.png",
90+
"ImageIngame": "/Images/068580.png",
91+
"ImageBoxArt": "/Images/068205.png",
92+
"Publisher": "Falcon",
93+
"Developer": "Falcon",
94+
"Genre": "2D Platforming, Arcade",
95+
"Released": "1981",
96+
"IsFinal": 0
97+
},
98+
"UserPic": "/UserPic/xelnia.png",
99+
"TotalRanked": 45654,
100+
"Status": "Offline"
101+
}

0 commit comments

Comments
 (0)