Module: Kpm::ClassMethods

Includes:
OpenAPI::ClassMethods
Included in:
Kpm, Client
Defined in:
lib/kpm/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/kpm/client.rb', line 10

def password
  @password
end

#userObject

Returns the value of attribute user.



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

def user
  @user
end

Instance Method Details

#auth_tokenObject



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

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

#build_path(path, params = nil) ⇒ Object



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

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