Class: DMM::Client
- Inherits:
-
Object
- Object
- DMM::Client
- 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 #{DMM::VERSION}".freeze
- API_MAP =
{ product: 'ItemList', # 商品情報 floor: 'FloorList', # フロア actress: 'ActressSearch', # 女優検索 genre: 'GenreSearch', # ジャンル検索 maker: 'MakerSearch', # メーカー検索 series: 'SeriesSearch', # シリーズ検索 author: 'AuthorSearch', # 作者検索 }.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.
14 15 16 17 18 |
# File 'lib/ruby-dmm/client.rb', line 14 def initialize( = {}) @api_id = (ENV['DMM_API_ID'] || [:api_id]) @affiliate_id = (ENV['DMM_AFFILIATE_ID'] || [:affiliate_id]) @user_agent = (ENV['DMM_USER_AGENT'] || [:user_agent] || DEFAULT_USER_AGENT) end |