class Lolxin::Client

Client create connection clients for specific endpoints

Constants

ENDPOINTS

Attributes

api_key[R]
options[R]
region[R]

Public Class Methods

new(api_key, options = {}) click to toggle source
# File lib/lolxin/client.rb, line 22
def initialize(api_key, options = {})
  @api_key = api_key
  @region  = options[:region] if Region.valid?(options[:region])
  @options = { api_key: @api_key, region: @region }
  raise ClientError, "Invalid API key" if @api_key.nil? || @api_key.empty?
  raise ClientError, "Invalid region" unless @region
end