Class: Nokaya::TVShow
Constant Summary collapse
- NOKAYA_TVDB_API_KEY =
'C9493DA27231C706'
Instance Attribute Summary collapse
-
#banner_url ⇒ Object
Returns the value of attribute banner_url.
-
#language ⇒ Object
Returns the value of attribute language.
-
#plot ⇒ Object
Returns the value of attribute plot.
-
#poster_url ⇒ Object
Returns the value of attribute poster_url.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Basic
#args, #filenames, #name, #options, #path, #type, #urls
Instance Method Summary collapse
-
#initialize(args, options = {}) ⇒ TVShow
constructor
A new instance of TVShow.
Methods inherited from Basic
Constructor Details
#initialize(args, options = {}) ⇒ TVShow
Returns a new instance of TVShow.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/nokaya/tvshow.rb', line 12 def initialize(args, = {}) super(args, ) @type = :tvshow @language = 'en' begin @tvdb = TvdbParty::Search.new(NOKAYA_TVDB_API_KEY) rescue SocketError Logs.rec.error Status.no_cnx return nil end terms = args.join(' ') show_obj = find(terms, ) return nil if show_obj.nil? create_details(show_obj) @urls = [@poster_url, @banner_url] @filenames = name_files() end |
Instance Attribute Details
#banner_url ⇒ Object
Returns the value of attribute banner_url.
10 11 12 |
# File 'lib/nokaya/tvshow.rb', line 10 def @banner_url end |
#language ⇒ Object
Returns the value of attribute language.
10 11 12 |
# File 'lib/nokaya/tvshow.rb', line 10 def language @language end |
#plot ⇒ Object
Returns the value of attribute plot.
10 11 12 |
# File 'lib/nokaya/tvshow.rb', line 10 def plot @plot end |
#poster_url ⇒ Object
Returns the value of attribute poster_url.
10 11 12 |
# File 'lib/nokaya/tvshow.rb', line 10 def poster_url @poster_url end |
#title ⇒ Object
Returns the value of attribute title.
10 11 12 |
# File 'lib/nokaya/tvshow.rb', line 10 def title @title end |