phoet / asin

:books: :package: Amazon Simple INterface - Support for ItemLookup, SimilarityLookup, Search, BrowseNode and Cart Operations
http://asin.herokuapp.com/
167 stars 59 forks source link

Example are broken ... #37

Closed jamesladd closed 10 years ago

jamesladd commented 10 years ago

In your doco you say this:

lookup an item with the amazon standard identification number (asin)

items = client.lookup '1430218150'

have a look at the title of the item

items.first.item_attributes.title => Learn Objective-C on the Mac (Learn Series)

BUT if you execute that it fails saying 'item_attributes' method undefined.

What is the set of methods you can call on a returned item given they are not defined on the SimpleItem class?

phoet commented 10 years ago

could you create a gist with your code and references to the ruby version and gem version you are using? there is no such thing as SimpleItem any longer.

jamesladd commented 10 years ago

The gist is the same code as the readme on this github project.

Updating the README with code that works is probably all that is needed. For example:

In IRB> client = ASIN::Client.instance items = client.search_keywords('smalltalk', 'pattern') item = items.first item.raw['OfferSummary'] item.raw['OfferSummary']['LowestNewPrice']['FormattedPrice']

Where as 'items.first.item_attributes.title' wont work.

phoet commented 10 years ago

Again, which version are you using? On Jul 4, 2014 1:28 AM, "James Ladd" notifications@github.com wrote:

The gist is the same code as the readme on this github project.

Updating the README with code that works is probably all that is needed. For example:

In IRB> client = ASIN::Client.instance items = client.search_keywords('smalltalk', 'pattern') item = items.first item.raw['OfferSummary'] item.raw['OfferSummary']['LowestNewPrice']['FormattedPrice']

Where as 'items.first.item_attributes.title' wont work.

— Reply to this email directly or view it on GitHub https://github.com/phoet/asin/issues/37#issuecomment-48010182.

kurtfunai commented 10 years ago

Check your Gemfile.lock or

gem list --local | grep asin
phoet commented 10 years ago

In irb, ASIN::VERSION On Jul 4, 2014 9:58 AM, "Kurt Funai" notifications@github.com wrote:

gem list --local | grep asin

— Reply to this email directly or view it on GitHub https://github.com/phoet/asin/issues/37#issuecomment-48046850.

jamesladd commented 10 years ago

ASIN::VERSION = "1.1.2"

On Sat, Jul 5, 2014 at 7:32 AM, Peter Schröder notifications@github.com wrote:

In irb, ASIN::VERSION On Jul 4, 2014 9:58 AM, "Kurt Funai" notifications@github.com wrote:

gem list --local | grep asin

— Reply to this email directly or view it on GitHub https://github.com/phoet/asin/issues/37#issuecomment-48046850.

— Reply to this email directly or view it on GitHub https://github.com/phoet/asin/issues/37#issuecomment-48070845.

phoet commented 10 years ago

when you are looking for documentation, make sure you are looking for the docs on the right version.

with gems, there is a builtin thing called ri that you can leverage to see docs

○ → gem install asin -v=1.1.2 --ri --rdoc
[...]
○ → ri ASIN
jamesladd commented 10 years ago

You should put that at the top of the readme and suggest that what follows might be out of date.

phoet commented 10 years ago

THE VERSION YOU ARE USING IS OUT OF DATE!

kurtfunai commented 10 years ago

@jamesladd the current version is 2.0.1

jamesladd commented 10 years ago

I didnt specify a version in my Gemfile. I wonder why I got an older version then.

On Sat, Jul 5, 2014 at 12:33 PM, Kurt Funai notifications@github.com wrote:

@jamesladd https://github.com/jamesladd the current version is 2.0.1

— Reply to this email directly or view it on GitHub https://github.com/phoet/asin/issues/37#issuecomment-48076831.

uri commented 10 years ago

You probably bundle a long time ago, and then never ran bundle update.

jamesladd commented 10 years ago

1 week ago.

Sent from the holodeck.

On 8 Jul 2014, at 3:14 am, Uri Gorelik notifications@github.com wrote:

You probably bundle a long time ago, and then never ran bundle update.

— Reply to this email directly or view it on GitHub.

uri commented 10 years ago

Have you ever used asin before? I think bundler would reference an existing version on your machine if you don't lock a version in.