Module: Varager::ClassMethods

Includes:
OpenAPI::ClassMethods
Included in:
Varager, Client
Defined in:
lib/varager/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



10
11
12
# File 'lib/varager/client.rb', line 10

def password
  @password
end

#userObject

Returns the value of attribute user.



10
11
12
# File 'lib/varager/client.rb', line 10

def user
  @user
end

Instance Method Details

#auth_tokenObject



20
21
22
# File 'lib/varager/client.rb', line 20

def auth_token
  @auth_token ||= Varager::AuthToken.new
end

#build_path(path, params = nil) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/varager/client.rb', line 12

def build_path(path, params=nil)
  uri = URI("/#{path}.json")
  if params != nil
    uri.query = URI.encode_www_form(params)
  end
  return uri
end