Sha256: 6e7e3443fd44adf40b2a3b1ed6129f31e15b9dd38443f885ed3e4fca6dddb52c

Contents?: true

Size: 814 Bytes

Versions: 5

Compression:

Stored size: 814 Bytes

Contents

# This is a sample script of Rakuten Books APIs. 
# RWS Ruby SDK supports Books API. The inteface is similar to ones Ichiba API. 
# If you want to search CDs dealt in Rakuten Books, you can do it with `RakutenWebService::Books::CD`. 
# As for other resources, there are `RakutenWebService::Books::Book`, `RakutenWebService::Books::DVD` and so on. 
# Please refer to the following documents if you want more detail of input/output parameters: 
#   http://webservice.rakuten.co.jp/document/
#

require 'rakuten_web_service'

application_id = ARGV.shift
keyword = ARGV[0..-1].join(' ')

RakutenWebService.configure do |c|
  c.application_id = application_id
end

cds = RakutenWebService::Books::CD.search(:title => keyword)

cds.first(10).each do |cd|
  puts "#{cd.title} (#{cd.title_kana}):\n\t #{cd.play_list}"
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rakuten_web_service-1.4.1 examples/books_item_search.rb
rakuten_web_service-1.4.0 examples/books_item_search.rb
rakuten_web_service-1.3.0 examples/books_item_search.rb
rakuten_web_service-1.2.0 examples/books_item_search.rb
rakuten_web_service-1.1.1 examples/books_item_search.rb