Class: Gbizinfo::Client

Inherits:
Object
  • Object
show all
Includes:
Api::Endpoints, Faraday::Connection, Faraday::Request
Defined in:
lib/gbizinfo/client.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Api::Endpoints::HojinWorkplace

#hojin_workplace

Methods included from Api::Endpoints::HojinUpdateInfoWorkplace

#hojin_update_info_workplace

Methods included from Api::Endpoints::HojinUpdateInfoSubsidy

#hojin_update_info_subsidy

Methods included from Api::Endpoints::HojinUpdateInfoProcurement

#hojin_update_info_procurement

Methods included from Api::Endpoints::HojinUpdateInfoPatent

#hojin_update_info_patent

Methods included from Api::Endpoints::HojinUpdateInfoFinance

#hojin_update_info_finance

Methods included from Api::Endpoints::HojinUpdateInfoCommendation

#hojin_update_info_commendation

Methods included from Api::Endpoints::HojinUpdateInfoCertification

#hojin_update_info_certification

Methods included from Api::Endpoints::HojinUpdateInfo

#hojin_update_info

Methods included from Api::Endpoints::HojinSubsidy

#hojin_subsidy

Methods included from Api::Endpoints::HojinSearch

#hojin_search

Methods included from Api::Endpoints::HojinProcurement

#hojin_procurement

Methods included from Api::Endpoints::HojinPatent

#hojin_patent

Methods included from Api::Endpoints::HojinFinance

#hojin_finance

Methods included from Api::Endpoints::HojinCommendation

#hojin_commendation

Methods included from Api::Endpoints::HojinCertification

#hojin_certification

Methods included from Api::Endpoints::Hojin

#hojin

Methods included from Faraday::Request

#get

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



9
10
11
12
13
14
15
# File 'lib/gbizinfo/client.rb', line 9

def initialize(options = {})
  Gbizinfo::Config::ATTRIBUTES.each do |key|
    send("#{key}=", options.fetch(key, Gbizinfo.config.send(key)))
  end

  @token ||= Gbizinfo.config.token
end

Class Method Details

.configObject



22
23
24
# File 'lib/gbizinfo/client.rb', line 22

def config
  Config
end

.configureObject



18
19
20
# File 'lib/gbizinfo/client.rb', line 18

def configure
  block_given? ? yield(Config) : Config
end