diff options
author | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-03-23 11:47:53 +0100 |
---|---|---|
committer | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-03-23 11:47:53 +0100 |
commit | ac929460d07e0d0ef8c6b4ea569a2b2c6daa3b13 (patch) | |
tree | 60a61b83adfee2a887461a1004f66254c4499b3f /app/src/main/java/xyz/adjutor/aniki/data | |
parent | a056ae61750af9f4fa4e3538dfaebc73bd13a82f (diff) |
Refactoring into MVC
Diffstat (limited to 'app/src/main/java/xyz/adjutor/aniki/data')
6 files changed, 78 insertions, 0 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/data/AnimeApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/AnimeApi.kt new file mode 100644 index 0000000..d67d0ef --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/data/AnimeApi.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.data + +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Path +import xyz.adjutor.aniki.presentation.model.AnimeResponse + +interface AnimeApi { + + @GET("v3/anime/{id}") + fun getAnimeData(@Path("id") id: String): Call<AnimeResponse> + +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/MangaApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/MangaApi.kt new file mode 100644 index 0000000..699efa4 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/data/MangaApi.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.data + +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Path +import xyz.adjutor.aniki.presentation.model.MangaResponse + +interface MangaApi { + + @GET("v3/manga/{id}") + fun getMangaData(@Path("id") id: String): Call<MangaResponse> + +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/SearchAnimeApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/SearchAnimeApi.kt new file mode 100644 index 0000000..1b0811b --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/data/SearchAnimeApi.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.data + +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Query +import xyz.adjutor.aniki.presentation.model.SearchAnimeResponse + +interface SearchAnimeApi { + + @GET("v3/search/anime") + fun getSearchAnimeData(@Query("q") q: String): Call<SearchAnimeResponse> + +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/SearchMangaApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/SearchMangaApi.kt new file mode 100644 index 0000000..3b26c1a --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/data/SearchMangaApi.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.data + +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Query +import xyz.adjutor.aniki.presentation.model.SearchMangaResponse + +interface SearchMangaApi { + + @GET("v3/search/manga") + fun getSearchMangaData(@Query("q") q: String): Call<SearchMangaResponse> + +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/TopAnimeApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/TopAnimeApi.kt new file mode 100644 index 0000000..39bd78b --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/data/TopAnimeApi.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.data + +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Path +import xyz.adjutor.aniki.presentation.model.TopAnimeResponse + +interface TopAnimeApi { + + @GET("v3/top/anime/{page}") + fun getTopAnimeData(@Path("page") page: Int): Call<TopAnimeResponse> + +}
\ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/TopMangaApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/TopMangaApi.kt new file mode 100644 index 0000000..8edab88 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/data/TopMangaApi.kt @@ -0,0 +1,13 @@ +package xyz.adjutor.aniki.data + +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Path +import xyz.adjutor.aniki.presentation.model.TopMangaResponse + +interface TopMangaApi { + + @GET("v3/top/manga/{page}") + fun getTopMangaData(@Path("page") page: Int): Call<TopMangaResponse> + +}
\ No newline at end of file |