Class: RubyDmm::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_dmm/client.rb

Constant Summary collapse

BASE_URL =
'https://api.dmm.com/affiliate/v3/'.freeze
DEFAULT_USER_AGENT =
"ruby_dmm gem #{RubyDmm::VERSION}".freeze
API_MAP =
{
  product: 'ItemList',      # 商品情報
  floor:   'FloorList',     # フロア
  actress: 'ActressSearch', # 女優検索
  genre:   'GenreSearch',   # ジャンル検索
  maker:   'MakerSearch',   # メーカー検索
  series:  'SeriesSearch',  # シリーズ検索
  author:  'AuthorSearch',  # 作者検索
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
16
# File 'lib/ruby_dmm/client.rb', line 13

def initialize(options = {})
  @api_id       = (ENV['DMM_API_ID']       || options[:api_id])
  @affiliate_id = (ENV['DMM_AFFILIATE_ID'] || options[:affiliate_id])
end