Giter Club home page Giter Club logo

a2z's People

Contributors

mhuggins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a2z's Issues

undefined method `key=' for A2z::Client:

I am getting undefined method error while trying to instantiate the 'client'. I am newbie, would truly appreciate any help.

client = A2z::Client.new(key: 'YOUR_KEY', secret: 'YOUR_SECRET', tag: 'YOUR_TAG')

I have double checked the details they are correct.

this is how my terminal output looks like

Started GET "/" for 127.0.0.1 at 2015-04-22 00:45:57 +0530
Processing by PagesController#index as HTML
Completed 500 Internal Server Error in 0ms

NoMethodError (undefined method `key=' for #<A2z::Client:0x007fc6ced596b0>):

Build out test suite

I manually tested this gem in irb while building it out, but I never got around to building any kind of unit tests.

No offers available for responses?

Hi there. First of all: awesome gem. Seriously nice, extremely nice compared to vacuum/sucker.

I've been successfully getting responses, but i'm having trouble with offers.

Somehow I cant get any offer across. Is there something I forgot?

client = A2z::Client.new(key: '[key]', secret: '[secret]', tag: '[tag]')

response = client.item_lookup do
  id 'B004MPQXZ0' (tried several products, also the ones that were for sale online)
end

response.item.offers = always nil. Any ideas why?

Thanks again!

Cannot get Browse node

It's work perfectly but if I add "BrowseNodes" to Response Group it doesn't return the Browse node for each ASIN. How do I get the Browser node? I am interested into root category (eg. Home, Kitchen, Home Improvement etc..)

response = client.item_search do
             category 'All'
             keywords "Test"
             response_group('Images, ItemAttributes, OfferListings, SalesRank, BrowseNodes')
      end

p response

a2z not working with ruby 2.0.0-p353 and rails 4.0.1

I am working with amazon product api and use this gem. It is not compitable with the specified version of ruby and rails.

It shows "key=" is not define when i am initiate client like bellow:

client = A2z::Client.new(key: 'My_KEY', secret: 'My_SECRET', tag: 'My_TAG')

Any idea?

Issue with jeff 0.7.0

The gemspec includes jeff (unversioned), which is defaulting to the latest release at jeff 0.7.0. This is causing an error, and manually downgrading to jeff 0.6.4 is the workaround. Planning to update a2z to either specify jeff 0.6.4 or work with jeff 0.7.0, unless someone beats me to the punch.

Make API error response code/message values accessible

Amazon's Product API provides error codes & messages as part of the response. Errors do not necessarily mean there is an error with the search syntax, so I don't think raising is a correct approach to handling errors in the response. For example, simply finding no matching products with a valid search syntax yields an error code/message pair.

When errors are returned, they should be accessible via an accessor (as an array) on the response object. For example:

response = client.item_search { ... }
response.errors.size           # => 2
error = response.errors.first  # => #<A2z::Responses::Error ...>
error.code                     # => "Some Amazon Code"
error.message                  # => "Some human readable message"

Simple error getting client ...

$ rails c
Loading development environment (Rails 4.1.1)
2.1.2 :001 > config = YAML.load_file(Rails.root.join('config', 'amazon.yml'))
=> {"key"=>"your_key", "secret"=>"your_secret", "tag"=>"your_tag"}
2.1.2 :002 > client = A2z::Client.new(config)
NoMethodError: undefined method `key=' for #A2z::Client:0x00000004fd4068

Why is key= undefined? and yet your build is passing?

VCR interoperability

I couldn't get this to work with VCR. Just thought I'd post on what happened.

a2z requires Jeff. jeff-0.5.0 depends on [excon (~> 0.18.0)]

If I wire up VCR with excon then it complains:
You are using Excon 0.18.5. VCR is known to work with Excon >= 0.9.6, < 0.17. It may not work with this version.

So there's an impasse here. I have to have 0.18.0+ but I can't have 0.18.0+ ๐Ÿ™Š

Does a2z really need >= 0.18.0?

I understand that this is really an issue with VCR but I thought I'd ask how you'd cache or mock the webservice calls to AWS. Thx mucho.

Weirdly, VCR managed to write something out as I was testing different versions. I got a YAML file with a User-Agent of Jeff and recorded_with: VCR 2.0.0.rc2. So maybe there's a path forward there. I'll play with it some more.

Item is nil. Beginner question, maybe?

I believe I have set it up correctly. I am getting a response that has an 'item' method in it, but the item is always nil when I do a product lookup. I have tried multiple product IDs, and different response groups.

The object I'm interacting with is A2z::Responses::ItemLookup. Is that correct?

Thanks.

Exception received while fetching item from amazon

Exception details are below:

NoMethodError: undefined method []' for nil:NilClass from ~/.rvm/gems/ruby-1.9.3-p286/gems/a2z-0.1.1/lib/a2z/responses/offer_summary.rb:51:inblock in from_response'

      if data['LowestNewPrice']
        offer_summary.lowest_new_price = Money.new(data['LowestNewPrice']['Amount'].to_i, data['LowestNewPrice']['CurrencyCode'])
      end

      if data['LowestUsedPrice']
        offer_summary.lowest_used_price = Money.new(data['LowestNewPrice']['Amount'].to_i, data['LowestNewPrice']['CurrencyCode'])
      end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.