Barnesandnoble
Barnesandnoble is a Ruby wrapper to the Barnes and Noble Product Web Services.
Usage
Set your API key with the environment variable BN_API_KEY
.
Create a request:
request = Barnesandnoble.new
Run a query:
params = {
"Ean" => 9781593083342,
"ProductCode" => "Book"
}
response = request.product_lookup(query: params)
Parse the response into a Hash:
response.to_h
Or pass it to a custom parser:
MyParser.new(response.body)