Module: TheTvDB

Defined in:
lib/the_tv_db.rb,
lib/the_tv_db/api.rb,
lib/the_tv_db/model.rb,
lib/the_tv_db/client.rb,
lib/the_tv_db/errors.rb,
lib/the_tv_db/series.rb,
lib/the_tv_db/episode.rb,
lib/the_tv_db/version.rb,
lib/the_tv_db/response.rb,
lib/the_tv_db/utils/zip.rb,
lib/the_tv_db/connection.rb,
lib/the_tv_db/response/unzip.rb,
lib/the_tv_db/response/xmlize.rb,
lib/the_tv_db/series/collection.rb,
lib/the_tv_db/response/raise_error.rb

Defined Under Namespace

Modules: Connection, Model Classes: API, Client, ConnectionNotEstablished, Episode, RecordNotFound, Response, Series, TheTvDBError, Zip

Constant Summary collapse

SITE =
"http://thetvdb.com".freeze
ENDPOINT =
"http://thetvdb.com/api".freeze
VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_clientObject

Handle for the client instance



16
17
18
# File 'lib/the_tv_db.rb', line 16

def api_client
  @api_client
end

.api_keyObject

Handle for the client instance



16
17
18
# File 'lib/the_tv_db.rb', line 16

def api_key
  @api_key
end

Class Method Details

.method_missing(method, *args, &block) ⇒ Object

Delegate to TheTvDB::Client



25
26
27
28
# File 'lib/the_tv_db.rb', line 25

def method_missing(method, *args, &block)
  return super unless new.respond_to?(method)
  new.send(method, *args, &block)
end

.new(options = {}, &block) ⇒ Object



18
19
20
21
# File 'lib/the_tv_db.rb', line 18

def new(options={}, &block)
  @api_key = options.delete(:api_key)
  @api_client = TheTvDB::Client.new(options, &block)
end

.respond_to?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/the_tv_db.rb', line 30

def respond_to?(method, include_private = false)
  new.respond_to?(method, include_private) || super(method, include_private)
end