Class: TVDB::Series::Filter

Inherits:
Base
  • Object
show all
Defined in:
lib/tvdb_client/series/series_filter.rb

Instance Attribute Summary

Attributes inherited from Base

#connection, #data, #parameters, #route, #series_id

Instance Method Summary collapse

Methods inherited from Base

#list, #query

Constructor Details

#initialize(options) ⇒ Filter

Returns a new instance of Filter.



5
6
7
8
9
10
# File 'lib/tvdb_client/series/series_filter.rb', line 5

def initialize( options )
  @connection = options.fetch( :connection )
  @series_id  = options.fetch( :series_id )
  @parameters = options.fetch( :params ) { {} }
  @route      = "/series/#{series_id}/filter"
end

Instance Method Details

#paramsObject



12
13
14
# File 'lib/tvdb_client/series/series_filter.rb', line 12

def params
  connection.get( "#{route}/params" ).body
end

#query_paramsObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/tvdb_client/series/series_filter.rb', line 16

def query_params
  raise NotImplementedError, "'.query_params' not implemented for #{self.class}. Please use '.params'"
end