Class: Alula::Client

Inherits:
Object show all
Includes:
HTTParty
Defined in:
lib/alula/client.rb

Constant Summary collapse

DEFAULT_CUSTOM_OPTIONS =
{
  omitRelationships: true
}.freeze

Class Method Summary collapse

Class Method Details

.configObject



12
13
14
# File 'lib/alula/client.rb', line 12

def config
  @_config ||= Alula::ClientConfiguration.new
end

.configure {|config| ... } ⇒ Object

Yields:



16
17
18
# File 'lib/alula/client.rb', line 16

def configure
  yield config if block_given?
end

.request(http_method, resource_path, filters = {}, opts = {}) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/alula/client.rb', line 20

def request(http_method, resource_path, filters = {}, opts = {})
  if resource_path.match(%r{^/m2m/})
    request_m2m(http_method, resource_path, filters, opts)
  else
    request_alula(http_method, resource_path, filters, opts)
  end
end