Module: PuppetRestClient::PE::Request

Included in:
Connection
Defined in:
lib/puppet-rest/pe/request.rb

Instance Method Summary collapse

Instance Method Details

#api_path(entity, key) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/puppet-rest/pe/request.rb', line 8

def api_path(entity, key)
  if api_version.nil?
    '/%s/%s/%s' % [environment, entity, key]
  else
    '/%s/%s/%s?environment=%s' % [api_version, entity, key, environment]
  end
end

#get(path, params = nil, options = Mash.new) ⇒ Object



4
5
6
# File 'lib/puppet-rest/pe/request.rb', line 4

def get(path, params=nil, options=Mash.new)
  request(:get, path, params, options)
end