Class: IBM::Cloud::SDK::BaseService
- Inherits:
-
Object
- Object
- IBM::Cloud::SDK::BaseService
show all
- Defined in:
- lib/ibm/cloud/sdk/base_service.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.endpoint ⇒ Object
5
6
7
|
# File 'lib/ibm/cloud/sdk/base_service.rb', line 5
def self.endpoint
raise NotImplementedError
end
|
Instance Method Details
#delete(path) ⇒ Object
13
14
15
|
# File 'lib/ibm/cloud/sdk/base_service.rb', line 13
def delete(path)
JSON.parse(RestClient.delete(url(path), ))
end
|
#endpoint ⇒ Object
9
10
11
|
# File 'lib/ibm/cloud/sdk/base_service.rb', line 9
def endpoint
raise NotImplementedError
end
|
#get(path) ⇒ Object
17
18
19
|
# File 'lib/ibm/cloud/sdk/base_service.rb', line 17
def get(path)
JSON.parse(RestClient.get(url(path), ))
end
|
#post(path, payload) ⇒ Object
21
22
23
|
# File 'lib/ibm/cloud/sdk/base_service.rb', line 21
def post(path, payload)
JSON.parse(RestClient.post(url(path), payload, ))
end
|