From 0113e77baa167844d7ccd43dafd54b713de7033e Mon Sep 17 00:00:00 2001 From: shalva97 Date: Sat, 25 May 2024 23:55:21 +0400 Subject: [PATCH] added competitiveStats property --- .../models/profile/CareerHeroStats.kt | 2 +- .../models/profile/CareerHeroes.kt | 74 +++++++++---------- .../models/profile/CompetitiveStats.kt | 10 +++ .../models/profile/PlayerProfile.kt | 5 +- .../models/profile/TopHeroes.kt | 72 +++++++++--------- 5 files changed, 86 insertions(+), 77 deletions(-) create mode 100644 library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CompetitiveStats.kt diff --git a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroStats.kt b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroStats.kt index 7394351..dbc6a48 100644 --- a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroStats.kt +++ b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroStats.kt @@ -7,7 +7,7 @@ import kotlinx.serialization.json.JsonElement public data class CareerHeroStats( val assists: Assists? = null, val average: Average, - val best: Best, + val best: Best? = null, val combat: Combat, val heroSpecific: JsonElement?, val game: Game, diff --git a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroes.kt b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroes.kt index dd1bfc7..679319c 100644 --- a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroes.kt +++ b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CareerHeroes.kt @@ -4,41 +4,41 @@ import kotlinx.serialization.Serializable @Serializable public data class CareerHeroes( - val allHeroes: CareerHeroStats, - val ana: CareerHeroStats, - val ashe: CareerHeroStats, - val baptiste: CareerHeroStats, - val bastion: CareerHeroStats, - val brigitte: CareerHeroStats, - val cassidy: CareerHeroStats, - val dVa: CareerHeroStats, - val doomfist: CareerHeroStats, - val echo: CareerHeroStats, - val genji: CareerHeroStats, - val hanzo: CareerHeroStats, - val illari: CareerHeroStats, - val junkerQueen: CareerHeroStats, - val junkrat: CareerHeroStats, - val kiriko: CareerHeroStats, - val lifeweaver: CareerHeroStats, - val lucio: CareerHeroStats, - val mauga: CareerHeroStats, - val mei: CareerHeroStats, - val mercy: CareerHeroStats, - val moira: CareerHeroStats, - val orisa: CareerHeroStats, - val ramattra: CareerHeroStats, - val reaper: CareerHeroStats, - val reinhardt: CareerHeroStats, - val roadhog: CareerHeroStats, - val sigma: CareerHeroStats, - val soldier76: CareerHeroStats, - val sombra: CareerHeroStats, - val torbjorn: CareerHeroStats, - val tracer: CareerHeroStats, - val widowmaker: CareerHeroStats, - val winston: CareerHeroStats, - val wreckingBall: CareerHeroStats, - val zarya: CareerHeroStats, - val zenyatta: CareerHeroStats + val allHeroes: CareerHeroStats? = null, + val ana: CareerHeroStats? = null, + val ashe: CareerHeroStats? = null, + val baptiste: CareerHeroStats? = null, + val bastion: CareerHeroStats? = null, + val brigitte: CareerHeroStats? = null, + val cassidy: CareerHeroStats? = null, + val dVa: CareerHeroStats? = null, + val doomfist: CareerHeroStats? = null, + val echo: CareerHeroStats? = null, + val genji: CareerHeroStats? = null, + val hanzo: CareerHeroStats? = null, + val illari: CareerHeroStats? = null, + val junkerQueen: CareerHeroStats? = null, + val junkrat: CareerHeroStats? = null, + val kiriko: CareerHeroStats? = null, + val lifeweaver: CareerHeroStats? = null, + val lucio: CareerHeroStats? = null, + val mauga: CareerHeroStats? = null, + val mei: CareerHeroStats? = null, + val mercy: CareerHeroStats? = null, + val moira: CareerHeroStats? = null, + val orisa: CareerHeroStats? = null, + val ramattra: CareerHeroStats? = null, + val reaper: CareerHeroStats? = null, + val reinhardt: CareerHeroStats? = null, + val roadhog: CareerHeroStats? = null, + val sigma: CareerHeroStats? = null, + val soldier76: CareerHeroStats? = null, + val sombra: CareerHeroStats? = null, + val torbjorn: CareerHeroStats? = null, + val tracer: CareerHeroStats? = null, + val widowmaker: CareerHeroStats? = null, + val winston: CareerHeroStats? = null, + val wreckingBall: CareerHeroStats? = null, + val zarya: CareerHeroStats? = null, + val zenyatta: CareerHeroStats? = null, ) diff --git a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CompetitiveStats.kt b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CompetitiveStats.kt new file mode 100644 index 0000000..911a7e6 --- /dev/null +++ b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/CompetitiveStats.kt @@ -0,0 +1,10 @@ +package io.github.shalva97.overwatch_player_search_api.models.profile + +import kotlinx.serialization.Serializable + +@Serializable +public data class CompetitiveStats( + val season: Int, + val topHeroes: TopHeroes, + val careerStats: CareerHeroes +) diff --git a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/PlayerProfile.kt b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/PlayerProfile.kt index 55c4265..cc168ce 100644 --- a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/PlayerProfile.kt +++ b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/PlayerProfile.kt @@ -2,7 +2,6 @@ package io.github.shalva97.overwatch_player_search_api.models.profile import kotlinx.serialization.Serializable - @Serializable public data class PlayerProfileStats( val icon: String, @@ -15,6 +14,6 @@ public data class PlayerProfileStats( val gamesLost: Int, val gamesPlayed: Int, val private: Boolean, - val quickPlayStats: QuickPlayStats - // TODO add competitiveStats + val quickPlayStats: QuickPlayStats, + val competitiveStats: CompetitiveStats ) diff --git a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/TopHeroes.kt b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/TopHeroes.kt index 288ae5a..b148882 100644 --- a/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/TopHeroes.kt +++ b/library/src/io/github/shalva97/overwatch_player_search_api/models/profile/TopHeroes.kt @@ -4,41 +4,41 @@ import kotlinx.serialization.Serializable @Serializable public data class TopHeroes( - val ana: TopHero, - val ashe: TopHero, - val baptiste: TopHero, - val bastion: TopHero, - val brigitte: TopHero, - val cassidy: TopHero, - val dVa: TopHero, - val doomfist: TopHero, - val echo: TopHero, - val genji: TopHero, - val hanzo: TopHero, - val illari: TopHero, - val junkerQueen: TopHero, - val junkrat: TopHero, - val kiriko: TopHero, - val lifeweaver: TopHero, - val lucio: TopHero, - val mauga: TopHero, - val mei: TopHero, - val mercy: TopHero, - val moira: TopHero, - val orisa: TopHero, - val ramattra: TopHero, - val reaper: TopHero, - val reinhardt: TopHero, - val roadhog: TopHero, - val sigma: TopHero, - val soldier76: TopHero, - val sombra: TopHero, - val torbjorn: TopHero, - val tracer: TopHero, - val widowmaker: TopHero, - val winston: TopHero, - val wreckingBall: TopHero, - val zarya: TopHero, - val zenyatta: TopHero + val ana: TopHero? = null, + val ashe: TopHero? = null, + val baptiste: TopHero? = null, + val bastion: TopHero? = null, + val brigitte: TopHero? = null, + val cassidy: TopHero? = null, + val dVa: TopHero? = null, + val doomfist: TopHero? = null, + val echo: TopHero? = null, + val genji: TopHero? = null, + val hanzo: TopHero? = null, + val illari: TopHero? = null, + val junkerQueen: TopHero? = null, + val junkrat: TopHero? = null, + val kiriko: TopHero? = null, + val lifeweaver: TopHero? = null, + val lucio: TopHero? = null, + val mauga: TopHero? = null, + val mei: TopHero? = null, + val mercy: TopHero? = null, + val moira: TopHero? = null, + val orisa: TopHero? = null, + val ramattra: TopHero? = null, + val reaper: TopHero? = null, + val reinhardt: TopHero? = null, + val roadhog: TopHero? = null, + val sigma: TopHero? = null, + val soldier76: TopHero? = null, + val sombra: TopHero? = null, + val torbjorn: TopHero? = null, + val tracer: TopHero? = null, + val widowmaker: TopHero? = null, + val winston: TopHero? = null, + val wreckingBall: TopHero? = null, + val zarya: TopHero? = null, + val zenyatta: TopHero? = null, )