Class: Deis::ApiWrapper

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

Constant Summary collapse

API_PATH =
'/v1'

Instance Method Summary collapse

Constructor Details

#initialize(deis_url) ⇒ ApiWrapper

Returns a new instance of ApiWrapper.



39
40
41
42
# File 'lib/deis_client.rb', line 39

def initialize(deis_url)
  @base_uri = deis_url + API_PATH
  # self.class.base_uri (deis_url + API_PATH)
end

Instance Method Details

#delete(path, options) ⇒ Object



52
53
54
# File 'lib/deis_client.rb', line 52

def delete(path, options)
  self.class.delete(@base_uri + path, options)
end

#get(path, options) ⇒ Object



44
45
46
# File 'lib/deis_client.rb', line 44

def get(path, options)
  self.class.get(@base_uri + path, options)
end

#post(path, options) ⇒ Object



48
49
50
# File 'lib/deis_client.rb', line 48

def post(path, options)
  self.class.post(@base_uri + path, options)
end