Class: TheTvDbParty::BaseSeriesRecord
- Inherits:
-
Object
- Object
- TheTvDbParty::BaseSeriesRecord
- Defined in:
- lib/thetvdb_party/baseseriesrecord.rb
Overview
The Base Series Record contains all of the information available about a series. It does not include any banner, season, or episode information.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#actors ⇒ Object
readonly
An array containing the names of actors as string values.
-
#added ⇒ Object
readonly
The date/time the series was added to the TheTvDb site.
-
#addedby ⇒ Object
readonly
An unsigned integer.
-
#airs_dayofweek ⇒ Object
readonly
The full name in English for the day of the week the series airs in plain text.
-
#airs_time ⇒ Object
readonly
The time of day the series airs on its original network.
-
#bannerpath_full ⇒ Object
readonly
The full path for the highest rated banner for the series, returned as a URI instance.
-
#bannerpath_relative ⇒ Object
readonly
The relative path to the highest rated banner for this series.
-
#client ⇒ Object
readonly
The client instance that retrieved this record.
-
#contentrating ⇒ Object
readonly
The rating given to the series based on the US rating system.
-
#fanartpath_full ⇒ Object
readonly
The full path for the highest rated fanart for the series, returned as a URI instance.
-
#fanartpath_relative ⇒ Object
readonly
The relative path to the highest rated fanart for this series.
-
#firstaired ⇒ Object
readonly
The date the series first aired as a Date instance.
-
#genres ⇒ Object
readonly
A list of genres in plain text.
-
#imdb_id ⇒ Object
readonly
An alphanumeric string containing the IMDB ID for the series.
-
#language ⇒ Object
readonly
A two character string indicating the language in accordance with ISO-639-1.
-
#lastupdated ⇒ Object
readonly
The time and date of the last time any changes were made to the series.
-
#network ⇒ Object
readonly
A string containing the network name in plain text.
-
#networkid ⇒ Object
readonly
Not in use, will be an unsigned integer if ever used.
-
#overview ⇒ Object
readonly
A string containing the overview in the language requested.
-
#posterpath_full ⇒ Object
readonly
The full path for the highest rated poster for the series, returned as a URI instance.
-
#posterpath_relative ⇒ Object
readonly
The relative path to the highest rated poster for this series.
-
#rating ⇒ Object
readonly
The average rating our users have rated the series out of 10, rounded to 1 decimal place.
-
#ratingcount ⇒ Object
readonly
An unsigned integer representing the number of users who have rated the series.
-
#runtime ⇒ Object
readonly
An unsigned integer representing the runtime of the series in minutes.
-
#seriesid ⇒ Object
readonly
An unsigned integer assigned by our site to the series.
-
#seriesname ⇒ Object
readonly
A string containing the series name in the language you requested.
-
#status ⇒ Object
readonly
A string containing either “Ended” or “Continuing”.
-
#tvcom_id ⇒ Object
readonly
Deprecated.
-
#zap2it_id ⇒ Object
readonly
An alphanumeric string containing the zap2it id.
Instance Method Summary collapse
-
#get_absolute_episode(episode_number) ⇒ Object
- Retrieves episode information of an episode in the series by season and episode number according to absolute sorting order Parameters
episode_number-
The episode number within the series.
-
#get_actors ⇒ Object
Retrieves the banners for this series.
-
#get_banners ⇒ Object
Retrieves the banners for this series.
-
#get_dvd_season_episode(season_number, episode_number) ⇒ Object
- Retrieves episode information of an episode in the series by season and episode number according to DVD sorting order Parameters
season_number-
The number of the season in which the episode appeared.
- #get_full_series_record ⇒ Object
-
#get_season_episode(season_number, episode_number) ⇒ Object
- Retrieves episode information of an episode in the series by season and episode number according to default sorting order Parameters
season_number-
The number of the season in which the episode appeared.
-
#initialize(client, hashValues) ⇒ BaseSeriesRecord
constructor
- Initializes a new BaseSeriesRecord from the hash that was retrieved by a given client Parameters
client- The TheTvDbParty::Client instance that retrieved the record
hashValues -
A Hash{String => String} instance that maps the record attribute element names against their values.
- The TheTvDbParty::Client instance that retrieved the record
Constructor Details
#initialize(client, hashValues) ⇒ BaseSeriesRecord
Initializes a new BaseSeriesRecord from the hash that was retrieved by a given client
- Parameters
client-
The TheTvDbParty::Client instance that retrieved the record
hashValues-
A Hash{String => String} instance that maps the record attribute element names against their values
72 73 74 75 76 77 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 72 def initialize(client, hashValues) @client = client @hashValues = hashValues read_hash_values end |
Instance Attribute Details
#actors ⇒ Object (readonly)
An array containing the names of actors as string values. Empty if none are listed.
13 14 15 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 13 def actors @actors end |
#added ⇒ Object (readonly)
The date/time the series was added to the TheTvDb site. Can be null for older series.
15 16 17 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 15 def added @added end |
#addedby ⇒ Object (readonly)
An unsigned integer. The ID of the user on our site who added the series to our database. Is nil for older series.
17 18 19 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 17 def addedby @addedby end |
#airs_dayofweek ⇒ Object (readonly)
The full name in English for the day of the week the series airs in plain text. Can be null.
19 20 21 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 19 def airs_dayofweek @airs_dayofweek end |
#airs_time ⇒ Object (readonly)
The time of day the series airs on its original network. Can be null.
21 22 23 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 21 def airs_time @airs_time end |
#bannerpath_full ⇒ Object (readonly)
The full path for the highest rated banner for the series, returned as a URI instance.
23 24 25 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 23 def @bannerpath_full end |
#bannerpath_relative ⇒ Object (readonly)
The relative path to the highest rated banner for this series. Retrieve #bannerpath_full get the absolute path.
25 26 27 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 25 def @bannerpath_relative end |
#client ⇒ Object (readonly)
The client instance that retrieved this record. Returns a TheTvDbParty::Client instance
8 9 10 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 8 def client @client end |
#contentrating ⇒ Object (readonly)
The rating given to the series based on the US rating system. Can be null or a 4-5 character string.
27 28 29 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 27 def @contentrating end |
#fanartpath_full ⇒ Object (readonly)
The full path for the highest rated fanart for the series, returned as a URI instance.
29 30 31 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 29 def fanartpath_full @fanartpath_full end |
#fanartpath_relative ⇒ Object (readonly)
The relative path to the highest rated fanart for this series. Retrieve #fanartpath_full get the absolute path.
31 32 33 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 31 def fanartpath_relative @fanartpath_relative end |
#firstaired ⇒ Object (readonly)
The date the series first aired as a Date instance
33 34 35 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 33 def firstaired @firstaired end |
#genres ⇒ Object (readonly)
A list of genres in plain text. Empty if none are listed.
35 36 37 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 35 def genres @genres end |
#imdb_id ⇒ Object (readonly)
An alphanumeric string containing the IMDB ID for the series. Can be null.
37 38 39 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 37 def imdb_id @imdb_id end |
#language ⇒ Object (readonly)
A two character string indicating the language in accordance with ISO-639-1. Cannot be null.
39 40 41 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 39 def language @language end |
#lastupdated ⇒ Object (readonly)
The time and date of the last time any changes were made to the series. Can be nil
41 42 43 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 41 def lastupdated @lastupdated end |
#network ⇒ Object (readonly)
A string containing the network name in plain text. Can be null.
43 44 45 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 43 def network @network end |
#networkid ⇒ Object (readonly)
Not in use, will be an unsigned integer if ever used. Can be null.
45 46 47 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 45 def networkid @networkid end |
#overview ⇒ Object (readonly)
A string containing the overview in the language requested. Will return the English overview if no translation is available in the language requested. Can be null.
47 48 49 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 47 def overview @overview end |
#posterpath_full ⇒ Object (readonly)
The full path for the highest rated poster for the series, returned as a URI instance.
49 50 51 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 49 def posterpath_full @posterpath_full end |
#posterpath_relative ⇒ Object (readonly)
The relative path to the highest rated poster for this series. Retrieve #posterpath_full get the absolute path.
51 52 53 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 51 def posterpath_relative @posterpath_relative end |
#rating ⇒ Object (readonly)
The average rating our users have rated the series out of 10, rounded to 1 decimal place.
53 54 55 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 53 def @rating end |
#ratingcount ⇒ Object (readonly)
An unsigned integer representing the number of users who have rated the series.
55 56 57 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 55 def @ratingcount end |
#runtime ⇒ Object (readonly)
An unsigned integer representing the runtime of the series in minutes. Negative if unknown.
57 58 59 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 57 def runtime @runtime end |
#seriesid ⇒ Object (readonly)
An unsigned integer assigned by our site to the series. It does not change and will always represent the same series. Cannot be null.
11 12 13 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 11 def seriesid @seriesid end |
#seriesname ⇒ Object (readonly)
A string containing the series name in the language you requested. Will return the English name if no translation is found in the language requested. Can be null if the name isn’t known in the requested language or English.
61 62 63 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 61 def seriesname @seriesname end |
#status ⇒ Object (readonly)
A string containing either “Ended” or “Continuing”. Can be null.
63 64 65 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 63 def status @status end |
#tvcom_id ⇒ Object (readonly)
Deprecated. An unsigned integer representing the series ID at tv.com. As TV.com now only uses these ID’s internally it’s of little use and no longer updated. Can be null.
59 60 61 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 59 def tvcom_id @tvcom_id end |
#zap2it_id ⇒ Object (readonly)
An alphanumeric string containing the zap2it id. Can be nil.
66 67 68 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 66 def zap2it_id @zap2it_id end |
Instance Method Details
#get_absolute_episode(episode_number) ⇒ Object
Retrieves episode information of an episode in the series by season and episode number according to absolute sorting order
- Parameters
episode_number-
The episode number within the series.
- Returns
-
A TheTvDbParty::BaseEpisodeRecord instance that represents the episode, or
nilif the episode could not be found. - See Also
-
TheTvDbParty::Client#get_series_absolute_episode, #get_season_episode, #get_dvd_season_episode
106 107 108 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 106 def get_absolute_episode(episode_number) @client.get_series_absolute_episode @seriesid, episode_number end |
#get_actors ⇒ Object
Retrieves the banners for this series.
- Returns
-
An array of TheTvDbParty::Banner instances, or
nilif none could be retrieved. - See Also
-
TheTvDbParty::Client#get_series_actors
120 121 122 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 120 def get_actors @client.get_series_actors @seriesid end |
#get_banners ⇒ Object
Retrieves the banners for this series.
- Returns
-
An array of TheTvDbParty::Banner instances, or
nilif none could be retrieved. - See Also
-
TheTvDbParty::Client#get_series_banners
113 114 115 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 113 def @client. @seriesid end |
#get_dvd_season_episode(season_number, episode_number) ⇒ Object
Retrieves episode information of an episode in the series by season and episode number according to DVD sorting order
- Parameters
season_number-
The number of the season in which the episode appeared.
episode_number-
The episode number within the season.
- Returns
-
A TheTvDbParty::BaseEpisodeRecord instance that represents the episode, or
nilif the episode could not be found. - Remarks
-
Specials episodes are ordered within season
0. Attributes within the returned record indicate at which time (i.e. between which episode the episode should be ordered) - See Also
-
TheTvDbParty::Client#get_series_dvd_season_episode, #get_season_episode, #get_absolute_episode
97 98 99 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 97 def get_dvd_season_episode(season_number, episode_number) @client.get_series_dvd_season_episode @seriesid, season_number, episode_number end |
#get_full_series_record ⇒ Object
124 125 126 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 124 def get_full_series_record @client.get_full_series_record @seriesid end |
#get_season_episode(season_number, episode_number) ⇒ Object
Retrieves episode information of an episode in the series by season and episode number according to default sorting order
- Parameters
season_number-
The number of the season in which the episode appeared.
episode_number-
The episode number within the season.
- Returns
-
A TheTvDbParty::BaseEpisodeRecord instance that represents the episode, or
nilif the episode could not be found. - Remarks
-
Specials episodes are ordered within season
0. Attributes within the returned record indicate at which time (i.e. between which episode the episode should be ordered) - See Also
-
TheTvDbParty::Client#get_series_season_episode, #get_dvd_season_episode, #get_absolute_episode
86 87 88 |
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 86 def get_season_episode(season_number, episode_number) @client.get_series_season_episode @seriesid, season_number, episode_number end |