mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-16 16:50:55 -05:00
add more items to detail tv
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.owenlejeune.tvtime.api.tmdb.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class BaseEpisode(
|
||||
@SerializedName("air_date") val airDate: String,
|
||||
@SerializedName("episode_number") val episodeNumber: Int,
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("name") val name: String,
|
||||
@SerializedName("production_code") val productionCode: String,
|
||||
@SerializedName("season_number") val seasonNumber: Int,
|
||||
@SerializedName("still_path") val stillPath: String?,
|
||||
@SerializedName("vote_average") val voteAverage: Float,
|
||||
@SerializedName("vote_count") val voteCount: Int
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.owenlejeune.tvtime.api.tmdb.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Season(
|
||||
data class BaseSeason(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("air_date") val airDate: String,
|
||||
@SerializedName("episode_count") val episodeCount: Int,
|
||||
@@ -1,14 +1,22 @@
|
||||
package com.owenlejeune.tvtime.api.tmdb.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
abstract class DetailedItem(
|
||||
id: Int,
|
||||
title: String,
|
||||
posterPath: String?,
|
||||
@Transient open val backdropPath: String?,
|
||||
@Transient open val genres: List<Genre>,
|
||||
@Transient open val overview: String?,
|
||||
@Transient open val productionCompanies: List<ProductionCompany>,
|
||||
@Transient open val status: Status,
|
||||
@Transient open val tagline: String?,
|
||||
@Transient open val voteAverage: Float
|
||||
@SerializedName("backdrop_path") val backdropPath: String?,
|
||||
@SerializedName("genres") val genres: List<Genre>,
|
||||
@SerializedName("overview") val overview: String?,
|
||||
@SerializedName("production_companies") val productionCompanies: List<ProductionCompany>,
|
||||
@SerializedName("production_countries") val productionCountries: List<ProductionCountry>,
|
||||
@SerializedName("status") val status: Status,
|
||||
@SerializedName("tagline") val tagline: String?,
|
||||
@SerializedName("vote_average") val voteAverage: Float,
|
||||
@SerializedName("vote_count") val voteCount: Int,
|
||||
@SerializedName("original_language") val originalLanguage: String,
|
||||
@SerializedName("original_name", alternate = ["original_title"]) val originalTitle: String,
|
||||
@SerializedName("popularity") val popularity: Float,
|
||||
@SerializedName("spoken_languages") val spokenLanguages: List<SpokenLanguage>,
|
||||
): TmdbItem(id, posterPath, title)
|
||||
@@ -5,24 +5,28 @@ import com.google.gson.annotations.SerializedName
|
||||
class DetailedMovie(
|
||||
id: Int,
|
||||
posterPath: String?,
|
||||
@SerializedName("title") override val title: String,
|
||||
@SerializedName("backdrop_path") override val backdropPath: String?,
|
||||
@SerializedName("genres") override val genres: List<Genre>,
|
||||
@SerializedName("overview") override val overview: String?,
|
||||
@SerializedName("production_companies") override val productionCompanies: List<ProductionCompany>,
|
||||
@SerializedName("status") override val status: Status,
|
||||
@SerializedName("tagline") override val tagline: String?,
|
||||
@SerializedName("vote_average") override val voteAverage: Float,
|
||||
title: String,
|
||||
backdropPath: String?,
|
||||
genres: List<Genre>,
|
||||
overview: String?,
|
||||
productionCompanies: List<ProductionCompany>,
|
||||
productionCountries: List<ProductionCountry>,
|
||||
status: Status,
|
||||
tagline: String?,
|
||||
voteAverage: Float,
|
||||
voteCount: Int,
|
||||
originalLanguage: String,
|
||||
originalTitle: String,
|
||||
popularity: Float,
|
||||
spokenLanguages: List<SpokenLanguage>,
|
||||
@SerializedName("adult") val isAdult: Boolean,
|
||||
@SerializedName("budget") val budget: Int,
|
||||
@SerializedName("release_date") val releaseDate: String,
|
||||
@SerializedName("revenue") val revenue: Int,
|
||||
@SerializedName("runtime") val runtime: Int?,
|
||||
@SerializedName("imdb_id") val imdbId: String?,
|
||||
@SerializedName("original_language") val originalLanguage: String,
|
||||
@SerializedName("popularity") val popularity: Float,
|
||||
@SerializedName("production_countries") val productionCountries: List<ProductionCountry>,
|
||||
@SerializedName("spoken_languages") val spokenLanguages: List<SpokenLanguage>,
|
||||
@SerializedName("original_title") val originalTitle: String,
|
||||
@SerializedName("vote_count") val voteCount: Int
|
||||
): DetailedItem(id, title, posterPath, backdropPath, genres, overview, productionCompanies, status, tagline, voteAverage)
|
||||
): DetailedItem(
|
||||
id, title, posterPath, backdropPath, genres, overview,
|
||||
productionCompanies, productionCountries, status, tagline, voteAverage,
|
||||
voteCount, originalLanguage, originalTitle, popularity, spokenLanguages
|
||||
)
|
||||
|
||||
@@ -5,14 +5,20 @@ import com.google.gson.annotations.SerializedName
|
||||
class DetailedTv(
|
||||
id: Int,
|
||||
posterPath: String?,
|
||||
@SerializedName("name") override val title: String,
|
||||
@SerializedName("backdrop_path") override val backdropPath: String?,
|
||||
@SerializedName("genres") override val genres: List<Genre>,
|
||||
@SerializedName("overview") override val overview: String?,
|
||||
@SerializedName("production_companies") override val productionCompanies: List<ProductionCompany>,
|
||||
@SerializedName("status") override val status: Status,
|
||||
@SerializedName("tagline") override val tagline: String?,
|
||||
@SerializedName("vote_average") override val voteAverage: Float,
|
||||
title: String,
|
||||
backdropPath: String?,
|
||||
genres: List<Genre>,
|
||||
overview: String?,
|
||||
productionCompanies: List<ProductionCompany>,
|
||||
productionCountries: List<ProductionCountry>,
|
||||
status: Status,
|
||||
tagline: String?,
|
||||
voteAverage: Float,
|
||||
voteCount: Int,
|
||||
originalLanguage: String,
|
||||
originalName: String,
|
||||
popularity: Float,
|
||||
spokenLanguages: List<SpokenLanguage>,
|
||||
@SerializedName("created_by") val createdBy: List<Person>,
|
||||
@SerializedName("first_air_date") val firstAirDate: String,
|
||||
@SerializedName("last_air_date") val lastAirDate: String,
|
||||
@@ -20,6 +26,14 @@ class DetailedTv(
|
||||
@SerializedName("networks") val networks: List<Network>,
|
||||
@SerializedName("number_of_episodes") val numberOfEpisodes: Int,
|
||||
@SerializedName("number_of_seasons") val numberOfSeasons: Int,
|
||||
@SerializedName("seasons") val seasons: List<Season>,
|
||||
@SerializedName("episode_run_time") val episodeRuntime: List<Int>
|
||||
): DetailedItem(id, title, posterPath, backdropPath, genres, overview, productionCompanies, status, tagline, voteAverage)
|
||||
@SerializedName("seasons") val seasons: List<BaseSeason>,
|
||||
@SerializedName("episode_run_time") val episodeRuntime: List<Int>,
|
||||
@SerializedName("languages") val languages: List<String>,
|
||||
@SerializedName("last_episode_to_air") val lastEpisodeToAir: BaseEpisode,
|
||||
@SerializedName("origin_country") val originCountry: List<String>,
|
||||
@SerializedName("type") val type: String
|
||||
): DetailedItem(
|
||||
id, title, posterPath, backdropPath, genres, overview,
|
||||
productionCompanies, productionCountries, status, tagline, voteAverage,
|
||||
voteCount, originalLanguage, originalName, popularity, spokenLanguages
|
||||
)
|
||||
@@ -5,5 +5,5 @@ import com.google.gson.annotations.SerializedName
|
||||
class HomePageMovie(
|
||||
id: Int,
|
||||
posterPath: String?,
|
||||
@SerializedName("title") override val title: String
|
||||
title: String
|
||||
): TmdbItem(id, posterPath, title)
|
||||
@@ -5,5 +5,5 @@ import com.google.gson.annotations.SerializedName
|
||||
class HomePageTv(
|
||||
id: Int,
|
||||
posterPath: String?,
|
||||
@SerializedName("name") override val title: String,
|
||||
title: String,
|
||||
): TmdbItem(id, posterPath, title)
|
||||
@@ -5,5 +5,5 @@ import com.google.gson.annotations.SerializedName
|
||||
abstract class TmdbItem(
|
||||
@SerializedName("id") val id: Int,
|
||||
@SerializedName("poster_path") val posterPath: String?,
|
||||
@Transient open val title: String
|
||||
@SerializedName("name", alternate = ["title"]) val title: String
|
||||
)
|
||||
Reference in New Issue
Block a user