index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
1.07M
signature
stringlengths
2
42.8k
53,146
tmdbapis.objs.base
__str__
null
def __str__(self): if self.id: return f"[{self.id}:{self._name}]" else: return self._name
(self)
53,147
tmdbapis.objs.reload
_append_load
null
def _append_load(self, partial=False): return self._full_load(partial=self._append_str() if partial is False else partial)
(self, partial=False)
53,148
tmdbapis.objs.reload
_append_str
null
def _append_str(self): return None
(self)
53,149
tmdbapis.objs.base
_finish
null
def _finish(self, name): self._name = name self._loading = False
(self, name)
53,150
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.account_get_details()
(self, partial=None)
53,151
tmdbapis.objs.base
_image_url
null
def _image_url(self, image_path): return f"{self._tmdb._image_url}{image_path}" if image_path else None
(self, image_path)
53,152
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(None, partial=partial) self.avatar_hash = self._parse(attrs=["avatar", "gravatar", "hash"]) self.avatar_path = self._parse(attrs=["avatar", "tmdb", "avatar_path"]) self.avatar_url = self._image_url(self.avatar_path) self.country = self._tmdb._get_object(self._data, "country") self.id = self._parse(attrs="id", value_type="int") self.include_adult = self._parse(attrs="include_adult") self.iso_3166_1 = self._parse(attrs="iso_3166_1") self.iso_639_1 = self._parse(attrs="iso_639_1") self.language = self._tmdb._get_object(self._data, "language") self.name = self._parse(attrs="name") self.username = self._parse(attrs="username") self._finish(self.name)
(self, data, partial=False)
53,153
tmdbapis.objs.base
_parse
Validate the value given from the options given. Parameters: attrs (Optional[Union[str, list]]): check data for these attributes. value_type (str): Type that the value is. default_is_none (bool): Makes default None. is_list (bool): value is list of values. is_dict (bool): value is dict of values. extend (bool): value is list of values. key (Any): extra key. Returns: Any: Parsed Value
def _parse(self, data=None, attrs: Optional[Union[str, list]] = None, value_type: str = "str", default_is_none: bool = False, is_list: bool = False, is_dict: bool = False, extend: bool = False, key: Any = None): """ Validate the value given from the options given. Parameters: attrs (Optional[Union[str, list]]): check data for these attributes. value_type (str): Type that the value is. default_is_none (bool): Makes default None. is_list (bool): value is list of values. is_dict (bool): value is dict of values. extend (bool): value is list of values. key (Any): extra key. Returns: Any: Parsed Value """ return self._tmdb._parse(data=self._data if data is None else data, attrs=attrs, value_type=value_type, default_is_none=default_is_none, is_list=is_list, is_dict=is_dict, extend=extend, key=key)
(self, data=None, attrs: Union[str, list, NoneType] = None, value_type: str = 'str', default_is_none: bool = False, is_list: bool = False, is_dict: bool = False, extend: bool = False, key: Optional[Any] = None)
53,154
tmdbapis.objs.reload
created_lists
Alias for :meth:`~.tmdb.TMDbAPIs.created_lists`
def created_lists(self, v3: bool = False): """ Alias for :meth:`~.tmdb.TMDbAPIs.created_lists` """ return self._tmdb.created_lists(v3=v3)
(self, v3: bool = False)
53,155
tmdbapis.objs.reload
favorite_movies
Alias for :meth:`~.tmdb.TMDbAPIs.favorite_movies`
def favorite_movies(self, sort_by: str = None, v3: bool = False): """ Alias for :meth:`~.tmdb.TMDbAPIs.favorite_movies` """ return self._tmdb.favorite_movies(sort_by=sort_by, v3=v3)
(self, sort_by: Optional[str] = None, v3: bool = False)
53,156
tmdbapis.objs.reload
favorite_tv_shows
Alias for :meth:`~.tmdb.TMDbAPIs.favorite_tv_shows`
def favorite_tv_shows(self, sort_by: Optional[str] = None, v3: bool = False): """ Alias for :meth:`~.tmdb.TMDbAPIs.favorite_tv_shows` """ return self._tmdb.favorite_tv_shows(sort_by=sort_by, v3=v3)
(self, sort_by: Optional[str] = None, v3: bool = False)
53,157
tmdbapis.objs.reload
movie_recommendations
Alias for :meth:`~.tmdb.TMDbAPIs.movie_recommendations`
def movie_recommendations(self, sort_by: Optional[str] = None): """ Alias for :meth:`~.tmdb.TMDbAPIs.movie_recommendations` """ return self._tmdb.movie_recommendations(sort_by=sort_by)
(self, sort_by: Optional[str] = None)
53,158
tmdbapis.objs.reload
movie_watchlist
Alias for :meth:`~.tmdb.TMDbAPIs.movie_watchlist`
def movie_watchlist(self, sort_by: Optional[str] = None, v3: bool = False): """ Alias for :meth:`~.tmdb.TMDbAPIs.movie_watchlist` """ return self._tmdb.movie_watchlist(sort_by=sort_by, v3=v3)
(self, sort_by: Optional[str] = None, v3: bool = False)
53,159
tmdbapis.objs.reload
rated_episodes
Alias for :meth:`~.tmdb.TMDbAPIs.rated_episodes`
def rated_episodes(self, sort_by: Optional[str] = None): """ Alias for :meth:`~.tmdb.TMDbAPIs.rated_episodes` """ return self._tmdb.rated_episodes(sort_by=sort_by)
(self, sort_by: Optional[str] = None)
53,160
tmdbapis.objs.reload
rated_movies
Alias for :meth:`~.tmdb.TMDbAPIs.rated_movies`
def rated_movies(self, sort_by: Optional[str] = None, v3: bool = False): """ Alias for :meth:`~.tmdb.TMDbAPIs.rated_movies` """ return self._tmdb.rated_movies(sort_by=sort_by, v3=v3)
(self, sort_by: Optional[str] = None, v3: bool = False)
53,161
tmdbapis.objs.reload
rated_tv_shows
Alias for :meth:`~.tmdb.TMDbAPIs.rated_tv_shows`
def rated_tv_shows(self, sort_by: Optional[str] = None, v3: bool = False): """ Alias for :meth:`~.tmdb.TMDbAPIs.rated_tv_shows` """ return self._tmdb.rated_tv_shows(sort_by=sort_by, v3=v3)
(self, sort_by: Optional[str] = None, v3: bool = False)
53,162
tmdbapis.objs.reload
reload
Reloads the object. Parameters: partial (Optional[Union[bool, str]]): leave False for a full load otherwise specify the endpoints you want added.
def reload(self, partial: Optional[Union[bool, str]] = False): """ Reloads the object. Parameters: partial (Optional[Union[bool, str]]): leave False for a full load otherwise specify the endpoints you want added. """ self._load(None, partial=partial)
(self, partial: Union[bool, str, NoneType] = False)
53,163
tmdbapis.objs.reload
tv_show_recommendations
Alias for :meth:`~.tmdb.TMDbAPIs.tv_show_recommendations`
def tv_show_recommendations(self, sort_by: Optional[str] = None): """ Alias for :meth:`~.tmdb.TMDbAPIs.tv_show_recommendations` """ return self._tmdb.tv_show_recommendations(sort_by=sort_by)
(self, sort_by: Optional[str] = None)
53,164
tmdbapis.objs.reload
tv_show_watchlist
Alias for :meth:`~.tmdb.TMDbAPIs.tv_show_watchlist`
def tv_show_watchlist(self, sort_by: Optional[str] = None, v3: bool = False): """ Alias for :meth:`~.tmdb.TMDbAPIs.tv_show_watchlist` """ return self._tmdb.tv_show_watchlist(sort_by=sort_by, v3=v3)
(self, sort_by: Optional[str] = None, v3: bool = False)
53,165
tmdbapis.objs.simple
AlternativeName
Represents a single Alternative Name. Attributes: name (str): Alternative Name. type (str): Type of Alternative Name.
class AlternativeName(TMDbObj): """ Represents a single Alternative Name. Attributes: name (str): Alternative Name. type (str): Type of Alternative Name. """ def _load(self, data): super()._load(data) self.name = self._parse(attrs="name") self.type = self._parse(attrs="type") self._finish(self.name)
(tmdb: 'TMDbAPIs', data)
53,169
tmdbapis.objs.base
__init__
null
def __init__(self, tmdb: "TMDbAPIs", data): self._loading = True self._partial = False self._name = None self._tmdb = tmdb self._api: "API3" = tmdb._api if tmdb else None self._api4: "API4" = tmdb._api4 if tmdb else None self._load(data)
(self, tmdb: 'TMDbAPIs', data)
53,175
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.name = self._parse(attrs="name") self.type = self._parse(attrs="type") self._finish(self.name)
(self, data)
53,177
tmdbapis.objs.simple
AlternativeTitle
Represents a single Alternative Title. Attributes: title (str): Alternative Title. type (str): Type of Alternative Title.
class AlternativeTitle(TMDbObj): """ Represents a single Alternative Title. Attributes: title (str): Alternative Title. type (str): Type of Alternative Title. """ def _load(self, data): super()._load(data) self.title = self._parse(attrs="title") self.type = self._parse(attrs="type") self._finish(self.title)
(tmdb: 'TMDbAPIs', data)
53,187
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.title = self._parse(attrs="title") self.type = self._parse(attrs="type") self._finish(self.title)
(self, data)
53,189
tmdbapis.exceptions
Authentication
Operation requires Authentication
class Authentication(TMDbException): """ Operation requires Authentication """ pass
null
53,190
tmdbapis.objs.image
Backdrop
Represents a single Backdrop Image.
class Backdrop(TMDbImage): """ Represents a single Backdrop Image. """ def __init__(self, tmdb, data): super().__init__(tmdb, data, "Backdrop")
(tmdb, data)
53,194
tmdbapis.objs.image
__init__
null
def __init__(self, tmdb, data): super().__init__(tmdb, data, "Backdrop")
(self, tmdb, data)
53,197
tmdbapis.objs.image
__str__
null
def __str__(self): return f"[{self._image_type}:{self.file_path}]"
(self)
53,200
tmdbapis.objs.image
_load
null
def _load(self, data): super()._load(data) self.aspect_ratio = self._parse(attrs="aspect_ratio", value_type="float") self.file_path = self._parse(attrs="file_path") self.file_type = self._parse(attrs="file_type") self.height = self._parse(attrs="height", value_type="int") self.id = self._parse(attrs="id", value_type="str") self.iso_639_1 = self._parse(attrs="iso_639_1") self.language = self._tmdb._get_object(self._data, "language") self.url = self._image_url(self.file_path) self.vote_average = self._parse(attrs="vote_average", value_type="float") self.vote_count = self._parse(attrs="vote_count", value_type="int") self.width = self._parse(attrs="width", value_type="int") self._finish(self.file_path)
(self, data)
53,202
tmdbapis.objs.simple
Certification
Represents a single Certification. Attributes: certification (str): Certification text. meaning (str): Certification meaning. order (int): Certification Order.
class Certification(TMDbObj): """ Represents a single Certification. Attributes: certification (str): Certification text. meaning (str): Certification meaning. order (int): Certification Order. """ def _load(self, data): super()._load(data) self.certification = self._parse(attrs="certification") self.meaning = self._parse(attrs="meaning") self.order = self._parse(attrs="order", value_type="int") self._finish(self.certification)
(tmdb: 'TMDbAPIs', data)
53,212
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.certification = self._parse(attrs="certification") self.meaning = self._parse(attrs="meaning") self.order = self._parse(attrs="order", value_type="int") self._finish(self.certification)
(self, data)
53,214
tmdbapis.objs.reload
Collection
Represents a single Collection. Attributes: backdrop_path (str): Backdrop Path. backdrop_url (str): Backdrop Full URL. backdrops (List[:class:`~tmdbapis.objs.image.Backdrop`]): List of other Backdrops for the Collection. id (int): Collection ID. movies (List[:class:`~tmdbapis.objs.reload.Movie`]): Movies within the Collection. name (str): Collection Name. overview (str): Collection Overview. poster_path (str): Poster Path. poster_url (str): Poster Full URL. posters (List[:class:`~tmdbapis.objs.image.Poster`]): List of other Posters for the Collection. translations (List[:class:`~tmdbapis.objs.simple.Translation`]): List of Translations for the Collection.
class Collection(TMDbReload): """ Represents a single Collection. Attributes: backdrop_path (str): Backdrop Path. backdrop_url (str): Backdrop Full URL. backdrops (List[:class:`~tmdbapis.objs.image.Backdrop`]): List of other Backdrops for the Collection. id (int): Collection ID. movies (List[:class:`~tmdbapis.objs.reload.Movie`]): Movies within the Collection. name (str): Collection Name. overview (str): Collection Overview. poster_path (str): Poster Path. poster_url (str): Poster Full URL. posters (List[:class:`~tmdbapis.objs.image.Poster`]): List of other Posters for the Collection. translations (List[:class:`~tmdbapis.objs.simple.Translation`]): List of Translations for the Collection. """ def _load(self, data, partial=False): super()._load(data, partial=partial) self.backdrop_path = self._parse(attrs="backdrop_path") self.backdrop_url = self._image_url(self.backdrop_path) self.backdrops = self._parse(attrs=["images", "backdrops"], value_type="backdrop", is_list=True) self.id = self._parse(attrs="id", value_type="int") self.movies = self._parse(attrs="parts", value_type="movie", is_list=True) self.name = self._parse(attrs="name") self.overview = self._parse(attrs="overview") self.poster_path = self._parse(attrs="poster_path") self.poster_url = self._image_url(self.poster_path) self.posters = self._parse(attrs=["images", "posters"], value_type="poster", is_list=True) self.translations = self._parse(attrs=["translations", "translations"], value_type="translation", is_list=True) self._finish(self.name) def _append_str(self): return "images,translations" def _full_load(self, partial=None): return self._api.collections_get_details( self.id, language=self._tmdb.language, append_to_response=partial, include_image_language=self._tmdb._include_language )
(tmdb, data, load=False, partial=False)
53,218
tmdbapis.objs.reload
__init__
null
def __init__(self, tmdb, data, load=False, partial=False): super().__init__(tmdb, data) if load: self.reload(partial=partial)
(self, tmdb, data, load=False, partial=False)
53,223
tmdbapis.objs.reload
_append_str
null
def _append_str(self): return "images,translations"
(self)
53,225
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.collections_get_details( self.id, language=self._tmdb.language, append_to_response=partial, include_image_language=self._tmdb._include_language )
(self, partial=None)
53,227
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) self.backdrop_path = self._parse(attrs="backdrop_path") self.backdrop_url = self._image_url(self.backdrop_path) self.backdrops = self._parse(attrs=["images", "backdrops"], value_type="backdrop", is_list=True) self.id = self._parse(attrs="id", value_type="int") self.movies = self._parse(attrs="parts", value_type="movie", is_list=True) self.name = self._parse(attrs="name") self.overview = self._parse(attrs="overview") self.poster_path = self._parse(attrs="poster_path") self.poster_url = self._image_url(self.poster_path) self.posters = self._parse(attrs=["images", "posters"], value_type="poster", is_list=True) self.translations = self._parse(attrs=["translations", "translations"], value_type="translation", is_list=True) self._finish(self.name)
(self, data, partial=False)
53,230
tmdbapis.objs.reload
Company
Represents a single Company. Attributes: alternative_names (List[:class:`~tmdbapis.objs.simple.AlternativeName`]): Company Alternative Names. description (str): Company Description. headquarters (str): Company Headquarters. homepage (str): Company Homepage. id (int): Company ID. logo_path (str): Logo Path. logo_url (str): Logo Full URL. logos (List[:class:`~tmdbapis.objs.image.Logo`]): List of other Logos for the Company. name (str): Company Name. movies (:class:`~tmdbapis.objs.pagination.DiscoverMovies`): Pagination Object of Company Movies. origin_country (str): Company Origin Country. parent_company (:class:`~tmdbapis.objs.reload.Company`): Parent Company. tv_shows (:class:`~tmdbapis.objs.pagination.DiscoverTVShows`): Pagination Object of Company TV Shows.
class Company(TMDbReload): """ Represents a single Company. Attributes: alternative_names (List[:class:`~tmdbapis.objs.simple.AlternativeName`]): Company Alternative Names. description (str): Company Description. headquarters (str): Company Headquarters. homepage (str): Company Homepage. id (int): Company ID. logo_path (str): Logo Path. logo_url (str): Logo Full URL. logos (List[:class:`~tmdbapis.objs.image.Logo`]): List of other Logos for the Company. name (str): Company Name. movies (:class:`~tmdbapis.objs.pagination.DiscoverMovies`): Pagination Object of Company Movies. origin_country (str): Company Origin Country. parent_company (:class:`~tmdbapis.objs.reload.Company`): Parent Company. tv_shows (:class:`~tmdbapis.objs.pagination.DiscoverTVShows`): Pagination Object of Company TV Shows. """ def _load(self, data, partial=False): super()._load(data, partial=partial) self._movies = None self._tv_shows = None self.alternative_names = self._parse(attrs=["alternative_names", "results"], value_type="alternative_name", is_list=True) self.description = self._parse(attrs="description") self.headquarters = self._parse(attrs="headquarters") self.homepage = self._parse(attrs="homepage") self.id = self._parse(attrs="id", value_type="int") self.logo_path = self._parse(attrs="logo_path") self.logo_url = self._image_url(self.logo_path) self.logos = self._parse(attrs=["images", "logos"], value_type="logo", is_list=True) self.name = self._parse(attrs="name") self.origin_country = self._parse(attrs="origin_country") self.parent_company = self._parse(attrs="parent_company", value_type="company") self._finish(self.name) def _append_str(self): return "alternative_names,images" def _full_load(self, partial=None): return self._api.companies_get_details(self.id, language=self._tmdb.language, append_to_response=partial) @property def movies(self): if not self._movies: self._movies = self._tmdb.discover_movies(with_companies=self.id) return self._movies @property def tv_shows(self): if not self._tv_shows: self._tv_shows = self._tmdb.discover_tv_shows(with_companies=self.id) return self._tv_shows
(tmdb, data, load=False, partial=False)
53,239
tmdbapis.objs.reload
_append_str
null
def _append_str(self): return "alternative_names,images"
(self)
53,241
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.companies_get_details(self.id, language=self._tmdb.language, append_to_response=partial)
(self, partial=None)
53,243
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) self._movies = None self._tv_shows = None self.alternative_names = self._parse(attrs=["alternative_names", "results"], value_type="alternative_name", is_list=True) self.description = self._parse(attrs="description") self.headquarters = self._parse(attrs="headquarters") self.homepage = self._parse(attrs="homepage") self.id = self._parse(attrs="id", value_type="int") self.logo_path = self._parse(attrs="logo_path") self.logo_url = self._image_url(self.logo_path) self.logos = self._parse(attrs=["images", "logos"], value_type="logo", is_list=True) self.name = self._parse(attrs="name") self.origin_country = self._parse(attrs="origin_country") self.parent_company = self._parse(attrs="parent_company", value_type="company") self._finish(self.name)
(self, data, partial=False)
53,246
tmdbapis.objs.reload
Configuration
Represents TMDb's Configuration. Attributes: backdrop_sizes (List[str]): Backdrop sizes. base_image_url (str): Base Image URL. change_keys (List[str]): Change Keys. countries (List[:class:`~tmdbapis.objs.simple.Country`]): Countries in TMDb. departments (List[:class:`~tmdbapis.objs.simple.Department`]): Departments in TMDb. languages (List[:class:`~tmdbapis.objs.simple.Language`]): Languages in TMDb. logo_sizes (List[str]): Logo Sizes. poster_sizes (List[str]): Poster Sizes. primary_translations (List[str]): Primary Translations in TMDb. profile_sizes (List[str]): Profile Sizes. secure_base_image_url (str): Secure Base Image URL. still_sizes (List[str]): Still Sizes timezones (List[str]): Timezones in TMDb.
class Configuration(TMDbReload): """ Represents TMDb's Configuration. Attributes: backdrop_sizes (List[str]): Backdrop sizes. base_image_url (str): Base Image URL. change_keys (List[str]): Change Keys. countries (List[:class:`~tmdbapis.objs.simple.Country`]): Countries in TMDb. departments (List[:class:`~tmdbapis.objs.simple.Department`]): Departments in TMDb. languages (List[:class:`~tmdbapis.objs.simple.Language`]): Languages in TMDb. logo_sizes (List[str]): Logo Sizes. poster_sizes (List[str]): Poster Sizes. primary_translations (List[str]): Primary Translations in TMDb. profile_sizes (List[str]): Profile Sizes. secure_base_image_url (str): Secure Base Image URL. still_sizes (List[str]): Still Sizes timezones (List[str]): Timezones in TMDb. """ def __init__(self, tmdb, partial=False): super().__init__(tmdb, None, partial=partial) def _load(self, data, partial=False): super()._load(data, partial=partial) self.backdrop_sizes = self._parse(attrs=["images", "backdrop_sizes"], is_list=True) self.base_image_url = self._parse(attrs=["images", "base_url"]) self.change_keys = self._parse(attrs="change_keys", is_list=True) self.countries = self._parse(attrs="countries", value_type="load_country", is_list=True) self.departments = self._parse(attrs="jobs", value_type="load_department", is_list=True) self.languages = self._parse(attrs="languages", value_type="load_language", is_list=True) self.logo_sizes = self._parse(attrs=["images", "logo_sizes"], is_list=True) self.poster_sizes = self._parse(attrs=["images", "poster_sizes"], is_list=True) self.primary_translations = self._parse(attrs="primary_translations", is_list=True) self.profile_sizes = self._parse(attrs=["images", "profile_sizes"], is_list=True) self.secure_base_image_url = self._parse(attrs=["images", "secure_base_url"]) self.still_sizes = self._parse(attrs=["images", "still_sizes"], is_list=True) self.timezones = self._parse(attrs="timezones", value_type="load_timezone", is_list=True) self._finish("API3 Configuration") def _append_str(self): return "countries,jobs,languages,primary_translations,timezones" def _full_load(self, partial=None): return self._api.configuration_get_api_configuration(append_to_response=partial)
(tmdb, partial=False)
53,250
tmdbapis.objs.reload
__init__
null
def __init__(self, tmdb, partial=False): super().__init__(tmdb, None, partial=partial)
(self, tmdb, partial=False)
53,255
tmdbapis.objs.reload
_append_str
null
def _append_str(self): return "countries,jobs,languages,primary_translations,timezones"
(self)
53,257
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.configuration_get_api_configuration(append_to_response=partial)
(self, partial=None)
53,259
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) self.backdrop_sizes = self._parse(attrs=["images", "backdrop_sizes"], is_list=True) self.base_image_url = self._parse(attrs=["images", "base_url"]) self.change_keys = self._parse(attrs="change_keys", is_list=True) self.countries = self._parse(attrs="countries", value_type="load_country", is_list=True) self.departments = self._parse(attrs="jobs", value_type="load_department", is_list=True) self.languages = self._parse(attrs="languages", value_type="load_language", is_list=True) self.logo_sizes = self._parse(attrs=["images", "logo_sizes"], is_list=True) self.poster_sizes = self._parse(attrs=["images", "poster_sizes"], is_list=True) self.primary_translations = self._parse(attrs="primary_translations", is_list=True) self.profile_sizes = self._parse(attrs=["images", "profile_sizes"], is_list=True) self.secure_base_image_url = self._parse(attrs=["images", "secure_base_url"]) self.still_sizes = self._parse(attrs=["images", "still_sizes"], is_list=True) self.timezones = self._parse(attrs="timezones", value_type="load_timezone", is_list=True) self._finish("API3 Configuration")
(self, data, partial=False)
53,262
tmdbapis.objs.simple
Country
Represents a single Country. Attributes: iso_3166_1 (str): ISO 3166-1 Alpha-2 Code of the Country. name (str): Country name. native_name (str): Country native name.
class Country(TMDbObj): """ Represents a single Country. Attributes: iso_3166_1 (str): ISO 3166-1 Alpha-2 Code of the Country. name (str): Country name. native_name (str): Country native name. """ def _load(self, data): super()._load(data) self.iso_3166_1 = self._parse(attrs="iso_3166_1") self.name = self._parse(attrs="name" if "name" in self._data else "english_name") self.native_name = self._parse(attrs="native_name") self._finish(self.name)
(tmdb: 'TMDbAPIs', data)
53,272
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.iso_3166_1 = self._parse(attrs="iso_3166_1") self.name = self._parse(attrs="name" if "name" in self._data else "english_name") self.native_name = self._parse(attrs="native_name") self._finish(self.name)
(self, data)
53,274
tmdbapis.objs.simple
CountryCertifications
Represents a Country's Certifications. Attributes: certifications (List[:class:`~tmdbapis.objs.simple.Certification`]): List of Certifications. country (str): Certification country.
class CountryCertifications(TMDbObj): """ Represents a Country's Certifications. Attributes: certifications (List[:class:`~tmdbapis.objs.simple.Certification`]): List of Certifications. country (str): Certification country. """ def __init__(self, tmdb, data, country): self._country = country super().__init__(tmdb, data) def _load(self, data): super()._load(data) self.certifications = self._parse(value_type="certification", is_list=True) self.certifications.sort(key=lambda x: x.order) self.country = self._country self._finish(self.country) def __str__(self): return f"{self._name} Certifications"
(tmdb, data, country)
53,278
tmdbapis.objs.simple
__init__
null
def __init__(self, tmdb, data, country): self._country = country super().__init__(tmdb, data)
(self, tmdb, data, country)
53,281
tmdbapis.objs.simple
__str__
null
def __str__(self): return f"{self._name} Certifications"
(self)
53,284
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.certifications = self._parse(value_type="certification", is_list=True) self.certifications.sort(key=lambda x: x.order) self.country = self._country self._finish(self.country)
(self, data)
53,286
tmdbapis.objs.simple
CountryWatchProviders
Represents the Watch Providers for an item in the Country. Attributes: buy (List[:class:`~tmdbapis.objs.simple.WatchProvider`]): Watch Provider's that can sell this item in the Country. country (:class:`~tmdbapis.objs.simple.Country`): Country object for the ISO 3166-1 Country Code. flatrate (List[:class:`~tmdbapis.objs.simple.WatchProvider`]): Watch Provider's that have this as part of their service's flatrate in the Country. iso_3166_1 (str): ISO 3166-1 Alpha-2 Country Code of the Video. link (int): Link to the Countries Watch Provider page for the item. rent (List[:class:`~tmdbapis.objs.simple.WatchProvider`]): Watch Provider's that can rent this item in the Country.
class CountryWatchProviders(TMDbObj): """ Represents the Watch Providers for an item in the Country. Attributes: buy (List[:class:`~tmdbapis.objs.simple.WatchProvider`]): Watch Provider's that can sell this item in the Country. country (:class:`~tmdbapis.objs.simple.Country`): Country object for the ISO 3166-1 Country Code. flatrate (List[:class:`~tmdbapis.objs.simple.WatchProvider`]): Watch Provider's that have this as part of their service's flatrate in the Country. iso_3166_1 (str): ISO 3166-1 Alpha-2 Country Code of the Video. link (int): Link to the Countries Watch Provider page for the item. rent (List[:class:`~tmdbapis.objs.simple.WatchProvider`]): Watch Provider's that can rent this item in the Country. """ def __init__(self, tmdb, data, country): self._country = country super().__init__(tmdb, data) def _load(self, data): super()._load(data) self.buy = self._parse(attrs="buy", value_type="watch_provider", is_list=True) self.country = self._tmdb._get_object(self._data, "country") self.flatrate = self._parse(attrs="flatrate", value_type="watch_provider", is_list=True) self.iso_3166_1 = self._country self.link = self._parse(attrs="link") self.rent = self._parse(attrs="rent", value_type="watch_provider", is_list=True) self._finish(self.country) def __str__(self): return f"{self._name} Watch Providers"
(tmdb, data, country)
53,293
tmdbapis.objs.simple
__str__
null
def __str__(self): return f"{self._name} Watch Providers"
(self)
53,296
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.buy = self._parse(attrs="buy", value_type="watch_provider", is_list=True) self.country = self._tmdb._get_object(self._data, "country") self.flatrate = self._parse(attrs="flatrate", value_type="watch_provider", is_list=True) self.iso_3166_1 = self._country self.link = self._parse(attrs="link") self.rent = self._parse(attrs="rent", value_type="watch_provider", is_list=True) self._finish(self.country)
(self, data)
53,298
tmdbapis.objs.reload
Credit
Represents a single Credit. Attributes: adult (bool): Is the Actor an adult actor. character (str): Character Name. credit_type (str): Credit Type. department (str): Credit Department episode_count (int): Number of Episodes the Actor appeared in. episodes (List[:class:`~tmdbapis.objs.reload.Episode`]): Episodes of credit. Only exists when media_type == "tv". gender (int): Actor's Gender. (1: Women, 2: Men) id (str): The Credit ID. job (str): Job in Department. known_for (List[Union[:class:`~tmdbapis.objs.reload.Movie`, :class:`~tmdbapis.objs.reload.TVShow`]]): known_for_department (str): Department Actor is known for. media_type (str): Media Type of the Credit. movie (:class:`~tmdbapis.objs.reload.Movie`): Movie of credit. Only exists when media_type == "movie" . name (str): Actor Name. order (int): Order of the Credits. original_name (str): Actor Original Name. person_id (int): Person ID of the Actor. popularity (float): Popularity of the Credit. profile_path (str): Profile Path. profile_url (str): Profile Full URL. seasons (List[:class:`~tmdbapis.objs.reload.Season`]): Season of credit. Only exists when media_type == "tv". tv_show (:class:`~tmdbapis.objs.reload.TVShow`): TV Show of credit. Only exists when media_type == "tv".
class Credit(TMDbReload): """ Represents a single Credit. Attributes: adult (bool): Is the Actor an adult actor. character (str): Character Name. credit_type (str): Credit Type. department (str): Credit Department episode_count (int): Number of Episodes the Actor appeared in. episodes (List[:class:`~tmdbapis.objs.reload.Episode`]): Episodes of credit. Only exists when media_type == "tv". gender (int): Actor's Gender. (1: Women, 2: Men) id (str): The Credit ID. job (str): Job in Department. known_for (List[Union[:class:`~tmdbapis.objs.reload.Movie`, :class:`~tmdbapis.objs.reload.TVShow`]]): known_for_department (str): Department Actor is known for. media_type (str): Media Type of the Credit. movie (:class:`~tmdbapis.objs.reload.Movie`): Movie of credit. Only exists when media_type == "movie" . name (str): Actor Name. order (int): Order of the Credits. original_name (str): Actor Original Name. person_id (int): Person ID of the Actor. popularity (float): Popularity of the Credit. profile_path (str): Profile Path. profile_url (str): Profile Full URL. seasons (List[:class:`~tmdbapis.objs.reload.Season`]): Season of credit. Only exists when media_type == "tv". tv_show (:class:`~tmdbapis.objs.reload.TVShow`): TV Show of credit. Only exists when media_type == "tv". """ def __init__(self, tmdb, data, credit_type=None, media_type=None, load=False): self._credit_type = credit_type self._media_type = media_type super().__init__(tmdb, data=data, load=load) def _load(self, data, partial=False): super()._load(data, partial=partial) def dict_check(dict_attr, attr): return [dict_attr, attr] if dict_attr in self._data else attr self.adult = self._parse(attrs=dict_check("person", "adult"), value_type="bool") self.character = self._parse(attrs=dict_check("media", "character")) self.credit_type = self._parse(attrs="credit_type") if not self.credit_type: self.credit_type = self._credit_type self.department = self._parse(attrs="department") if "episode_count" in self._data: self.episode_count = self._parse(attrs="episode_count", value_type="int") self.gender = self._parse(attrs=dict_check("person", "gender"), value_type="int") self.id = self._parse(attrs="credit_id" if "credit_id" in self._data else "id") self.job = self._parse(attrs="job") self.known_for = self._parse(attrs=["person", "known_for"], value_type="media_type", is_list=True) self.known_for_department = self._parse(attrs=dict_check("person", "known_for_department")) self.media_type = self._parse(attrs="media_type") if not self.media_type: self.media_type = self._media_type self.name = self._parse(attrs=dict_check("person", "name")) self.order = self._parse(attrs="order", value_type="int") self.original_name = self._parse(attrs="original_name") self.person_id = self._parse(attrs=dict_check("person", "id"), value_type="int") self.popularity = self._parse(attrs=dict_check("person", "popularity"), value_type="int") self.profile_path = self._parse(attrs=dict_check("person", "profile_path")) self.profile_url = self._image_url(self.profile_path) if "media" in self._data: if self.media_type == "movie": self.movie = self._parse(attrs="media", value_type="movie") elif self.media_type == "tv": self.tv_show = self._parse(attrs="media", value_type="tv") self.seasons = self._parse(attrs=["media", "seasons"], value_type="season", is_list=True) self.episodes = self._parse(attrs=["media", "episodes"], value_type="episode", is_list=True) elif "credit_id" in self._data: if self.media_type == "movie": self.movie = self._tmdb.movie(self._parse(attrs="id", value_type="int"), load=False) elif self.media_type == "tv": self.tv_show = self._tmdb.tv_show(self._parse(attrs="id", value_type="int"), load=False) def _full_load(self, partial=None): return self._api.credits_get_details(self.id)
(tmdb, data, credit_type=None, media_type=None, load=False)
53,302
tmdbapis.objs.reload
__init__
null
def __init__(self, tmdb, data, credit_type=None, media_type=None, load=False): self._credit_type = credit_type self._media_type = media_type super().__init__(tmdb, data=data, load=load)
(self, tmdb, data, credit_type=None, media_type=None, load=False)
53,309
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.credits_get_details(self.id)
(self, partial=None)
53,311
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) def dict_check(dict_attr, attr): return [dict_attr, attr] if dict_attr in self._data else attr self.adult = self._parse(attrs=dict_check("person", "adult"), value_type="bool") self.character = self._parse(attrs=dict_check("media", "character")) self.credit_type = self._parse(attrs="credit_type") if not self.credit_type: self.credit_type = self._credit_type self.department = self._parse(attrs="department") if "episode_count" in self._data: self.episode_count = self._parse(attrs="episode_count", value_type="int") self.gender = self._parse(attrs=dict_check("person", "gender"), value_type="int") self.id = self._parse(attrs="credit_id" if "credit_id" in self._data else "id") self.job = self._parse(attrs="job") self.known_for = self._parse(attrs=["person", "known_for"], value_type="media_type", is_list=True) self.known_for_department = self._parse(attrs=dict_check("person", "known_for_department")) self.media_type = self._parse(attrs="media_type") if not self.media_type: self.media_type = self._media_type self.name = self._parse(attrs=dict_check("person", "name")) self.order = self._parse(attrs="order", value_type="int") self.original_name = self._parse(attrs="original_name") self.person_id = self._parse(attrs=dict_check("person", "id"), value_type="int") self.popularity = self._parse(attrs=dict_check("person", "popularity"), value_type="int") self.profile_path = self._parse(attrs=dict_check("person", "profile_path")) self.profile_url = self._image_url(self.profile_path) if "media" in self._data: if self.media_type == "movie": self.movie = self._parse(attrs="media", value_type="movie") elif self.media_type == "tv": self.tv_show = self._parse(attrs="media", value_type="tv") self.seasons = self._parse(attrs=["media", "seasons"], value_type="season", is_list=True) self.episodes = self._parse(attrs=["media", "episodes"], value_type="episode", is_list=True) elif "credit_id" in self._data: if self.media_type == "movie": self.movie = self._tmdb.movie(self._parse(attrs="id", value_type="int"), load=False) elif self.media_type == "tv": self.tv_show = self._tmdb.tv_show(self._parse(attrs="id", value_type="int"), load=False)
(self, data, partial=False)
53,314
tmdbapis.objs.simple
Department
Represents a single Department. Attributes: department (int): Department name. jobs (List[str]): List of jobs within the department.
class Department(TMDbObj): """ Represents a single Department. Attributes: department (int): Department name. jobs (List[str]): List of jobs within the department. """ def _load(self, data): super()._load(data) self.department = self._parse(attrs="department") self.jobs = self._parse(attrs="jobs", is_list=True) self._finish(self.department)
(tmdb: 'TMDbAPIs', data)
53,324
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.department = self._parse(attrs="department") self.jobs = self._parse(attrs="jobs", is_list=True) self._finish(self.department)
(self, data)
53,326
tmdbapis.objs.reload
Episode
Represents a single Episode. Attributes: air_date (datetime): Episode Air Date. cast (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Episode Cast Credits. crew (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Episode Crew Credits. episode_number (int): Episode in Season Number. freebase_id (str): Freebase ID for the Episode. freebase_mid (str): Freebase MID for the Episode. guest_stars (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Episode Guest Stars Credits. id (int): Episode ID. imdb_id (str): Episode IMDb ID. name (str): Episode Name. order (int): Episode Order in Group. overview (str): Episode Overview. production_code (str): Episode Production Code. rated (float): Either your TMDb Rating for the Episode or None if there is no rating. season_number (int): Season the Episode is in. still_path (str): Still Path. still_url (str): Still Full URL. stills (List[:class:`~tmdbapis.objs.image.Still`]): List of other Stills for the Episode. title (str): alias of name. translations (List[:class:`~tmdbapis.objs.simple.Translation`]): List of Translations for the Episode. tv_id (int): TMDb TV Show ID the contains the Episode. tvdb_id (int): TVDB ID of the Episode. tvrage_id (int): TVRage ID of the Episode. videos (List[:class:`~tmdbapis.objs.simple.Video`]): List of Videos associated with the Episode. vote_average (float): Vote Average for the Episode. vote_count (int): Number of Votes for the Episode.
class Episode(TMDbReload, Rate): """ Represents a single Episode. Attributes: air_date (datetime): Episode Air Date. cast (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Episode Cast Credits. crew (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Episode Crew Credits. episode_number (int): Episode in Season Number. freebase_id (str): Freebase ID for the Episode. freebase_mid (str): Freebase MID for the Episode. guest_stars (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Episode Guest Stars Credits. id (int): Episode ID. imdb_id (str): Episode IMDb ID. name (str): Episode Name. order (int): Episode Order in Group. overview (str): Episode Overview. production_code (str): Episode Production Code. rated (float): Either your TMDb Rating for the Episode or None if there is no rating. season_number (int): Season the Episode is in. still_path (str): Still Path. still_url (str): Still Full URL. stills (List[:class:`~tmdbapis.objs.image.Still`]): List of other Stills for the Episode. title (str): alias of name. translations (List[:class:`~tmdbapis.objs.simple.Translation`]): List of Translations for the Episode. tv_id (int): TMDb TV Show ID the contains the Episode. tvdb_id (int): TVDB ID of the Episode. tvrage_id (int): TVRage ID of the Episode. videos (List[:class:`~tmdbapis.objs.simple.Video`]): List of Videos associated with the Episode. vote_average (float): Vote Average for the Episode. vote_count (int): Number of Votes for the Episode. """ def __init__(self, tmdb, data, tv_id=None, load=False, partial=False): self._tv_id = tv_id super().__init__(tmdb, data=data, load=load, partial=partial) def _load(self, data, partial=False): super()._load(data, partial=partial) self.air_date = self._parse(attrs="air_date", value_type="date") self.cast = self._parse(attrs=["credits", "cast"], value_type="tv_cast", is_list=True) self.crew = self._parse(attrs="crew", value_type="tv_crew", is_list=True) self.episode_number = self._parse(attrs="episode_number", value_type="int") self.freebase_id = self._parse(attrs=["external_ids", "freebase_id"]) self.freebase_mid = self._parse(attrs=["external_ids", "freebase_mid"]) self.guest_stars = self._parse(attrs="guest_stars", value_type="tv_cast", is_list=True) self.id = self._parse(attrs="id", value_type="int") self.imdb_id = self._parse(attrs=["external_ids", "imdb_id"]) self.name = self._parse(attrs="name") self.order = self._parse(attrs="order", value_type="int") if "order" in self._data else None self.overview = self._parse(attrs="overview") self.production_code = self._parse(attrs="production_code") self.rated = self._parse(attrs=["account_states", "rated", "value"], value_type="float", default_is_none=True) self.season_number = self._parse(attrs="season_number", value_type="int") self.still_path = self._parse(attrs="still_path") self.still_url = self._image_url(self.still_path) self.stills = self._parse(attrs=["images", "stills"], value_type="still", is_list=True) self.title = self.name self.translations = self._parse(attrs=["translations", "translations"], value_type="translation", is_list=True) self.tv_id = self._parse(attrs="show_id", value_type="int") if "show_id" in self._data else self._tv_id self.tvdb_id = self._parse(attrs=["external_ids", "tvdb_id"], value_type="int") self.tvrage_id = self._parse(attrs=["external_ids", "tvrage_id"], value_type="int") self.videos = self._parse(attrs=["videos", "results"], value_type="video", is_list=True) self.vote_average = self._parse(attrs="vote_average", value_type="float") self.vote_count = self._parse(attrs="vote_count", value_type="int") self._finish(self.name) def _append_str(self): return "account_states,credits,external_ids,images,translations,videos" def _full_load(self, partial=None): return self._api.tv_episodes_get_details( self.tv_id, self.season_number, self.episode_number, language=self._tmdb.language, include_image_language=self._tmdb._include_language, include_video_language=self._tmdb._include_language, append_to_response=partial ) def _rate(self, rating): self._api.tv_episodes_rate_tv_episode(self.tv_id, self.season_number, self.episode_number, rating) def _delete_rate(self): self._api.tv_episodes_delete_rating(self.tv_id, self.season_number, self.episode_number)
(tmdb, data, tv_id=None, load=False, partial=False)
53,330
tmdbapis.objs.reload
__init__
null
def __init__(self, tmdb, data, tv_id=None, load=False, partial=False): self._tv_id = tv_id super().__init__(tmdb, data=data, load=load, partial=partial)
(self, tmdb, data, tv_id=None, load=False, partial=False)
53,335
tmdbapis.objs.reload
_append_str
null
def _append_str(self): return "account_states,credits,external_ids,images,translations,videos"
(self)
53,336
tmdbapis.objs.reload
_delete_rate
null
def _delete_rate(self): self._api.tv_episodes_delete_rating(self.tv_id, self.season_number, self.episode_number)
(self)
53,338
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.tv_episodes_get_details( self.tv_id, self.season_number, self.episode_number, language=self._tmdb.language, include_image_language=self._tmdb._include_language, include_video_language=self._tmdb._include_language, append_to_response=partial )
(self, partial=None)
53,340
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) self.air_date = self._parse(attrs="air_date", value_type="date") self.cast = self._parse(attrs=["credits", "cast"], value_type="tv_cast", is_list=True) self.crew = self._parse(attrs="crew", value_type="tv_crew", is_list=True) self.episode_number = self._parse(attrs="episode_number", value_type="int") self.freebase_id = self._parse(attrs=["external_ids", "freebase_id"]) self.freebase_mid = self._parse(attrs=["external_ids", "freebase_mid"]) self.guest_stars = self._parse(attrs="guest_stars", value_type="tv_cast", is_list=True) self.id = self._parse(attrs="id", value_type="int") self.imdb_id = self._parse(attrs=["external_ids", "imdb_id"]) self.name = self._parse(attrs="name") self.order = self._parse(attrs="order", value_type="int") if "order" in self._data else None self.overview = self._parse(attrs="overview") self.production_code = self._parse(attrs="production_code") self.rated = self._parse(attrs=["account_states", "rated", "value"], value_type="float", default_is_none=True) self.season_number = self._parse(attrs="season_number", value_type="int") self.still_path = self._parse(attrs="still_path") self.still_url = self._image_url(self.still_path) self.stills = self._parse(attrs=["images", "stills"], value_type="still", is_list=True) self.title = self.name self.translations = self._parse(attrs=["translations", "translations"], value_type="translation", is_list=True) self.tv_id = self._parse(attrs="show_id", value_type="int") if "show_id" in self._data else self._tv_id self.tvdb_id = self._parse(attrs=["external_ids", "tvdb_id"], value_type="int") self.tvrage_id = self._parse(attrs=["external_ids", "tvrage_id"], value_type="int") self.videos = self._parse(attrs=["videos", "results"], value_type="video", is_list=True) self.vote_average = self._parse(attrs="vote_average", value_type="float") self.vote_count = self._parse(attrs="vote_count", value_type="int") self._finish(self.name)
(self, data, partial=False)
53,342
tmdbapis.objs.reload
_rate
null
def _rate(self, rating): self._api.tv_episodes_rate_tv_episode(self.tv_id, self.season_number, self.episode_number, rating)
(self, rating)
53,343
tmdbapis.objs.mixin
delete_rating
Delete a Rating (Authentication Required)
def delete_rating(self): """ Delete a Rating (Authentication Required) """ self._delete_rate()
(self)
53,344
tmdbapis.objs.mixin
rate
Add a Rating (Authentication Required) Parameters: rating (float): Rating to use.
def rate(self, rating: float): """ Add a Rating (Authentication Required) Parameters: rating (float): Rating to use. """ try: if float(rating) < 0.5 or float(rating) > 10.0: raise TypeError except TypeError: raise Invalid("Rating must be between 0.5 and 10.0") self._rate(rating)
(self, rating: float)
53,346
tmdbapis.objs.reload
EpisodeGroup
Represents a single Episode Group. Attributes: description (str): Episode Group Description. episode_count (int): Episode Group Episode Count. group_count (int): Number of Groups in the Episode Group. groups (List[:class:`~tmdbapis.objs.simple.Group`]): Groups in the Episode Group. id (str): Episode Group ID. name (str): Episode Group Name. network (:class:`~tmdbapis.objs.reload.Network`): Episode Group Network. type (int): Episode Group Type.
class EpisodeGroup(TMDbReload): """ Represents a single Episode Group. Attributes: description (str): Episode Group Description. episode_count (int): Episode Group Episode Count. group_count (int): Number of Groups in the Episode Group. groups (List[:class:`~tmdbapis.objs.simple.Group`]): Groups in the Episode Group. id (str): Episode Group ID. name (str): Episode Group Name. network (:class:`~tmdbapis.objs.reload.Network`): Episode Group Network. type (int): Episode Group Type. """ def _load(self, data, partial=False): super()._load(data, partial=partial) self.description = self._parse(attrs="description") self.episode_count = self._parse(attrs="episode_count", value_type="int") self.group_count = self._parse(attrs="group_count", value_type="int") self.groups = self._parse(attrs="groups", value_type="group", is_list=True) self.id = self._parse(attrs="id") self.name = self._parse(attrs="name") self.network = self._parse(attrs="network", value_type="network") self.type = self._parse(attrs="type", value_type="int") self._finish(self.name) def _full_load(self, partial=None): return self._api.tv_episode_groups_get_details(self.id, language=self._tmdb.language)
(tmdb, data, load=False, partial=False)
53,357
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.tv_episode_groups_get_details(self.id, language=self._tmdb.language)
(self, partial=None)
53,359
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) self.description = self._parse(attrs="description") self.episode_count = self._parse(attrs="episode_count", value_type="int") self.group_count = self._parse(attrs="group_count", value_type="int") self.groups = self._parse(attrs="groups", value_type="group", is_list=True) self.id = self._parse(attrs="id") self.name = self._parse(attrs="name") self.network = self._parse(attrs="network", value_type="network") self.type = self._parse(attrs="type", value_type="int") self._finish(self.name)
(self, data, partial=False)
53,362
tmdbapis.objs.simple
FindResults
Represents a Find search result. Attributes: movie_results (List[:class:`~tmdbapis.objs.reload.Movie`]): Movie results found. person_results (List[:class:`~tmdbapis.objs.reload.Person`]): Person results found. tv_episode_results (List[:class:`~tmdbapis.objs.reload.Episode`]): Episode results found. tv_results (List[:class:`~tmdbapis.objs.reload.TVShow`]): TV Show results found. tv_season_results (List[:class:`~tmdbapis.objs.reload.Season`]): Season results found.
class FindResults(TMDbObj): """ Represents a Find search result. Attributes: movie_results (List[:class:`~tmdbapis.objs.reload.Movie`]): Movie results found. person_results (List[:class:`~tmdbapis.objs.reload.Person`]): Person results found. tv_episode_results (List[:class:`~tmdbapis.objs.reload.Episode`]): Episode results found. tv_results (List[:class:`~tmdbapis.objs.reload.TVShow`]): TV Show results found. tv_season_results (List[:class:`~tmdbapis.objs.reload.Season`]): Season results found. """ def __init__(self, tmdb, external_id, external_source): self._external_id = external_id self._external_source = external_source super().__init__(tmdb, None) def _load(self, data): super()._load(self._api.find_find_by_id(self._external_id, self._external_source, language=self._tmdb.language)) self.movie_results = self._parse(attrs="movie_results", value_type="movie", is_list=True) self.person_results = self._parse(attrs="person_results", value_type="person", is_list=True) self.tv_episode_results = self._parse(attrs="tv_episode_results", value_type="episode", is_list=True) self.tv_results = self._parse(attrs="tv_results", value_type="tv", is_list=True) self.tv_season_results = self._parse(attrs="tv_season_results", value_type="season", is_list=True) if not self.movie_results and not self.person_results and not self.tv_results and not self.tv_episode_results and not self.tv_season_results: raise NotFound(f"No Results were found for {self._external_source}: {self._external_id}") self._finish("FindResults Results")
(tmdb, external_id, external_source)
53,366
tmdbapis.objs.simple
__init__
null
def __init__(self, tmdb, external_id, external_source): self._external_id = external_id self._external_source = external_source super().__init__(tmdb, None)
(self, tmdb, external_id, external_source)
53,372
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(self._api.find_find_by_id(self._external_id, self._external_source, language=self._tmdb.language)) self.movie_results = self._parse(attrs="movie_results", value_type="movie", is_list=True) self.person_results = self._parse(attrs="person_results", value_type="person", is_list=True) self.tv_episode_results = self._parse(attrs="tv_episode_results", value_type="episode", is_list=True) self.tv_results = self._parse(attrs="tv_results", value_type="tv", is_list=True) self.tv_season_results = self._parse(attrs="tv_season_results", value_type="season", is_list=True) if not self.movie_results and not self.person_results and not self.tv_results and not self.tv_episode_results and not self.tv_season_results: raise NotFound(f"No Results were found for {self._external_source}: {self._external_id}") self._finish("FindResults Results")
(self, data)
53,374
tmdbapis.objs.simple
Genre
Represents a single Genre. Attributes: id (int): Genre ID name (str): Genre name.
class Genre(TMDbObj): """ Represents a single Genre. Attributes: id (int): Genre ID name (str): Genre name. """ def _load(self, data): super()._load(data) self.id = self._parse(attrs="id", value_type="int") self.name = self._parse(attrs="name") self._finish(self.name)
(tmdb: 'TMDbAPIs', data)
53,384
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.id = self._parse(attrs="id", value_type="int") self.name = self._parse(attrs="name") self._finish(self.name)
(self, data)
53,386
tmdbapis.objs.simple
Group
Represents a single Group of Episodes. Attributes: episode_group_id (int): Episode Group ID. episodes (List[:class:`~tmdbapis.objs.reload.Episode`]): List of episodes in the group. locked (bool): Is Locked. name (str): Group name. order (str): Group order in the Episode Group.
class Group(TMDbObj): """ Represents a single Group of Episodes. Attributes: episode_group_id (int): Episode Group ID. episodes (List[:class:`~tmdbapis.objs.reload.Episode`]): List of episodes in the group. locked (bool): Is Locked. name (str): Group name. order (str): Group order in the Episode Group. """ def _load(self, data): super()._load(data) self.episode_group_id = self._parse(attrs="id") self.episodes = self._parse(attrs="episodes", value_type="episode", is_list=True) self.locked = self._parse(attrs="locked", value_type="bool") self.name = self._parse(attrs="name") self.order = self._parse(attrs="order", value_type="int") self._finish(self.name)
(tmdb: 'TMDbAPIs', data)
53,396
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.episode_group_id = self._parse(attrs="id") self.episodes = self._parse(attrs="episodes", value_type="episode", is_list=True) self.locked = self._parse(attrs="locked", value_type="bool") self.name = self._parse(attrs="name") self.order = self._parse(attrs="order", value_type="int") self._finish(self.name)
(self, data)
53,398
tmdbapis.exceptions
Invalid
Invalid Selection.
class Invalid(TMDbException): """ Invalid Selection. """ pass
null
53,399
tmdbapis.objs.reload
Keyword
Represents a single Keyword. Attributes: id (int): Keyword ID. name (str): Keyword Name. movies (:class:`~tmdbapis.objs.pagination.DiscoverMovies`): Keyword Movies. tv_shows (:class:`~tmdbapis.objs.pagination.DiscoverTVShows`): Keyword TV Shows.
class Keyword(TMDbReload): """ Represents a single Keyword. Attributes: id (int): Keyword ID. name (str): Keyword Name. movies (:class:`~tmdbapis.objs.pagination.DiscoverMovies`): Keyword Movies. tv_shows (:class:`~tmdbapis.objs.pagination.DiscoverTVShows`): Keyword TV Shows. """ def _load(self, data, partial=False): super()._load(data, partial=partial) self._movies = None self._tv_shows = None self.id = self._parse(attrs="id", value_type="int") self.name = self._parse(attrs="name") self._finish(self.name) def _full_load(self, partial=None): return self._api.keywords_get_details(self.id, language=self._tmdb.language) @property def movies(self): if not self._movies: self._movies = self._tmdb.discover_movies(with_keywords=self.id) return self._movies @property def tv_shows(self): if not self._tv_shows: self._tv_shows = self._tmdb.discover_tv_shows(with_keywords=self.id) return self._tv_shows
(tmdb, data, load=False, partial=False)
53,410
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.keywords_get_details(self.id, language=self._tmdb.language)
(self, partial=None)
53,412
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) self._movies = None self._tv_shows = None self.id = self._parse(attrs="id", value_type="int") self.name = self._parse(attrs="name") self._finish(self.name)
(self, data, partial=False)
53,415
tmdbapis.objs.simple
Language
Represents a single Language. Attributes: english_name (str): Language's english name. iso_639_1 (str): ISO 639-1 Code of the Language. name (str): Language name.
class Language(TMDbObj): """ Represents a single Language. Attributes: english_name (str): Language's english name. iso_639_1 (str): ISO 639-1 Code of the Language. name (str): Language name. """ def _load(self, data): super()._load(data) self.english_name = self._parse(attrs="english_name") self.iso_639_1 = self._parse(attrs="iso_639_1") self.name = self._parse(attrs="name") self._finish(self.english_name)
(tmdb: 'TMDbAPIs', data)
53,425
tmdbapis.objs.simple
_load
null
def _load(self, data): super()._load(data) self.english_name = self._parse(attrs="english_name") self.iso_639_1 = self._parse(attrs="iso_639_1") self.name = self._parse(attrs="name") self._finish(self.english_name)
(self, data)
53,427
tmdbapis.objs.image
Logo
Represents a single Logo Image.
class Logo(TMDbImage): """ Represents a single Logo Image. """ def __init__(self, tmdb, data): super().__init__(tmdb, data, "Logo")
(tmdb, data)
53,431
tmdbapis.objs.image
__init__
null
def __init__(self, tmdb, data): super().__init__(tmdb, data, "Logo")
(self, tmdb, data)
53,439
tmdbapis.objs.reload
Movie
Represents a single Episode. Attributes: adult (bool): Is the Movie an adult movie. alternative_titles (List[:class:`~tmdbapis.objs.simple.AlternativeTitle`]): Movie Alternative Titles. backdrop_path (str): Backdrop Path. backdrop_url (str): Backdrop Full URL. backdrops (List[:class:`~tmdbapis.objs.image.Still`]): List of other Backdrops for the Movie. budget (int): Movie Budget. cast (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Movie Cast Credits. collection (:class:`~tmdbapis.objs.reload.Collection`): Movie's Collection. companies (List[:class:`~tmdbapis.objs.reload.Company`]): List of Production Companies for the Movie. countries (List[:class:`~tmdbapis.objs.simple.Country`]): List of Production Countries for the Movie. crew (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Movie Crew Credits. facebook_id (str): Facebook ID for the Movie. favorite (bool): If this Movie has been marked as a favorite. (Authentication Required) genres (List[:class:`~tmdbapis.objs.simple.Genre`]): List of Genres for the Movie. homepage (str): Homepage for the Movie. id (str): Movie ID. imdb_id (str): IMDb ID for the Movie. instagram_id (str): Instagram ID for the Movie. keywords (List[:class:`~tmdbapis.objs.reload.Keyword`]): List of Keywords for the Movie. spoken_languages (List[:class:`~tmdbapis.objs.simple.Language`]): List of Spoken Languages for the Movie. lists (:class:`~tmdbapis.objs.pagination.MovieLists`): Pagination Object of Lists containing the Movie. logos (List[:class:`~tmdbapis.objs.image.Logo`]): List of other Logos for the Movie. name (str): alias of title. original_language (:class:`~tmdbapis.objs.simple.Language`): Original Language of the Movie. original_title (str): Movie's Original Title. overview (str): Movie Overview. popularity (float): Movie's Popularity. poster_path (str): Poster Path. poster_url (str): Poster Full URL. posters (List[:class:`~tmdbapis.objs.image.Poster`]): List of other Posters for the Movie. rated (float): Your rating for this Movie or None if you have not rated it. (Authentication Required) recommendations (:class:`~tmdbapis.objs.pagination.RecommendedMovies`): Pagination Object of Recommended Movies based on this Movie. release_date (datetime): Movie's Primary Release Date. release_dates (Dict[str, List[:class:`~tmdbapis.objs.simple.ReleaseDate`]]): Dictionary of Release Dates where the keys are the ISO 3166-1 Alpha-2 Country Codes. revenue (int): Movie's Revenue. reviews (class:`~tmdbapis.objs.pagination.MovieReviews`): Pagination Object of Movie Reviews for this Movie. runtime (int) Movie's Runtime. similar (class:`~tmdbapis.objs.pagination.SimilarMovies`): Pagination Object of Similar Movie to this Movie. status (str): Movie's Status. tagline (str): Movie's Tagline. title (str): Movie's Title. trailers (List[:class:`~tmdbapis.objs.simple.Trailer`]): List of Trailers for the Movie. translations (List[:class:`~tmdbapis.objs.simple.Translation`]): List of Translations for the Movie. twitter_id (str): Twitter ID for the Movie. video (bool): Unsure when this is true. videos (List[:class:`~tmdbapis.objs.simple.Video`]): List of Videos associated with the Movie. vote_average (float): Vote Average for the Movie. vote_count (int): Number of Votes for the Movie. watch_providers (Dict[str, :class:`~tmdbapis.objs.simple.CountryWatchProviders`]): Dictionary of Watch Providers where the keys are the ISO 3166-1 Alpha-2 Country Codes. watchlist (bool): If this Movie has been added to your watchlist. (Authentication Required)
class Movie(TMDbReload, Favorite, Rate, Watchlist): """ Represents a single Episode. Attributes: adult (bool): Is the Movie an adult movie. alternative_titles (List[:class:`~tmdbapis.objs.simple.AlternativeTitle`]): Movie Alternative Titles. backdrop_path (str): Backdrop Path. backdrop_url (str): Backdrop Full URL. backdrops (List[:class:`~tmdbapis.objs.image.Still`]): List of other Backdrops for the Movie. budget (int): Movie Budget. cast (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Movie Cast Credits. collection (:class:`~tmdbapis.objs.reload.Collection`): Movie's Collection. companies (List[:class:`~tmdbapis.objs.reload.Company`]): List of Production Companies for the Movie. countries (List[:class:`~tmdbapis.objs.simple.Country`]): List of Production Countries for the Movie. crew (List[:class:`~tmdbapis.objs.reload.Credit`]): List of Movie Crew Credits. facebook_id (str): Facebook ID for the Movie. favorite (bool): If this Movie has been marked as a favorite. (Authentication Required) genres (List[:class:`~tmdbapis.objs.simple.Genre`]): List of Genres for the Movie. homepage (str): Homepage for the Movie. id (str): Movie ID. imdb_id (str): IMDb ID for the Movie. instagram_id (str): Instagram ID for the Movie. keywords (List[:class:`~tmdbapis.objs.reload.Keyword`]): List of Keywords for the Movie. spoken_languages (List[:class:`~tmdbapis.objs.simple.Language`]): List of Spoken Languages for the Movie. lists (:class:`~tmdbapis.objs.pagination.MovieLists`): Pagination Object of Lists containing the Movie. logos (List[:class:`~tmdbapis.objs.image.Logo`]): List of other Logos for the Movie. name (str): alias of title. original_language (:class:`~tmdbapis.objs.simple.Language`): Original Language of the Movie. original_title (str): Movie's Original Title. overview (str): Movie Overview. popularity (float): Movie's Popularity. poster_path (str): Poster Path. poster_url (str): Poster Full URL. posters (List[:class:`~tmdbapis.objs.image.Poster`]): List of other Posters for the Movie. rated (float): Your rating for this Movie or None if you have not rated it. (Authentication Required) recommendations (:class:`~tmdbapis.objs.pagination.RecommendedMovies`): Pagination Object of Recommended Movies based on this Movie. release_date (datetime): Movie's Primary Release Date. release_dates (Dict[str, List[:class:`~tmdbapis.objs.simple.ReleaseDate`]]): Dictionary of Release Dates where the keys are the ISO 3166-1 Alpha-2 Country Codes. revenue (int): Movie's Revenue. reviews (class:`~tmdbapis.objs.pagination.MovieReviews`): Pagination Object of Movie Reviews for this Movie. runtime (int) Movie's Runtime. similar (class:`~tmdbapis.objs.pagination.SimilarMovies`): Pagination Object of Similar Movie to this Movie. status (str): Movie's Status. tagline (str): Movie's Tagline. title (str): Movie's Title. trailers (List[:class:`~tmdbapis.objs.simple.Trailer`]): List of Trailers for the Movie. translations (List[:class:`~tmdbapis.objs.simple.Translation`]): List of Translations for the Movie. twitter_id (str): Twitter ID for the Movie. video (bool): Unsure when this is true. videos (List[:class:`~tmdbapis.objs.simple.Video`]): List of Videos associated with the Movie. vote_average (float): Vote Average for the Movie. vote_count (int): Number of Votes for the Movie. watch_providers (Dict[str, :class:`~tmdbapis.objs.simple.CountryWatchProviders`]): Dictionary of Watch Providers where the keys are the ISO 3166-1 Alpha-2 Country Codes. watchlist (bool): If this Movie has been added to your watchlist. (Authentication Required) """ def _load(self, data, partial=False): super()._load(data, partial=partial) self.adult = self._parse(attrs="adult", value_type="bool") self.alternative_titles = self._parse(attrs=["alternative_titles", "titles"], value_type="alternative_title", is_list=True) self.backdrop_path = self._parse(attrs="backdrop_path") self.backdrop_url = self._image_url(self.backdrop_path) self.backdrops = self._parse(attrs=["images", "backdrops"], value_type="backdrop", is_list=True) self.budget = self._parse(attrs="budget", value_type="int") self.cast = self._parse(attrs=["credits", "cast"], value_type="movie_cast", is_list=True) self.collection = self._parse(attrs="belongs_to_collection", value_type="collection") self.companies = self._parse(attrs="production_companies", value_type="company", is_list=True) self.countries = self._parse(attrs="production_countries", value_type="country", is_list=True) self.crew = self._parse(attrs=["credits", "crew"], value_type="movie_crew", is_list=True) self.facebook_id = self._parse(attrs=["external_ids", "facebook_id"]) self.favorite = self._parse(attrs=["account_states", "favorite"], value_type="bool") self.genres = self._parse(attrs="genres" if "genres" in self._data else "genre_ids", value_type="movie_genre", is_list=True) self.homepage = self._parse(attrs="homepage") self.id = self._parse(attrs="id", value_type="int") self.imdb_id = self._parse(attrs="imdb_id") self.instagram_id = self._parse(attrs=["external_ids", "instagram_id"]) self.keywords = self._parse(attrs=["keywords", "keywords"], value_type="keyword", is_list=True) self.spoken_languages = self._parse(attrs="spoken_languages", value_type="language", is_list=True) self.lists = self._parse(attrs="lists", value_type="lists", key=self.id) self.logos = self._parse(attrs=["images", "logos"], value_type="logo", is_list=True) self.original_language = self._parse(attrs="original_language", value_type="language") self.original_title = self._parse(attrs="original_title") self.overview = self._parse(attrs="overview") self.popularity = self._parse(attrs="popularity", value_type="float") self.poster_path = self._parse(attrs="poster_path") self.poster_url = self._image_url(self.poster_path) self.posters = self._parse(attrs=["images", "posters"], value_type="poster", is_list=True) self.rated = self._parse(attrs=["account_states", "rated", "value"], value_type="float", default_is_none=True) self.recommendations = self._parse(attrs="recommendations", value_type="recommended_movies", key=self.id) self.release_date = self._parse(attrs="release_date", value_type="date") self.release_dates = {} if "release_dates" in self._data and "results" in self._data["release_dates"]: for iso in self._data["release_dates"]["results"]: self.release_dates[iso["iso_3166_1"]] = self._parse(data=iso, attrs="release_dates", value_type="release_date", is_list=True) self.revenue = self._parse(attrs="revenue", value_type="int") self.reviews = self._parse(attrs="reviews", value_type="movie_reviews", key=self.id) self.runtime = self._parse(attrs="runtime", value_type="int") self.similar = self._parse(attrs="similar", value_type="similar_movies", key=self.id) self.status = self._parse(attrs="status") self.tagline = self._parse(attrs="tagline") self.title = self._parse(attrs="title") self.name = self.title self.trailers = self._parse(attrs=["trailers", "youtube"], value_type="trailer", is_list=True) self.translations = self._parse(attrs=["translations", "translations"], value_type="translation", is_list=True) self.twitter_id = self._parse(attrs=["external_ids", "twitter_id"]) self.video = self._parse(attrs="video", value_type="bool") self.videos = self._parse(attrs=["videos", "results"], value_type="video", is_list=True) self.vote_average = self._parse(attrs="vote_average", value_type="float") self.vote_count = self._parse(attrs="vote_count", value_type="int") self.watch_providers = self._parse(attrs=["watch/providers", "results"], value_type="country_watch_provider", is_dict=True) self.watchlist = self._parse(attrs=["account_states", "watchlist"], value_type="bool") self._finish(self.title) def _append_str(self): return "account_states,alternative_titles,credits,external_ids,images,keywords,lists,recommendations," \ "release_dates,reviews,similar,trailers,translations,videos,watch/providers" def _full_load(self, partial=None): return self._api.movies_get_details( self.id, language=self._tmdb.language, include_image_language=self._tmdb._include_language, include_video_language=self._tmdb._include_language, append_to_response=partial ) def _rate(self, rating): self._api.movies_rate_movie(self.id, rating) def _delete_rate(self): self._api.movies_delete_rating(self.id) def _media_type(self): return "movie"
(tmdb, data, load=False, partial=False)
53,448
tmdbapis.objs.reload
_append_str
null
def _append_str(self): return "account_states,alternative_titles,credits,external_ids,images,keywords,lists,recommendations," \ "release_dates,reviews,similar,trailers,translations,videos,watch/providers"
(self)
53,449
tmdbapis.objs.reload
_delete_rate
null
def _delete_rate(self): self._api.movies_delete_rating(self.id)
(self)
53,451
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.movies_get_details( self.id, language=self._tmdb.language, include_image_language=self._tmdb._include_language, include_video_language=self._tmdb._include_language, append_to_response=partial )
(self, partial=None)
53,453
tmdbapis.objs.reload
_load
null
def _load(self, data, partial=False): super()._load(data, partial=partial) self.adult = self._parse(attrs="adult", value_type="bool") self.alternative_titles = self._parse(attrs=["alternative_titles", "titles"], value_type="alternative_title", is_list=True) self.backdrop_path = self._parse(attrs="backdrop_path") self.backdrop_url = self._image_url(self.backdrop_path) self.backdrops = self._parse(attrs=["images", "backdrops"], value_type="backdrop", is_list=True) self.budget = self._parse(attrs="budget", value_type="int") self.cast = self._parse(attrs=["credits", "cast"], value_type="movie_cast", is_list=True) self.collection = self._parse(attrs="belongs_to_collection", value_type="collection") self.companies = self._parse(attrs="production_companies", value_type="company", is_list=True) self.countries = self._parse(attrs="production_countries", value_type="country", is_list=True) self.crew = self._parse(attrs=["credits", "crew"], value_type="movie_crew", is_list=True) self.facebook_id = self._parse(attrs=["external_ids", "facebook_id"]) self.favorite = self._parse(attrs=["account_states", "favorite"], value_type="bool") self.genres = self._parse(attrs="genres" if "genres" in self._data else "genre_ids", value_type="movie_genre", is_list=True) self.homepage = self._parse(attrs="homepage") self.id = self._parse(attrs="id", value_type="int") self.imdb_id = self._parse(attrs="imdb_id") self.instagram_id = self._parse(attrs=["external_ids", "instagram_id"]) self.keywords = self._parse(attrs=["keywords", "keywords"], value_type="keyword", is_list=True) self.spoken_languages = self._parse(attrs="spoken_languages", value_type="language", is_list=True) self.lists = self._parse(attrs="lists", value_type="lists", key=self.id) self.logos = self._parse(attrs=["images", "logos"], value_type="logo", is_list=True) self.original_language = self._parse(attrs="original_language", value_type="language") self.original_title = self._parse(attrs="original_title") self.overview = self._parse(attrs="overview") self.popularity = self._parse(attrs="popularity", value_type="float") self.poster_path = self._parse(attrs="poster_path") self.poster_url = self._image_url(self.poster_path) self.posters = self._parse(attrs=["images", "posters"], value_type="poster", is_list=True) self.rated = self._parse(attrs=["account_states", "rated", "value"], value_type="float", default_is_none=True) self.recommendations = self._parse(attrs="recommendations", value_type="recommended_movies", key=self.id) self.release_date = self._parse(attrs="release_date", value_type="date") self.release_dates = {} if "release_dates" in self._data and "results" in self._data["release_dates"]: for iso in self._data["release_dates"]["results"]: self.release_dates[iso["iso_3166_1"]] = self._parse(data=iso, attrs="release_dates", value_type="release_date", is_list=True) self.revenue = self._parse(attrs="revenue", value_type="int") self.reviews = self._parse(attrs="reviews", value_type="movie_reviews", key=self.id) self.runtime = self._parse(attrs="runtime", value_type="int") self.similar = self._parse(attrs="similar", value_type="similar_movies", key=self.id) self.status = self._parse(attrs="status") self.tagline = self._parse(attrs="tagline") self.title = self._parse(attrs="title") self.name = self.title self.trailers = self._parse(attrs=["trailers", "youtube"], value_type="trailer", is_list=True) self.translations = self._parse(attrs=["translations", "translations"], value_type="translation", is_list=True) self.twitter_id = self._parse(attrs=["external_ids", "twitter_id"]) self.video = self._parse(attrs="video", value_type="bool") self.videos = self._parse(attrs=["videos", "results"], value_type="video", is_list=True) self.vote_average = self._parse(attrs="vote_average", value_type="float") self.vote_count = self._parse(attrs="vote_count", value_type="int") self.watch_providers = self._parse(attrs=["watch/providers", "results"], value_type="country_watch_provider", is_dict=True) self.watchlist = self._parse(attrs=["account_states", "watchlist"], value_type="bool") self._finish(self.title)
(self, data, partial=False)
53,454
tmdbapis.objs.reload
_media_type
null
def _media_type(self): return "movie"
(self)
53,456
tmdbapis.objs.reload
_rate
null
def _rate(self, rating): self._api.movies_rate_movie(self.id, rating)
(self, rating)
53,457
tmdbapis.objs.mixin
add_to_watchlist
Add to your Watchlist (Authentication Required)
def add_to_watchlist(self: TMDbObj): """ Add to your Watchlist (Authentication Required) """ self._api.account_add_to_watchlist(self._media_type(), self.id, True)
(self: tmdbapis.objs.base.TMDbObj)
53,459
tmdbapis.objs.mixin
mark_as_favorite
Mark as a Favorite (Authentication Required)
def mark_as_favorite(self: TMDbObj): """ Mark as a Favorite (Authentication Required) """ self._api.account_mark_as_favorite(self._media_type(), self.id, True)
(self: tmdbapis.objs.base.TMDbObj)
53,462
tmdbapis.objs.mixin
remove_as_favorite
Remove as a Favorite (Authentication Required)
def remove_as_favorite(self: TMDbObj): """ Remove as a Favorite (Authentication Required) """ self._api.account_mark_as_favorite(self._media_type(), self.id, False)
(self: tmdbapis.objs.base.TMDbObj)
53,463
tmdbapis.objs.mixin
remove_from_watchlist
Remove from your Watchlist (Authentication Required)
def remove_from_watchlist(self: TMDbObj): """ Remove from your Watchlist (Authentication Required) """ self._api.account_add_to_watchlist(self._media_type(), self.id, False)
(self: tmdbapis.objs.base.TMDbObj)
53,464
tmdbapis.objs.reload
Network
Represents a single Network. Attributes: alternative_names (List[:class:`~tmdbapis.objs.simple.AlternativeName`]): Network Alternative Names. country (:class:`~tmdbapis.objs.simple.Country`): Network Country. headquarters (str): Network Headquarters. homepage (str): Network Homepage. id (int): Network ID. logo_path (str): Logo Path. logo_url (str): Logo Full URL. logos (List[:class:`~tmdbapis.objs.image.Logo`]): List of other Logos for the Network. name (str): Network Name. tv_shows (:class:`~tmdbapis.objs.pagination.DiscoverTVShows`): Network TV Shows.
class Network(TMDbReload): """ Represents a single Network. Attributes: alternative_names (List[:class:`~tmdbapis.objs.simple.AlternativeName`]): Network Alternative Names. country (:class:`~tmdbapis.objs.simple.Country`): Network Country. headquarters (str): Network Headquarters. homepage (str): Network Homepage. id (int): Network ID. logo_path (str): Logo Path. logo_url (str): Logo Full URL. logos (List[:class:`~tmdbapis.objs.image.Logo`]): List of other Logos for the Network. name (str): Network Name. tv_shows (:class:`~tmdbapis.objs.pagination.DiscoverTVShows`): Network TV Shows. """ def _load(self, data, partial=False): super()._load(data, partial=partial) self._tv_shows = None self.alternative_names = self._parse(attrs=["alternative_names", "results"], value_type="alternative_name", is_list=True) self.country = self._parse(attrs="origin_country", value_type="country") self.headquarters = self._parse(attrs="headquarters") self.homepage = self._parse(attrs="homepage") self.id = self._parse(attrs="id", value_type="int") self.logo_path = self._parse(attrs="logo_path") self.logo_url = self._image_url(self.logo_path) self.logos = self._parse(attrs=["images", "logos"], value_type="logo", is_list=True) self.name = self._parse(attrs="name") self._finish(self.name) def _append_str(self): return "alternative_names,images" def _full_load(self, partial=None): return self._api.networks_get_details(self.id, append_to_response=partial) @property def tv_shows(self): if not self._tv_shows: self._tv_shows = self._tmdb.discover_tv_shows(with_networks=self.id) return self._tv_shows
(tmdb, data, load=False, partial=False)
53,475
tmdbapis.objs.reload
_full_load
null
def _full_load(self, partial=None): return self._api.networks_get_details(self.id, append_to_response=partial)
(self, partial=None)