Logo: Relish

  1. Sign in

Project: Sucker

Item search

As an API consumer

I want to search for items

Because that has some business value.

Background
Given
the following:
@request = Sucker.new(
  :key    => amazon_key,
  :secret => amazon_secret,
  :locale => :us)
Scenarios
Search for an author
Given
the following:
@request << {
  :operation    => 'ItemSearch',
  :search_index => 'Books',
  :author       => 'George Orwell' }
When
I tape:
@response = @request.get
Then
I expect:
@response['Item'].size.should eql 10
Given
the following:
@request << {
  :operation    => 'ItemSearch',
  :search_index => 'Books',
  :power        => 'author:lacan and not fiction',
  :sort         => 'relevancerank' }
When
I tape:
@response = @request.get
Then
I expect:
@response['Item'].size.should eql 10

Last published over 5 years ago by hakanensari.