class TVDB::Client
Attributes
auth[R]
connection[RW]
Public Class Methods
new( options )
click to toggle source
# File lib/tvdb_client/client.rb, line 6 def initialize( options ) authenticate( options ) end
Public Instance Methods
refresh_token()
click to toggle source
# File lib/tvdb_client/client.rb, line 10 def refresh_token auth.refresh_token end
series( series_id, options = {} )
click to toggle source
# File lib/tvdb_client/client.rb, line 14 def series( series_id, options = {} ) TVDB::Series.new( connection, series_id, options ) end
Private Instance Methods
authenticate( options )
click to toggle source
# File lib/tvdb_client/client.rb, line 20 def authenticate( options ) @connection = TVDB::Connection.new( options ) options[:connection] = connection @auth = TVDB::Authorization.new( options ) login = auth.login raise "#{login}" if login.code == 401 end