Class: EStat::Client

Inherits:
Object
  • Object
show all
Includes:
Connection, Endpoint, Request
Defined in:
lib/e-stat/client.rb

Instance Method Summary collapse

Methods included from Endpoint

#data_catalog, #meta_info, #post_dataset, #ref_dataset, #stats_data, #stats_list

Methods included from Request

#get, #post

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



10
11
12
13
14
15
# File 'lib/e-stat/client.rb', line 10

def initialize(options = {})
  options = EStat.options.merge(options)
  Configuration::OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Method Details

#endpointObject



21
22
23
24
25
# File 'lib/e-stat/client.rb', line 21

def endpoint
  return base_url if format.nil?

  "#{base_url}/#{format}"
end