Module: DMM::Client::ItemList

Included in:
DMM::Client
Defined in:
lib/ruby-dmm/client/item_list.rb

Constant Summary collapse

ITEM_LIST_PARAMETERS =
[
  :floor,
  :hits,
  :keyword,
  :mono_stock,
  :offset,
  :service,
  :sort,
].freeze

Instance Method Summary collapse

Instance Method Details

#item_list(keyword = '', options = {}) ⇒ Object Also known as: items



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/ruby-dmm/client/item_list.rb', line 7

def item_list(keyword = '', options = {})
  @params = @params.merge(:keyword => keyword).merge(options)
  @params[:operation] = OPERATION_ITEM_LIST
  response = get('/', @params)
  item_list = DMM::Response.new(response[:response])

  if @result_only
    item_list.result
  else
    item_list
  end
end