<commit_before>= RWSC
RWSC stands for Rakuten Web Service Client.  This is the Rakuten Web Service API Wrapper for Ruby.

This README covers the basic usage.

== Step 1.  Install the gem:
sudo gem install rwsc

== Step 2.  Require the gem (You may need to also require rubygems, depending on your setup):
require 'rubygems'
require 'rwsc'

== Step 3.  Use the gem to make a call to the API:

result_object = Rwsc::ItemSearch.find(:keyword => "cool stuff that they only have in Japan", :developerId => [Your_Rakuten_Developer_ID]*)

Other params to try:
  :developerId
  :affiliateId
  :keyword
  :shopCode
  :genreId
  :catalogCode,
  :hits
  :page
  :sort
  :minPrice
  :maxPrice
  :availability
  :field
  :carrier
  :imageFlag
  :orFlag
  :NGKeyword
  :genreInformationFlag
  :purchaseType


== Step 4.  Get a response:

The information you get is in a data_hash, wrapped in the result_object.  To access any underlying data, just
call the keys of the hash as methods on your result_object. (ie. result_object.items)

This is a hash of hashes and arrays, so you might have to drill down to get the info you're looking for.

Anyways, these are the keys of the big data_hash:
"items"
"hits"
"args"
"status"
"carrier"
"page_count"
"last"
"first"
"count"
"page"


For more info on what is supported by this particular API (Item search), check out http://webservice.rakuten.co.jp/api/itemsearch/ **

With google translate as your friend, you should be able to glean the request params and response body.  




------------------------------------------------------------------------------------------
*What's that?  You don't have a Rakuten developer ID?  
You can click the top link on the blue box in the upper left corner on this page:
http://webservice.rakuten.co.jp/

With good luck and google translate, you might be able to get by.  
But feel free to get in touch with github.com/evanburchard if you have any questions.


**And yes, those are 24 other APIs to the left, just waiting to be implemented.  Fork away! <commit_msg>added information about proxies to README.rdoc<commit_after>= RWSC
RWSC stands for Rakuten Web Service Client.  This is the Rakuten Web Service API Wrapper for Ruby.

This README covers the basic usage.

== Step 1.  Install the gem:
sudo gem install rwsc

== Step 2.  Require the gem (You may need to also require rubygems, depending on your setup):
require 'rubygems'
require 'rwsc'

== Step 3.  Use the gem to make a call to the API:

result_object = Rwsc::ItemSearch.find(:keyword => "cool stuff that they only have in Japan", :developerId => [Your_Rakuten_Developer_ID]*)

Other params to try:
  :developerId
  :affiliateId
  :keyword
  :shopCode
  :genreId
  :catalogCode,
  :hits
  :page
  :sort
  :minPrice
  :maxPrice
  :availability
  :field
  :carrier
  :imageFlag
  :orFlag
  :NGKeyword
  :genreInformationFlag
  :purchaseType


== Step 4.  Get a response:

The information you get is in a data_hash, wrapped in the result_object.  To access any underlying data, just
call the keys of the hash as methods on your result_object. (ie. result_object.items)

This is a hash of hashes and arrays, so you might have to drill down to get the info you're looking for.

Anyways, these are the keys of the big data_hash:
"items"
"hits"
"args"
"status"
"carrier"
"page_count"
"last"
"first"
"count"
"page"

For more info on what is supported by this particular API (Item search), check out http://webservice.rakuten.co.jp/api/itemsearch/ **

With google translate as your friend, you should be able to glean the request params and response body.  

== Use of RWSC through a Proxy

When you have to connect through a proxy server, you should also set these variables before your call to Rwsc::ItemSearch.find:

 Rwsc::Config.proxy_host = "YOUR_PROXY_HOST"
 Rwsc::Config.proxy_port = YOUR_PROXY_PORT


------------------------------------------------------------------------------------------
*What's that?  You don't have a Rakuten developer ID?  
You can click the top link on the blue box in the upper left corner on this page:
http://webservice.rakuten.co.jp/

With good luck and google translate, you might be able to get by.  
But feel free to get in touch with github.com/evanburchard if you have any questions.


**And yes, those are 24 other APIs to the left, just waiting to be implemented.  Fork away! 
{'fraction_non_alphanumeric': 0.1110087517273146, 'fraction_numerical': 0.0027637033625057578, 'mean_word_length': 3.2453567937438903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6831128', 'n_tokens_mistral': 1362, 'n_tokens_neox': 1301, 'n_words': 603}