Class: Traktr::Endpoint

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/traktr/endpoint.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Endpoint

Returns a new instance of Endpoint.



5
6
7
8
9
# File 'lib/traktr/endpoint.rb', line 5

def initialize(client)
  self.class.base_uri File.join(Traktr.base_uri, self.class.to_s.split("::")[1..-1].join("/").downcase)
  @client = client
  @auth = { username: @client.username, password: @client.password }
end