File tree Expand file tree Collapse file tree 5 files changed +13
-13
lines changed
main/kotlin/com/github/azurapi/azurapikotlin
test/kotlin/com/github/azurapi/azurapikotlin/json Expand file tree Collapse file tree 5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
package com.github.azurapi.azurapikotlin.internal.exceptions
2
2
3
- class ApiException (message : String = " " ) : Exception(message)
3
+ open class ApiException (message : String = " " ) : Exception(message)
Original file line number Diff line number Diff line change 1
1
package com.github.azurapi.azurapikotlin.internal.exceptions
2
2
3
- class DatabaseException (message : String = " " ) : Exception (message)
3
+ class DatabaseException (message : String = " " ) : ApiException (message)
Original file line number Diff line number Diff line change 1
1
package com.github.azurapi.azurapikotlin.internal.exceptions
2
2
3
- class ShipNotFoundException (message : String = " " ) : Exception (message)
3
+ class ShipNotFoundException (message : String = " " ) : ApiException (message)
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ object ShipParser {
45
45
} catch (e: NumberFormatException ) {
46
46
0
47
47
},
48
- isLive2D = json.getBoolean( " live2DModel " )
48
+ isLive2D = json.getString( " live2dModel " ) == " Yes "
49
49
)
50
50
} catch (e: JSONException ) {
51
51
throw e
@@ -77,7 +77,7 @@ object ShipParser {
77
77
try {
78
78
return StatsDetails (
79
79
speed = json.getInt(" speed" ),
80
- accuracy = json.getInt(" accuracyHit " ),
80
+ accuracy = json.getInt(" accuracy " ),
81
81
antiAir = json.getInt(" antiair" ),
82
82
antiSub = json.getInt(" antisubmarineWarfare" ),
83
83
armor = json.getString(" armor" ),
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class ShipParserTestCase : StringSpec() {
49
49
"antiair": "178",
50
50
"aviation": "0",
51
51
"oilConsumption": "12",
52
- "accuracyHit ": "134",
52
+ "accuracy ": "134",
53
53
"antisubmarineWarfare": "0"
54
54
},
55
55
"level100": {
@@ -64,7 +64,7 @@ class ShipParserTestCase : StringSpec() {
64
64
"antiair": "155",
65
65
"aviation": "0",
66
66
"oilConsumption": "12",
67
- "accuracyHit ": "119",
67
+ "accuracy ": "119",
68
68
"antisubmarineWarfare": "0"
69
69
},
70
70
"baseStats": {
@@ -79,7 +79,7 @@ class ShipParserTestCase : StringSpec() {
79
79
"antiair": "33",
80
80
"aviation": "0",
81
81
"oilConsumption": "4",
82
- "accuracyHit ": "46",
82
+ "accuracy ": "46",
83
83
"antisubmarineWarfare": "0"
84
84
}
85
85
},
@@ -245,7 +245,7 @@ class ShipParserTestCase : StringSpec() {
245
245
"chibi": "https://raw.githubusercontent.com/AzurAPI/azurapi-js-setup/master/images/skins/201/Default/chibi.png",
246
246
"info": {
247
247
"obtainedFrom": "Default",
248
- "live2DModel ": false
248
+ "live2dModel ": "No"
249
249
}
250
250
},
251
251
{
@@ -258,7 +258,7 @@ class ShipParserTestCase : StringSpec() {
258
258
"cnClient": "白花的誓言",
259
259
"jpClient": "白き約束",
260
260
"obtainedFrom": "Oath",
261
- "live2DModel ": false
261
+ "live2dModel ": "No"
262
262
}
263
263
},
264
264
{
@@ -272,7 +272,7 @@ class ShipParserTestCase : StringSpec() {
272
272
"jpClient": "真夏の行進曲",
273
273
"obtainedFrom": "Skin Shop",
274
274
"cost": 700,
275
- "live2DModel ": true
275
+ "live2dModel ": "Yes"
276
276
}
277
277
},
278
278
{
@@ -286,7 +286,7 @@ class ShipParserTestCase : StringSpec() {
286
286
"jpClient": "冬の風物詩",
287
287
"obtainedFrom": "Skin Shop",
288
288
"cost": 780,
289
- "live2DModel ": false
289
+ "live2dModel ": "No"
290
290
}
291
291
},
292
292
{
@@ -300,7 +300,7 @@ class ShipParserTestCase : StringSpec() {
300
300
"jpClient": "学園トロイメライ",
301
301
"obtainedFrom": "Skin Shop",
302
302
"cost": 880,
303
- "live2DModel ": false
303
+ "live2dModel ": "No"
304
304
}
305
305
}
306
306
]
You can’t perform that action at this time.
0 commit comments