diff options
Diffstat (limited to 'app/src/main/java/xyz/adjutor/aniki/presentation/model')
10 files changed, 225 insertions, 0 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/AnimeResponse.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/AnimeResponse.kt new file mode 100644 index 0000000..d682e3c --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/AnimeResponse.kt @@ -0,0 +1,16 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class AnimeResponse { //only kept the infos I didn't have and that were interesting to me. + + @SerializedName("mal_id") + var mal_id: Int? = null + + @SerializedName("rank") + var rank: Int? = null //added for the search feature (detail) + + @SerializedName("synopsis") + var synopsis: String? = null + +} diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/MangaResponse.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/MangaResponse.kt new file mode 100644 index 0000000..4bd7f2f --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/MangaResponse.kt @@ -0,0 +1,22 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class MangaResponse { //only kept the infos I didn't have and that were interesting to me. + + @SerializedName("mal_id") + var mal_id: Int? = null + + @SerializedName("chapters") + var chapters: Int? = null + + @SerializedName("synopsis") + var synopsis: String? = null + + @SerializedName("rank") + var rank: Int? = null //added for the search feature (detail) + + @SerializedName("background") + var background: String? = null //a bit of background story about the manga + +} diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchAnime.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchAnime.kt new file mode 100644 index 0000000..df5189d --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchAnime.kt @@ -0,0 +1,31 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class SearchAnime { + + @SerializedName("mal_id") + var mal_id: Int? = null + + @SerializedName("url") + var url: String? = null + + @SerializedName("image_url") + var image_url: String? = null + + @SerializedName("title") + var title: String? = null + + @SerializedName("episodes") + var episodes: Int? = null + + @SerializedName("score") + var score: Float? = null + + @SerializedName("start_date") //we'll maybe remove this later + var start_date: String? = null + + @SerializedName("end_date") //we'll maybe remove this later + var end_date: String? = null + +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchAnimeResponse.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchAnimeResponse.kt new file mode 100644 index 0000000..1e20e2f --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchAnimeResponse.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class SearchAnimeResponse { //only kept the infos I didn't have and that were interesting to me. + + @SerializedName("results") + private lateinit var results: List<SearchAnime> + + fun getResults(): List<SearchAnime> { + return results + } +} diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchManga.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchManga.kt new file mode 100644 index 0000000..c24d93c --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchManga.kt @@ -0,0 +1,34 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class SearchManga { + + @SerializedName("mal_id") + var mal_id: Int? = null + + @SerializedName("url") + var url: String? = null + + @SerializedName("image_url") + var image_url: String? = null + + @SerializedName("title") + var title: String? = null + + @SerializedName("chapters") + var chapters: Int? = null + + @SerializedName("volumes") + var volumes: Int? = null + + @SerializedName("score") + var score: Float? = null + + @SerializedName("start_date") //we'll maybe remove this later + var start_date: String? = null + + @SerializedName("end_date") //we'll maybe remove this later + var end_date: String? = null + +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchMangaResponse.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchMangaResponse.kt new file mode 100644 index 0000000..4fe7047 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/SearchMangaResponse.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class SearchMangaResponse { //only kept the infos I didn't have and that were interesting to me. + + @SerializedName("results") + private lateinit var results: List<SearchManga> + + fun getResults(): List<SearchManga> { + return results + } +} diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopAnime.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopAnime.kt new file mode 100644 index 0000000..3cf4390 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopAnime.kt @@ -0,0 +1,35 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +//Content of the top field from the api of top anime +class TopAnime { + + @SerializedName("mal_id") + var mal_id: Int? = null + + @SerializedName("rank") + var rank: Int? = null + + @SerializedName("title") + var title: String? = null + + @SerializedName("url") + var url: String? = null + + @SerializedName("episodes") + var episodes: Int? = null + + @SerializedName("start_date") + var start_date: String? = null + + @SerializedName("end_date") + var end_date: String? = null + + @SerializedName("score") + var score: Float? = null + + @SerializedName("image_url") + var image_url: String? = null + +} diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopAnimeResponse.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopAnimeResponse.kt new file mode 100644 index 0000000..95d39d6 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopAnimeResponse.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class TopAnimeResponse { + + @SerializedName("top") + var top: List<TopAnime>? = null + + fun getResults(): List<TopAnime> { + return top!! + } +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopManga.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopManga.kt new file mode 100644 index 0000000..2e0886a --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopManga.kt @@ -0,0 +1,35 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +//Content of the top field from the api of top manga +class TopManga { + + @SerializedName("mal_id") + var mal_id: Int? = null + + @SerializedName("rank") + var rank: Int? = null + + @SerializedName("title") + var title: String? = null + + @SerializedName("url") + var url: String? = null + + @SerializedName("volumes") + var volumes: Int? = null + + @SerializedName("start_date") + var start_date: String? = null + + @SerializedName("end_date") + var end_date: String? = null + + @SerializedName("score") + var score: Float? = null + + @SerializedName("image_url") + var image_url: String? = null + +} diff --git a/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopMangaResponse.kt b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopMangaResponse.kt new file mode 100644 index 0000000..1b0dd8f --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/presentation/model/TopMangaResponse.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.presentation.model + +import com.google.gson.annotations.SerializedName + +class TopMangaResponse { + + @SerializedName("top") + private lateinit var top: List<TopManga> + + fun getResults(): List<TopManga> { + return top + } +}
\ No newline at end of file |