Class: TheTvDbParty::SearchSeriesRecord
- Inherits:
-
Object
- Object
- TheTvDbParty::SearchSeriesRecord
- Defined in:
- lib/thetvdb_party/searchseriesrecord.rb
Overview
Represents one record within the search results for a series search
Instance Attribute Summary collapse
-
#aliasnames ⇒ Object
readonly
An array of alias names if the series has any other names in that language.
-
#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.
-
#firstaired ⇒ Object
readonly
The first aired date for the series as a Date instance.
-
#id ⇒ Object
readonly
Deprecated: #id is only included to be backwards compatible with the old API and is deprecated.
-
#imdb_id ⇒ Object
readonly
Returns the IMDB id for the series if known.
-
#language ⇒ Object
readonly
Returns a two digit string indicating the language.
-
#network ⇒ Object
readonly
Returns the Network name if known; Otherwise,
nil. -
#overview ⇒ Object
readonly
Returns the overview for the series.
-
#seriesid ⇒ Object
readonly
The unique TheTvDb identifier to access the more detailed Base Series Record and Full Series Record.
-
#seriesname ⇒ Object
readonly
Returns a string with the series name for the language indicated.
-
#zap2it_id ⇒ Object
readonly
Returns the zap2it ID if known.
Instance Method Summary collapse
-
#get_base_series_record ⇒ Object
- Retrieves the Base Series Record for the series Return
-
A TheTvDbParty::BaseSeriesRecord instance that represents the series; or
nil, if the record could not be retrieved.
- #get_full_series_record ⇒ Object
-
#initialize(client, hashValues) ⇒ SearchSeriesRecord
constructor
- Initializes a new Search Series Record as is was retrieved from the TheTvDb API Parameters
client- The TheTvDbParty::Client instance that retrieved the record
hashValues -
A Hash=> String instance that maps the record attribute element names against their values represented as strings.
- The TheTvDbParty::Client instance that retrieved the record
Constructor Details
#initialize(client, hashValues) ⇒ SearchSeriesRecord
Initializes a new Search Series Record as is was retrieved from the TheTvDb API
- Parameters
client-
The TheTvDbParty::Client instance that retrieved the record
hashValues-
A Hash=> String instance that maps the record attribute element names against their values represented as strings.
41 42 43 44 45 46 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 41 def initialize(client, hashValues) @client = client @hashValues = hashValues read_hash_values end |
Instance Attribute Details
#aliasnames ⇒ Object (readonly)
An array of alias names if the series has any other names in that language. Empty, if none are listed.
21 22 23 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 21 def aliasnames @aliasnames end |
#bannerpath_full ⇒ Object (readonly)
The full path for the highest rated banner for the series, returned as a URI instance.
35 36 37 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 35 def end |
#bannerpath_relative ⇒ Object (readonly)
The relative path to the highest rated banner for this series. Retrieve #bannerpath_full get the absolute path.
23 24 25 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 23 def end |
#client ⇒ Object (readonly)
The client instance that retrieved this record
7 8 9 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 7 def client @client end |
#firstaired ⇒ Object (readonly)
The first aired date for the series as a Date instance.
27 28 29 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 27 def firstaired @firstaired end |
#id ⇒ Object (readonly)
Deprecated: #id is only included to be backwards compatible with the old API and is deprecated.
The unique TheTvDb identifier to access the more detailed Base Series Record and Full Series Record.
- See Also
-
#seriesid
12 13 14 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 12 def id @id end |
#imdb_id ⇒ Object (readonly)
Returns the IMDB id for the series if known. Otherwise, nil.
29 30 31 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 29 def imdb_id @imdb_id end |
#language ⇒ Object (readonly)
Returns a two digit string indicating the language.
17 18 19 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 17 def language @language end |
#network ⇒ Object (readonly)
Returns the Network name if known; Otherwise, nil.
33 34 35 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 33 def network @network end |
#overview ⇒ Object (readonly)
Returns the overview for the series
25 26 27 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 25 def overview @overview end |
#seriesid ⇒ Object (readonly)
The unique TheTvDb identifier to access the more detailed Base Series Record and Full Series Record. Negative, if invalid.
15 16 17 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 15 def seriesid @seriesid end |
#seriesname ⇒ Object (readonly)
Returns a string with the series name for the language indicated
19 20 21 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 19 def seriesname @seriesname end |
#zap2it_id ⇒ Object (readonly)
Returns the zap2it ID if known. Otherwise, nil.
31 32 33 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 31 def zap2it_id @zap2it_id end |
Instance Method Details
#get_base_series_record ⇒ Object
Retrieves the Base Series Record for the series
- Return
-
A TheTvDbParty::BaseSeriesRecord instance that represents the series; or
nil, if the record could not be retrieved. - See Also
-
TheTvDbParty::Client#get_base_series_record
51 52 53 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 51 def get_base_series_record @client.get_base_series_record @seriesid end |
#get_full_series_record ⇒ Object
55 56 57 |
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 55 def get_full_series_record @client.get_full_series_record @seriesid end |