Class: EzPaaS::HTTP::RESTClient
- Inherits:
-
HTTPClient
show all
- Includes:
- HTTParty
- Defined in:
- lib/ezpaas/http/rest_client.rb
Instance Attribute Summary
Attributes inherited from HTTPClient
#url
Instance Method Summary
collapse
Methods inherited from HTTPClient
#initialize
Instance Method Details
#apps ⇒ Object
12
13
14
|
# File 'lib/ezpaas/http/rest_client.rb', line 12
def apps
(handle self.class.get(url_for('/apps')))['apps']
end
|
#create_app(name) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/ezpaas/http/rest_client.rb', line 16
def create_app(name)
options = {
body: {
name: name
}
}
handle self.class.post(url_for('/apps'), options)
end
|
#destroy_app(name) ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/ezpaas/http/rest_client.rb', line 25
def destroy_app(name)
options = {
query: {
name: name
}
}
handle self.class.delete(url_for('/apps'), options)
end
|