-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Devdroid-Android/development_movie
Development movie screen
- Loading branch information
Showing
23 changed files
with
751 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
app/src/main/java/com/satyamthakur/silver/data/model/cast/ActorDTO.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,47 @@ | ||
package com.satyamthakur.silver.data.model.cast | ||
import com.google.gson.annotations.SerializedName | ||
|
||
data class ActorDTO( | ||
@SerializedName("adult") | ||
val adult: Boolean, | ||
|
||
@SerializedName("also_known_as") | ||
val alsoKnownAs: List<String>, | ||
|
||
@SerializedName("biography") | ||
val biography: String, | ||
|
||
@SerializedName("birthday") | ||
val birthday: String, | ||
|
||
@SerializedName("deathday") | ||
val deathDay: String?, | ||
|
||
@SerializedName("gender") | ||
val gender: Int, | ||
|
||
@SerializedName("homepage") | ||
val homepage: String?, | ||
|
||
@SerializedName("id") | ||
val id: Int, | ||
|
||
@SerializedName("imdb_id") | ||
val imdbId: String, | ||
|
||
@SerializedName("known_for_department") | ||
val knownForDepartment: String, | ||
|
||
@SerializedName("name") | ||
val actorName: String, | ||
|
||
@SerializedName("place_of_birth") | ||
val placeOfBirth: String, | ||
|
||
@SerializedName("popularity") | ||
val popularity: Double, | ||
|
||
@SerializedName("profile_path") | ||
val profilePath: String, | ||
|
||
) |
42 changes: 42 additions & 0 deletions
42
app/src/main/java/com/satyamthakur/silver/data/model/cast/CastDTO.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,42 @@ | ||
package com.satyamthakur.silver.data.model.cast | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class CastDTO( | ||
|
||
@SerializedName("adult") | ||
val adult: Boolean, | ||
|
||
@SerializedName("cast_id") | ||
val castId: Int, | ||
|
||
@SerializedName("character") | ||
val character: String, | ||
|
||
@SerializedName("credit_id") | ||
val creditId: String, | ||
|
||
@SerializedName("gender") | ||
val gender: Int, | ||
|
||
@SerializedName("id") | ||
val actorId: Int, | ||
|
||
@SerializedName("known_for_department") | ||
val knownForDepartment: String, | ||
|
||
@SerializedName("name") | ||
val name: String, | ||
|
||
@SerializedName("order") | ||
val order: Int, | ||
|
||
@SerializedName("original_name") | ||
val originalName: String, | ||
|
||
@SerializedName("popularity") | ||
val popularity: Double, | ||
|
||
@SerializedName("profile_path") | ||
val profilePath: String | ||
) |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/satyamthakur/silver/data/model/cast/CreditsDTO.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,14 @@ | ||
package com.satyamthakur.silver.data.model.cast | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class CreditsDTO( | ||
@SerializedName("cast") | ||
val cast: List<CastDTO>, | ||
|
||
@SerializedName("crew") | ||
val crew: List<CrewDTO>, | ||
|
||
@SerializedName("id") | ||
val movieId: Int | ||
) |
39 changes: 39 additions & 0 deletions
39
app/src/main/java/com/satyamthakur/silver/data/model/cast/CrewDTO.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,39 @@ | ||
package com.satyamthakur.silver.data.model.cast | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class CrewDTO( | ||
|
||
@SerializedName("adult") | ||
val adult: Boolean, | ||
|
||
@SerializedName("credit_id") | ||
val creditId: String, | ||
|
||
@SerializedName("department") | ||
val department: String, | ||
|
||
@SerializedName("gender") | ||
val gender: Int, | ||
|
||
@SerializedName("id") | ||
val crewId: Int, | ||
|
||
@SerializedName("job") | ||
val job: String, | ||
|
||
@SerializedName("known_for_department") | ||
val knownForDepartment: String, | ||
|
||
@SerializedName("name") | ||
val name: String, | ||
|
||
@SerializedName("original_name") | ||
val originalName: String, | ||
|
||
@SerializedName("popularity") | ||
val popularity: Double, | ||
|
||
@SerializedName("profile_path") | ||
val profilePath: String | ||
) |
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
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/satyamthakur/silver/data/repository/IMovieRepository.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,10 +1,15 @@ | ||
package com.satyamthakur.silver.data.repository | ||
|
||
import com.satyamthakur.silver.domain.model.Movie | ||
import com.satyamthakur.silver.domain.model.cast.Actor | ||
import com.satyamthakur.silver.domain.model.cast.Credits | ||
import com.satyamthakur.silver.utility.Resource | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface IMovieRepository { | ||
fun getNowShowingMovies(): Flow<Resource<List<Movie>>> | ||
fun getPopularMovies(): Flow<Resource<List<Movie>>> | ||
fun getActor(actorId: Int): Flow<Resource<Actor>> | ||
fun getCredits(movieId: Int): Flow<Resource<Credits>> | ||
} | ||
|
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
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/satyamthakur/silver/domain/model/cast/Actor.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,18 @@ | ||
package com.satyamthakur.silver.domain.model.cast | ||
|
||
data class Actor( | ||
val adult: Boolean, | ||
val also_known_as: List<String>, | ||
val biography: String, | ||
val birthday: String, | ||
val deathday: String?, | ||
val gender: Int, | ||
val homepage: String?, | ||
val id: Int, | ||
val imdb_id: String, | ||
val known_for_department: String, | ||
val name: String, | ||
val place_of_birth: String, | ||
val popularity: Double, | ||
val profile_path: String | ||
) |
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/satyamthakur/silver/domain/model/cast/Cast.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,16 @@ | ||
package com.satyamthakur.silver.domain.model.cast | ||
|
||
data class Cast( | ||
val adult: Boolean, | ||
val castId: Int, | ||
val character: String, | ||
val creditId: String, | ||
val gender: Int, | ||
val actorId: Int, | ||
val knownForDepartment: String, | ||
val name: String, | ||
val order: Int, | ||
val originalName: String, | ||
val popularity: Double, | ||
val profilePath: String | ||
) |
Oops, something went wrong.