Class: Monokera::SDK::ActiveClient
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from ClientBase
#configuration, #connection, #connection_headers, #filter_parameters
Constructor Details
#initialize(configuration: nil) ⇒ ActiveClient
Returns a new instance of ActiveClient.
10
11
12
|
# File 'lib/monokera/sdk/active_client.rb', line 10
def initialize(configuration: nil)
@configuration = configuration
end
|
Class Method Details
.for(service) ⇒ Object
6
7
8
|
# File 'lib/monokera/sdk/active_client.rb', line 6
def self.for(service)
new(configuration: Monokera::SDK::Configurator.new(service))
end
|
Instance Method Details
#destroy(url) ⇒ Object
29
30
31
32
|
# File 'lib/monokera/sdk/active_client.rb', line 29
def destroy(url)
http_response = connection.delete(url, nil, )
process_response(http_response)
end
|
#get(url, query_options = {}) ⇒ Object
14
15
16
17
|
# File 'lib/monokera/sdk/active_client.rb', line 14
def get(url, query_options = {})
http_response = connection.get(url, query_options, )
process_response(http_response)
end
|
#post(url, params, headers = {}) ⇒ Object
19
20
21
22
|
# File 'lib/monokera/sdk/active_client.rb', line 19
def post(url, params, = {})
http_response = connection.post(url, params, .merge())
process_response(http_response)
end
|
#put(url, params) ⇒ Object
24
25
26
27
|
# File 'lib/monokera/sdk/active_client.rb', line 24
def put(url, params)
http_response = connection.put(url, params, )
process_response(http_response)
end
|