mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-17 17:21:06 -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
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
data class Season(
|
data class BaseSeason(
|
||||||
@SerializedName("id") val id: Int,
|
@SerializedName("id") val id: Int,
|
||||||
@SerializedName("air_date") val airDate: String,
|
@SerializedName("air_date") val airDate: String,
|
||||||
@SerializedName("episode_count") val episodeCount: Int,
|
@SerializedName("episode_count") val episodeCount: Int,
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
package com.owenlejeune.tvtime.api.tmdb.model
|
package com.owenlejeune.tvtime.api.tmdb.model
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
abstract class DetailedItem(
|
abstract class DetailedItem(
|
||||||
id: Int,
|
id: Int,
|
||||||
title: String,
|
title: String,
|
||||||
posterPath: String?,
|
posterPath: String?,
|
||||||
@Transient open val backdropPath: String?,
|
@SerializedName("backdrop_path") val backdropPath: String?,
|
||||||
@Transient open val genres: List<Genre>,
|
@SerializedName("genres") val genres: List<Genre>,
|
||||||
@Transient open val overview: String?,
|
@SerializedName("overview") val overview: String?,
|
||||||
@Transient open val productionCompanies: List<ProductionCompany>,
|
@SerializedName("production_companies") val productionCompanies: List<ProductionCompany>,
|
||||||
@Transient open val status: Status,
|
@SerializedName("production_countries") val productionCountries: List<ProductionCountry>,
|
||||||
@Transient open val tagline: String?,
|
@SerializedName("status") val status: Status,
|
||||||
@Transient open val voteAverage: Float
|
@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)
|
): TmdbItem(id, posterPath, title)
|
||||||
@@ -5,24 +5,28 @@ import com.google.gson.annotations.SerializedName
|
|||||||
class DetailedMovie(
|
class DetailedMovie(
|
||||||
id: Int,
|
id: Int,
|
||||||
posterPath: String?,
|
posterPath: String?,
|
||||||
@SerializedName("title") override val title: String,
|
title: String,
|
||||||
@SerializedName("backdrop_path") override val backdropPath: String?,
|
backdropPath: String?,
|
||||||
@SerializedName("genres") override val genres: List<Genre>,
|
genres: List<Genre>,
|
||||||
@SerializedName("overview") override val overview: String?,
|
overview: String?,
|
||||||
@SerializedName("production_companies") override val productionCompanies: List<ProductionCompany>,
|
productionCompanies: List<ProductionCompany>,
|
||||||
@SerializedName("status") override val status: Status,
|
productionCountries: List<ProductionCountry>,
|
||||||
@SerializedName("tagline") override val tagline: String?,
|
status: Status,
|
||||||
@SerializedName("vote_average") override val voteAverage: Float,
|
tagline: String?,
|
||||||
|
voteAverage: Float,
|
||||||
|
voteCount: Int,
|
||||||
|
originalLanguage: String,
|
||||||
|
originalTitle: String,
|
||||||
|
popularity: Float,
|
||||||
|
spokenLanguages: List<SpokenLanguage>,
|
||||||
@SerializedName("adult") val isAdult: Boolean,
|
@SerializedName("adult") val isAdult: Boolean,
|
||||||
@SerializedName("budget") val budget: Int,
|
@SerializedName("budget") val budget: Int,
|
||||||
@SerializedName("release_date") val releaseDate: String,
|
@SerializedName("release_date") val releaseDate: String,
|
||||||
@SerializedName("revenue") val revenue: Int,
|
@SerializedName("revenue") val revenue: Int,
|
||||||
@SerializedName("runtime") val runtime: Int?,
|
@SerializedName("runtime") val runtime: Int?,
|
||||||
@SerializedName("imdb_id") val imdbId: String?,
|
@SerializedName("imdb_id") val imdbId: String?,
|
||||||
@SerializedName("original_language") val originalLanguage: String,
|
): DetailedItem(
|
||||||
@SerializedName("popularity") val popularity: Float,
|
id, title, posterPath, backdropPath, genres, overview,
|
||||||
@SerializedName("production_countries") val productionCountries: List<ProductionCountry>,
|
productionCompanies, productionCountries, status, tagline, voteAverage,
|
||||||
@SerializedName("spoken_languages") val spokenLanguages: List<SpokenLanguage>,
|
voteCount, originalLanguage, originalTitle, popularity, spokenLanguages
|
||||||
@SerializedName("original_title") val originalTitle: String,
|
)
|
||||||
@SerializedName("vote_count") val voteCount: Int
|
|
||||||
): DetailedItem(id, title, posterPath, backdropPath, genres, overview, productionCompanies, status, tagline, voteAverage)
|
|
||||||
|
|||||||
@@ -5,14 +5,20 @@ import com.google.gson.annotations.SerializedName
|
|||||||
class DetailedTv(
|
class DetailedTv(
|
||||||
id: Int,
|
id: Int,
|
||||||
posterPath: String?,
|
posterPath: String?,
|
||||||
@SerializedName("name") override val title: String,
|
title: String,
|
||||||
@SerializedName("backdrop_path") override val backdropPath: String?,
|
backdropPath: String?,
|
||||||
@SerializedName("genres") override val genres: List<Genre>,
|
genres: List<Genre>,
|
||||||
@SerializedName("overview") override val overview: String?,
|
overview: String?,
|
||||||
@SerializedName("production_companies") override val productionCompanies: List<ProductionCompany>,
|
productionCompanies: List<ProductionCompany>,
|
||||||
@SerializedName("status") override val status: Status,
|
productionCountries: List<ProductionCountry>,
|
||||||
@SerializedName("tagline") override val tagline: String?,
|
status: Status,
|
||||||
@SerializedName("vote_average") override val voteAverage: Float,
|
tagline: String?,
|
||||||
|
voteAverage: Float,
|
||||||
|
voteCount: Int,
|
||||||
|
originalLanguage: String,
|
||||||
|
originalName: String,
|
||||||
|
popularity: Float,
|
||||||
|
spokenLanguages: List<SpokenLanguage>,
|
||||||
@SerializedName("created_by") val createdBy: List<Person>,
|
@SerializedName("created_by") val createdBy: List<Person>,
|
||||||
@SerializedName("first_air_date") val firstAirDate: String,
|
@SerializedName("first_air_date") val firstAirDate: String,
|
||||||
@SerializedName("last_air_date") val lastAirDate: String,
|
@SerializedName("last_air_date") val lastAirDate: String,
|
||||||
@@ -20,6 +26,14 @@ class DetailedTv(
|
|||||||
@SerializedName("networks") val networks: List<Network>,
|
@SerializedName("networks") val networks: List<Network>,
|
||||||
@SerializedName("number_of_episodes") val numberOfEpisodes: Int,
|
@SerializedName("number_of_episodes") val numberOfEpisodes: Int,
|
||||||
@SerializedName("number_of_seasons") val numberOfSeasons: Int,
|
@SerializedName("number_of_seasons") val numberOfSeasons: Int,
|
||||||
@SerializedName("seasons") val seasons: List<Season>,
|
@SerializedName("seasons") val seasons: List<BaseSeason>,
|
||||||
@SerializedName("episode_run_time") val episodeRuntime: List<Int>
|
@SerializedName("episode_run_time") val episodeRuntime: List<Int>,
|
||||||
): DetailedItem(id, title, posterPath, backdropPath, genres, overview, productionCompanies, status, tagline, voteAverage)
|
@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(
|
class HomePageMovie(
|
||||||
id: Int,
|
id: Int,
|
||||||
posterPath: String?,
|
posterPath: String?,
|
||||||
@SerializedName("title") override val title: String
|
title: String
|
||||||
): TmdbItem(id, posterPath, title)
|
): TmdbItem(id, posterPath, title)
|
||||||
@@ -5,5 +5,5 @@ import com.google.gson.annotations.SerializedName
|
|||||||
class HomePageTv(
|
class HomePageTv(
|
||||||
id: Int,
|
id: Int,
|
||||||
posterPath: String?,
|
posterPath: String?,
|
||||||
@SerializedName("name") override val title: String,
|
title: String,
|
||||||
): TmdbItem(id, posterPath, title)
|
): TmdbItem(id, posterPath, title)
|
||||||
@@ -5,5 +5,5 @@ import com.google.gson.annotations.SerializedName
|
|||||||
abstract class TmdbItem(
|
abstract class TmdbItem(
|
||||||
@SerializedName("id") val id: Int,
|
@SerializedName("id") val id: Int,
|
||||||
@SerializedName("poster_path") val posterPath: String?,
|
@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