-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fixed more serialization errors
- Loading branch information
Showing
6 changed files
with
40 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
package com.lycoon.clashapi.models.war | ||
|
||
import com.lycoon.clashapi.models.war.enums.WarState | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class War( | ||
data class War | ||
( | ||
val clan: WarClan? = null, // if warTag from warleague is #0 (not found) | ||
val teamSize: Int = 0, // if clan is not in war | ||
val attacksPerMember: Int = 0, // if from a warleague round war | ||
val opponent: WarClan? = null, // if warTag from warleague is #0 (not found) | ||
val startTime: String? = null, // if warTag from warleague is #0 (not found) | ||
val state: State, | ||
val state: WarState, | ||
val endTime: String? = null, // if warTag from warleague is #0 (not found) | ||
val preparationStartTime: String? = null // if warTag from warleague is #0 (not found) | ||
) { | ||
enum class State { | ||
CLAN_NOT_FOUND, ACCESS_DENIED, NOT_IN_WAR, | ||
IN_MATCHMAKING, ENTER_WAR, MATCHED, PREPARATION, | ||
WAR, IN_WAR, ENDED | ||
} | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/lycoon/clashapi/models/war/enums/WarState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.lycoon.clashapi.models.war.enums | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
enum class WarState | ||
{ | ||
@SerialName("clanNotFound") CLAN_NOT_FOUND, | ||
@SerialName("accessDenied") ACCESS_DENIED, | ||
@SerialName("notInWar") NOT_IN_WAR, | ||
@SerialName("inMatchmaking") IN_MATCHMAKING, | ||
@SerialName("enterWar") ENTER_WAR, | ||
@SerialName("matched") MATCHED, | ||
@SerialName("preparation") PREPARATION, | ||
@SerialName("war") WAR, | ||
@SerialName("inWar") IN_WAR, | ||
@SerialName("ended") ENDED | ||
} |