class UniOne::Client

Constants

API_ENDPOINT

Public Class Methods

new(params = {}) click to toggle source
  • Args :

    • data_center -> data center: ['eu1', 'us1']

    • lang -> Two-letter ISO 639-1 language abbreviation, e.g. 'en'

    • api_key -> your UniOne API key

    • api_key_in_params -> boolean, pass API key inside form, otherwise pass in headers (default in headers)

# File lib/unione/client.rb, line 33
def initialize(params = {})
  @data_center       = params[:data_center]
  @lang              = params[:lang]
  @api_key           = params[:api_key]
  @api_key_in_params = !!params[:api_key_in_params]
end

Private Instance Methods

api_endpoint() click to toggle source
# File lib/unione/client.rb, line 42
def api_endpoint
  @api_endpoint ||=
    API_ENDPOINT % { data_center: @data_center, lang: @lang }
end