class Sightengine::Client
Constants
- BASE_URI
- VALID_OPTIONS
Public Class Methods
new(**options)
click to toggle source
# File lib/sightengine/client.rb, line 29 def initialize(**options) options.merge(default_options).each do |opt, value| send("#{opt}=", value) end end
Public Instance Methods
build_uri(path, **params)
click to toggle source
# File lib/sightengine/client.rb, line 35 def build_uri(path, **params) "#{BASE_URI}/#{self.api_version}/#{path}" end
default_options()
click to toggle source
# File lib/sightengine/client.rb, line 43 def default_options { api_version: '1.0' } end
default_params()
click to toggle source
# File lib/sightengine/client.rb, line 39 def default_params { api_user: self.api_user, api_secret: self.api_secret } end