From 8ede9457fd21ac5e272e73f5ece1d4bc9c23faab Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Wed, 19 May 2021 10:07:23 +0200 Subject: Big update Restructuring the packages and adding a Constants.kt for the api URL. Also adding gson in Singletons.kt --- app/src/main/java/xyz/adjutor/aniki/data/AnimeApi.kt | 13 +++++++++++++ app/src/main/java/xyz/adjutor/aniki/data/MangaApi.kt | 13 +++++++++++++ app/src/main/java/xyz/adjutor/aniki/data/SearchAnimeApi.kt | 13 +++++++++++++ app/src/main/java/xyz/adjutor/aniki/data/SearchMangaApi.kt | 13 +++++++++++++ app/src/main/java/xyz/adjutor/aniki/data/TopAnimeApi.kt | 13 +++++++++++++ app/src/main/java/xyz/adjutor/aniki/data/TopMangaApi.kt | 13 +++++++++++++ app/src/main/java/xyz/adjutor/aniki/data/anime/AnimeApi.kt | 13 ------------- .../java/xyz/adjutor/aniki/data/anime/SearchAnimeApi.kt | 13 ------------- .../main/java/xyz/adjutor/aniki/data/anime/TopAnimeApi.kt | 13 ------------- app/src/main/java/xyz/adjutor/aniki/data/manga/MangaApi.kt | 13 ------------- .../java/xyz/adjutor/aniki/data/manga/SearchMangaApi.kt | 13 ------------- .../main/java/xyz/adjutor/aniki/data/manga/TopMangaApi.kt | 13 ------------- 12 files changed, 78 insertions(+), 78 deletions(-) create mode 100644 app/src/main/java/xyz/adjutor/aniki/data/AnimeApi.kt create mode 100644 app/src/main/java/xyz/adjutor/aniki/data/MangaApi.kt create mode 100644 app/src/main/java/xyz/adjutor/aniki/data/SearchAnimeApi.kt create mode 100644 app/src/main/java/xyz/adjutor/aniki/data/SearchMangaApi.kt create mode 100644 app/src/main/java/xyz/adjutor/aniki/data/TopAnimeApi.kt create mode 100644 app/src/main/java/xyz/adjutor/aniki/data/TopMangaApi.kt delete mode 100644 app/src/main/java/xyz/adjutor/aniki/data/anime/AnimeApi.kt delete mode 100644 app/src/main/java/xyz/adjutor/aniki/data/anime/SearchAnimeApi.kt delete mode 100644 app/src/main/java/xyz/adjutor/aniki/data/anime/TopAnimeApi.kt delete mode 100644 app/src/main/java/xyz/adjutor/aniki/data/manga/MangaApi.kt delete mode 100644 app/src/main/java/xyz/adjutor/aniki/data/manga/SearchMangaApi.kt delete mode 100644 app/src/main/java/xyz/adjutor/aniki/data/manga/TopMangaApi.kt (limited to 'app/src/main/java/xyz/adjutor/aniki/data') 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..0f0cb17 --- /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.response.AnimeResponse + +interface AnimeApi { + + @GET("v3/anime/{id}") + fun getAnimeData(@Path("id") id: String): Call + +} \ 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..c6236b4 --- /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.response.MangaResponse + +interface MangaApi { + + @GET("v3/manga/{id}") + fun getMangaData(@Path("id") id: String): Call + +} \ 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..6ff1439 --- /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.response.SearchAnimeResponse + +interface SearchAnimeApi { + + @GET("v3/search/anime") + fun getSearchAnimeData(@Query("q") q: String): Call + +} \ 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..6b679b7 --- /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.response.SearchMangaResponse + +interface SearchMangaApi { + + @GET("v3/search/manga") + fun getSearchMangaData(@Query("q") q: String): Call + +} \ 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..d850c2a --- /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.response.TopAnimeResponse + +interface TopAnimeApi { + + @GET("v3/top/anime/{page}") + fun getTopAnimeData(@Path("page") page: Int): Call + +} \ 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..c9bb53b --- /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.response.TopMangaResponse + +interface TopMangaApi { + + @GET("v3/top/manga/{page}") + fun getTopMangaData(@Path("page") page: Int): Call + +} \ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/anime/AnimeApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/anime/AnimeApi.kt deleted file mode 100644 index 24e5cd7..0000000 --- a/app/src/main/java/xyz/adjutor/aniki/data/anime/AnimeApi.kt +++ /dev/null @@ -1,13 +0,0 @@ -package xyz.adjutor.aniki.data.anime - -import retrofit2.Call -import retrofit2.http.GET -import retrofit2.http.Path -import xyz.adjutor.aniki.presentation.model.anime.AnimeResponse - -interface AnimeApi { - - @GET("v3/anime/{id}") - fun getAnimeData(@Path("id") id: String): Call - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/anime/SearchAnimeApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/anime/SearchAnimeApi.kt deleted file mode 100644 index 9bd6b2d..0000000 --- a/app/src/main/java/xyz/adjutor/aniki/data/anime/SearchAnimeApi.kt +++ /dev/null @@ -1,13 +0,0 @@ -package xyz.adjutor.aniki.data.anime - -import retrofit2.Call -import retrofit2.http.GET -import retrofit2.http.Query -import xyz.adjutor.aniki.presentation.model.anime.SearchAnimeResponse - -interface SearchAnimeApi { - - @GET("v3/search/anime") - fun getSearchAnimeData(@Query("q") q: String): Call - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/anime/TopAnimeApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/anime/TopAnimeApi.kt deleted file mode 100644 index 76fd25f..0000000 --- a/app/src/main/java/xyz/adjutor/aniki/data/anime/TopAnimeApi.kt +++ /dev/null @@ -1,13 +0,0 @@ -package xyz.adjutor.aniki.data.anime - -import retrofit2.Call -import retrofit2.http.GET -import retrofit2.http.Path -import xyz.adjutor.aniki.presentation.model.anime.TopAnimeResponse - -interface TopAnimeApi { - - @GET("v3/top/anime/{page}") - fun getTopAnimeData(@Path("page") page: Int): Call - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/manga/MangaApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/manga/MangaApi.kt deleted file mode 100644 index a0f8df1..0000000 --- a/app/src/main/java/xyz/adjutor/aniki/data/manga/MangaApi.kt +++ /dev/null @@ -1,13 +0,0 @@ -package xyz.adjutor.aniki.data.manga - -import retrofit2.Call -import retrofit2.http.GET -import retrofit2.http.Path -import xyz.adjutor.aniki.presentation.model.manga.MangaResponse - -interface MangaApi { - - @GET("v3/manga/{id}") - fun getMangaData(@Path("id") id: String): Call - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/manga/SearchMangaApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/manga/SearchMangaApi.kt deleted file mode 100644 index 6cc2d77..0000000 --- a/app/src/main/java/xyz/adjutor/aniki/data/manga/SearchMangaApi.kt +++ /dev/null @@ -1,13 +0,0 @@ -package xyz.adjutor.aniki.data.manga - -import retrofit2.Call -import retrofit2.http.GET -import retrofit2.http.Query -import xyz.adjutor.aniki.presentation.model.manga.SearchMangaResponse - -interface SearchMangaApi { - - @GET("v3/search/manga") - fun getSearchMangaData(@Query("q") q: String): Call - -} \ No newline at end of file diff --git a/app/src/main/java/xyz/adjutor/aniki/data/manga/TopMangaApi.kt b/app/src/main/java/xyz/adjutor/aniki/data/manga/TopMangaApi.kt deleted file mode 100644 index 222dce3..0000000 --- a/app/src/main/java/xyz/adjutor/aniki/data/manga/TopMangaApi.kt +++ /dev/null @@ -1,13 +0,0 @@ -package xyz.adjutor.aniki.data.manga - -import retrofit2.Call -import retrofit2.http.GET -import retrofit2.http.Path -import xyz.adjutor.aniki.presentation.model.manga.TopMangaResponse - -interface TopMangaApi { - - @GET("v3/top/manga/{page}") - fun getTopMangaData(@Path("page") page: Int): Call - -} \ No newline at end of file -- cgit v1.2.3