Class: RubySokmil::Client
- Inherits:
-
Object
- Object
- RubySokmil::Client
- Defined in:
- lib/ruby_sokmil/client.rb
Constant Summary collapse
- BASE_URL =
"https://sokmil-ad.com/api/v1/".freeze
- DEFAULT_AFFILIATE_ID =
"20131-001".freeze
- API_MAP =
{ item: "Item", # 商品検索 maker: "Maker", # メーカー検索 label: "Label", # レーベル検索 series: "Series", # シリーズ検索 genre: "Genre", # ジャンル検索 director: "Director", # 監督検索 actor: "Actor" # 出演者検索 }.freeze
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
10 11 12 13 |
# File 'lib/ruby_sokmil/client.rb', line 10 def initialize( = {}) @api_key = (ENV["SOKMIL_API_ID"] || [:api_key]) @affiliate_id = (ENV["SOKMIL_AFFILIATE_ID"] || [:affiliate_id] || DEFAULT_AFFILIATE_ID) end |