-
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.
Adding Model Classes for API responses
- Loading branch information
1 parent
0a24f58
commit ce0b606
Showing
9 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/satyamthakur/silver/domain/model/Dates.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,6 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
data class Dates( | ||
val maximum: String, | ||
val minimum: String | ||
) |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/satyamthakur/silver/domain/model/Genre.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,6 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
data class Genre( | ||
val id: Int, | ||
val name: String | ||
) |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/satyamthakur/silver/domain/model/MovieDetailsResponse.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,29 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
data class MovieDetailsResponse( | ||
val adult: Boolean, | ||
val backdrop_path: String, | ||
val belongs_to_collection: Any, | ||
val budget: Int, | ||
val genres: List<Genre>, | ||
val homepage: String, | ||
val id: Int, | ||
val imdb_id: String, | ||
val original_language: String, | ||
val original_title: String, | ||
val overview: String, | ||
val popularity: Double, | ||
val poster_path: String, | ||
val production_companies: List<ProductionCompany>, | ||
val production_countries: List<ProductionCountry>, | ||
val release_date: String, | ||
val revenue: Int, | ||
val runtime: Int, | ||
val spoken_languages: List<SpokenLanguage>, | ||
val status: String, | ||
val tagline: String, | ||
val title: String, | ||
val video: Boolean, | ||
val vote_average: Double, | ||
val vote_count: Int | ||
) |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/satyamthakur/silver/domain/model/NowPlayingMoviesResponse.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,9 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
data class NowPlayingMoviesResponse( | ||
val dates: Dates, | ||
val page: Int, | ||
val results: List<Result>, | ||
val total_pages: Int, | ||
val total_results: Int | ||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/satyamthakur/silver/domain/model/PopularMoviesResponse.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,8 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
class PopularMoviesResponse( | ||
val page: Int, | ||
val results: List<Result>, | ||
val total_pages: Int, | ||
val total_results: Int | ||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/satyamthakur/silver/domain/model/ProductionCompany.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,8 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
data class ProductionCompany( | ||
val id: Int, | ||
val logo_path: String, | ||
val name: String, | ||
val origin_country: String | ||
) |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/satyamthakur/silver/domain/model/ProductionCountry.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,6 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
data class ProductionCountry( | ||
val iso_3166_1: String, | ||
val name: String | ||
) |
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/satyamthakur/silver/domain/model/Result.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 | ||
|
||
data class Result( | ||
val adult: Boolean, | ||
val backdrop_path: String, | ||
val genre_ids: List<Int>, | ||
val id: Int, | ||
val original_language: String, | ||
val original_title: String, | ||
val overview: String, | ||
val popularity: Double, | ||
val poster_path: String, | ||
val release_date: String, | ||
val title: String, | ||
val video: Boolean, | ||
val vote_average: Double, | ||
val vote_count: Int | ||
) |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/satyamthakur/silver/domain/model/SpokenLanguage.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,7 @@ | ||
package com.satyamthakur.silver.domain.model | ||
|
||
data class SpokenLanguage( | ||
val english_name: String, | ||
val iso_639_1: String, | ||
val name: String | ||
) |