From 965a5d66b4268e9e2f5bb5abb0af8d1500085517 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Mon, 22 Feb 2021 18:59:54 +0100 Subject: starting the anime part Reusing what I did with mangas --- app/src/main/java/xyz/adjutor/aniki/anime/AnimeApi.kt | 12 ++++++++++++ .../main/java/xyz/adjutor/aniki/anime/RestAnimeResponse.kt | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 app/src/main/java/xyz/adjutor/aniki/anime/AnimeApi.kt create mode 100644 app/src/main/java/xyz/adjutor/aniki/anime/RestAnimeResponse.kt (limited to 'app') diff --git a/app/src/main/java/xyz/adjutor/aniki/anime/AnimeApi.kt b/app/src/main/java/xyz/adjutor/aniki/anime/AnimeApi.kt new file mode 100644 index 0000000..ceb72b7 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/anime/AnimeApi.kt @@ -0,0 +1,12 @@ +package xyz.adjutor.aniki.anime + +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Path + +interface AnimeApi { + + @GET("v3/anime/{id}") + fun getMangaData(@Path("id") id: String): Call + +} \ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/anime/RestAnimeResponse.kt b/app/src/main/java/xyz/adjutor/aniki/anime/RestAnimeResponse.kt new file mode 100644 index 0000000..747ddaf --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/anime/RestAnimeResponse.kt @@ -0,0 +1,14 @@ +package xyz.adjutor.aniki.anime + +import com.google.gson.annotations.SerializedName + +class RestAnimeResponse{ //only kept the infos I didn't have and that were interesting to me. + + @SerializedName("mal_id") + var mal_id: Int? = null + @SerializedName("synopsis") + var synopsis: String? = null + @SerializedName("background") + var background: String? = null + +} -- cgit v1.2.3