Sha256: fa5f56d791665fad961fe45cb1f8293cfc0f981b77294fc4f2683ad935d4c615

Contents?: true

Size: 806 Bytes

Versions: 15

Compression:

Stored size: 806 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

15 entries across 15 versions & 1 rubygems

Version Path
rakuten_web_service-1.13.2 examples/books_item_search.rb
rakuten_web_service-1.13.1 examples/books_item_search.rb
rakuten_web_service-1.13.0 examples/books_item_search.rb
rakuten_web_service-1.12.0 examples/books_item_search.rb
rakuten_web_service-1.11.0 examples/books_item_search.rb
rakuten_web_service-1.10.0 examples/books_item_search.rb
rakuten_web_service-1.9.2 examples/books_item_search.rb
rakuten_web_service-1.9.1 examples/books_item_search.rb
rakuten_web_service-1.9.0 examples/books_item_search.rb
rakuten_web_service-1.8.0 examples/books_item_search.rb
rakuten_web_service-1.7.0 examples/books_item_search.rb
rakuten_web_service-1.6.1 examples/books_item_search.rb
rakuten_web_service-1.6.0 examples/books_item_search.rb
rakuten_web_service-1.5.0 examples/books_item_search.rb
rakuten_web_service-1.4.2 examples/books_item_search.rb