Class: TVDB::Series
- Inherits:
-
Object
- Object
- TVDB::Series
- Defined in:
- lib/tvdb_client/series.rb,
lib/tvdb_client/series/base.rb,
lib/tvdb_client/series/series_filter.rb,
lib/tvdb_client/series/series_images.rb,
lib/tvdb_client/series/series_episodes.rb
Defined Under Namespace
Classes: Base, Episodes, Filter, Images
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
-
#series_id ⇒ Object
readonly
Returns the value of attribute series_id.
Instance Method Summary collapse
- #all_episodes ⇒ Object
- #episodes(options = {}) ⇒ Object
- #filter(options = {}) ⇒ Object
- #images(options = {}) ⇒ Object
-
#initialize(connection, series_id, options = {}) ⇒ Series
constructor
A new instance of Series.
Constructor Details
#initialize(connection, series_id, options = {}) ⇒ Series
Returns a new instance of Series.
6 7 8 9 10 11 12 13 |
# File 'lib/tvdb_client/series.rb', line 6 def initialize( connection, series_id, = {} ) @connection = connection @series_id = series_id @route = "/series/#{series_id}" set_subtype_parameters get_series( series_id, ) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/tvdb_client/series.rb', line 4 def code @code end |
#connection ⇒ Object
Returns the value of attribute connection.
3 4 5 |
# File 'lib/tvdb_client/series.rb', line 3 def connection @connection end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/tvdb_client/series.rb', line 4 def data @data end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/tvdb_client/series.rb', line 4 def params @params end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
4 5 6 |
# File 'lib/tvdb_client/series.rb', line 4 def route @route end |
#series_id ⇒ Object (readonly)
Returns the value of attribute series_id.
4 5 6 |
# File 'lib/tvdb_client/series.rb', line 4 def series_id @series_id end |
Instance Method Details
#all_episodes ⇒ Object
33 34 35 36 |
# File 'lib/tvdb_client/series.rb', line 33 def all_episodes tr = TVDB::Service::Threading::ThreadedRequest.new( connection: connection ) tr.make_request( "#{route}/episodes" ) end |
#episodes(options = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/tvdb_client/series.rb', line 15 def episodes( = {} ) set_subtype_parameters( ) TVDB::Series::Episodes.new( params ) end |