Giter Club home page Giter Club logo

yboss's People

Contributors

davidjlee avatar elcamino avatar mike-north avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yboss's Issues

I get a 403 forbidden with example

Not sure if yahoo has changed or there's a code issue, but I literally copied and pasted your sample code with my key and secret, I get a 403 forbidden. Thanks for any help.

503 Service Unavailable

Hi,

I'm pretty sure I'm doing everything right (your gem is pretty intuitive!) but I'm getting this error for every request using your sample code from the documentation:

503 Service Unavailable (YBoss::FetchError)

The offending code:

require 'yboss'

YBoss::Config.instance.oauth_key = '....'
YBoss::Config.instance.oauth_secret = '....'

res = YBoss.web('q' => 'tuscany')

Any ideas?

Thanks,
Martin

raise on non-200?

The response object has a #responsecode, implying that you might find a code other than 200 there.

But if the API returns a 5xx (say, because I didn't give it the right secret key), I don't get back a response with a 5xx responsecode... I get an exception raised.

Would it make more sense to make this not raise but return a non-200 response code? Or to make it a call option? Or to at least document in what cases one should expect an exception (of what class) to be raised?

auth routine does not work properly on query with an apostrophe

1.9.3-p194 :006 > YBoss.spelling('q' => 'gruffaloe')                            
    => #<YBoss::Spelling::Result:0x0000000b6abdb8 @responsecode="200", @start="0", @count="1", @totalresults="1", @items=[#<YBoss::Result::Base::Item:0x0000000b6b7028 @data={"suggestion"=>"gruffalo"}>]>

1.9.3-p194 :007 > YBoss.spelling('q' => "women's rights")                       

# YBoss::FetchError: Got error while fetching http://yboss.yahooapis.com/ysearch/spelling?format=json&q=women's%20rights?format=json&oauth_consumer_key=dj0yJmk9YWJuYVZlOHZ1YTBKJmQ9WVdrOVEwdHRUVzlXTkdzbWNHbzlOamcyTWpVNE1qWXkmcz1jb25zdW1lcnNlY3JldCZ4PTU2&oauth_nonce=93ab3ec716&oauth_signature=8CrcKi1CuPeDRMAvhVK7bdxs1x0%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1362501074&oauth_version=1.0&q=women's%20rights: 401 Authorization Required
        from /home/rochkind/.rvm/gems/ruby-1.9.3-p194/gems/yboss-0.2.0/lib/yboss/base.rb:62:in `block in fetch'
        from /home/rochkind/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:745:in `start'
        from /home/rochkind/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:557:in `start'
        from /home/rochkind/.rvm/gems/ruby-1.9.3-p194/gems/yboss-0.2.0/lib/yboss/base.rb:58:in `fetch'
        from /home/rochkind/.rvm/gems/ruby-1.9.3-p194/gems/yboss-0.2.0/lib/yboss/base.rb:27:in `call'
        from /home/rochkind/.rvm/gems/ruby-1.9.3-p194/gems/yboss-0.2.0/lib/yboss.rb:13:in `method_missing'
        from (irb):7
        from /home/rochkind/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'

Zlib::BufError

I am getting the following error when i try to execute this code.
Zlib::BufError in JsonOutPutController#yahoo
This is my code.
YBoss::Config.instance.oauth_key = 'my_auth_key'
YBoss::Config.instance.oauth_secret = 'my_auth_secret'
res = YBoss.related('q' => 'gruffalo').

I am using Ruby 2 and Rails 4.
Thank you.

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.