Class: TheTvDbParty::SearchSeriesRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/thetvdb_party/searchseriesrecord.rb

Overview

Represents one record within the search results for a series search

See Also

thetvdb.com/wiki/index.php?title=API:GetSeries

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#aliasnamesObject (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_fullObject (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 bannerpath_full
  @bannerpath_full
end

#bannerpath_relativeObject (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 bannerpath_relative
  @bannerpath_relative
end

#clientObject (readonly)

The client instance that retrieved this record


7
8
9
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 7

def client
  @client
end

#firstairedObject (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

#idObject (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_idObject (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

#languageObject (readonly)

Returns a two digit string indicating the language.


17
18
19
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 17

def language
  @language
end

#networkObject (readonly)

Returns the Network name if known; Otherwise, nil.


33
34
35
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 33

def network
  @network
end

#overviewObject (readonly)

Returns the overview for the series


25
26
27
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 25

def overview
  @overview
end

#seriesidObject (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

#seriesnameObject (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_idObject (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_recordObject

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_recordObject


55
56
57
# File 'lib/thetvdb_party/searchseriesrecord.rb', line 55

def get_full_series_record
  @client.get_full_series_record @seriesid
end