Class: TheTvDbParty::BaseSeriesRecord

Inherits:
Object
  • Object
show all
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.

See Also

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

Direct Known Subclasses

FullSeriesRecord

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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

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

#addedbyObject (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_dayofweekObject (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_timeObject (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_fullObject (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
  @bannerpath_full
end

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

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

#contentratingObject (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
  @contentrating
end

#fanartpath_fullObject (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_relativeObject (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

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

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

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

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

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

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

#overviewObject (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_fullObject (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_relativeObject (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

#ratingObject (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
  @rating
end

#ratingcountObject (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
  @ratingcount
end

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

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

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

#statusObject (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_idObject (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_idObject (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 nil if 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_actorsObject

Retrieves the banners for this series.

Returns

An array of TheTvDbParty::Banner instances, or nil if 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_bannersObject

Retrieves the banners for this series.

Returns

An array of TheTvDbParty::Banner instances, or nil if none could be retrieved.

See Also

TheTvDbParty::Client#get_series_banners


113
114
115
# File 'lib/thetvdb_party/baseseriesrecord.rb', line 113

def get_banners
  @client.get_series_banners @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 nil if 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_recordObject


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 nil if 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