-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate Character and Episode API Services (#66)
- Loading branch information
Showing
32 changed files
with
213 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...morty/data/characters/dao/CharacterDao.kt → ...ty/data/characters/db/dao/CharacterDao.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...data/characters/entity/CharacterEntity.kt → ...a/characters/db/entity/CharacterEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
app/src/main/kotlin/com/mohsenoid/rickandmorty/data/characters/mapper/CharacterMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/src/main/kotlin/com/mohsenoid/rickandmorty/data/characters/remote/CharacterApiService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.mohsenoid.rickandmorty.data.characters.remote | ||
|
||
import com.mohsenoid.rickandmorty.data.characters.remote.model.CharacterRemoteModel | ||
import com.mohsenoid.rickandmorty.data.characters.remote.model.CharactersResponse | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
import retrofit2.http.Path | ||
|
||
internal interface CharacterApiService { | ||
@GET("character/{characterIds}") | ||
suspend fun getCharacters( | ||
@Path("characterIds") characterIds: String, | ||
): Response<CharactersResponse> | ||
|
||
@GET("character/{characterId}") | ||
suspend fun getCharacter( | ||
@Path("characterId") characterId: Int, | ||
): Response<CharacterRemoteModel> | ||
} |
2 changes: 1 addition & 1 deletion
2
...data/remote/model/CharacterRemoteModel.kt → ...ters/remote/model/CharacterRemoteModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...y/data/remote/model/CharactersResponse.kt → ...acters/remote/model/CharactersResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package com.mohsenoid.rickandmorty.data.remote.model | ||
package com.mohsenoid.rickandmorty.data.characters.remote.model | ||
|
||
internal typealias CharactersResponse = List<CharacterRemoteModel> |
2 changes: 1 addition & 1 deletion
2
.../data/remote/model/LocationRemoteModel.kt → ...cters/remote/model/LocationRemoteModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ty/data/remote/model/OriginRemoteModel.kt → ...racters/remote/model/OriginRemoteModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...kandmorty/data/episodes/dao/EpisodeDao.kt → ...dmorty/data/episodes/db/dao/EpisodeDao.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rty/data/episodes/entity/EpisodeEntity.kt → .../data/episodes/db/entity/EpisodeEntity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
app/src/main/kotlin/com/mohsenoid/rickandmorty/data/episodes/mapper/EpisodeMapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
app/src/main/kotlin/com/mohsenoid/rickandmorty/data/episodes/remote/EpisodeApiService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.mohsenoid.rickandmorty.data.episodes.remote | ||
|
||
import com.mohsenoid.rickandmorty.data.episodes.remote.model.EpisodesResponse | ||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
import retrofit2.http.Query | ||
|
||
internal interface EpisodeApiService { | ||
@GET("episode") | ||
suspend fun getEpisodes( | ||
@Query("page") page: Int, | ||
): Response<EpisodesResponse> | ||
} |
2 changes: 1 addition & 1 deletion
2
...y/data/remote/model/EpisodeRemoteModel.kt → ...isodes/remote/model/EpisodeRemoteModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rty/data/remote/model/EpisodesResponse.kt → ...episodes/remote/model/EpisodesResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...orty/data/remote/model/InfoRemoteModel.kt → .../episodes/remote/model/InfoRemoteModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
app/src/main/kotlin/com/mohsenoid/rickandmorty/data/remote/ApiService.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.