prateek papriwal
2013-Feb-10 05:59 UTC
How to add body parameter in Serel gem (stackoverflow api)
Actually when i try to access a question using serel gem(which is a ruby wrapper for stackoverflow api), i get an object with no body parameter included in it. questions = Serel::Question.find(id) see http://api.stackoverflow.com/1.1/usage/methods/questions-by-ids. According to this, we need to turn the body parameter true. How to turn the parameter "body" true. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/KbAwL7zNfJoJ. For more options, visit https://groups.google.com/groups/opt_out.
prateek papriwal
2013-Feb-10 06:01 UTC
Re: How to add body parameter in Serel gem (stackoverflow api)
Also on doing questions = Serel::Question.find(id).body.get error is returned(body is nil class) 1.9.3p194 :003 > ques = Serel::Question.find(14779466).body.get [INFO][2013-02-10 10:58:30] Making request to /2.0/questions/14779466?site=stackoverflow&key=Sd9owvzqRd%29VnsNfrCAJwA%28%28 NoMethodError: undefined method get'' for nil:NilClass from (irb):3 from /home/papri/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in <main>'' 1.9.3p194 :004 > ques = Serel::Question.find(14779466) On Sunday, 10 February 2013 11:29:11 UTC+5:30, prateek papriwal wrote:> > Actually when i try to access a question using serel gem(which is a ruby > wrapper for stackoverflow api), i get an object with no body parameter > included in it. > > questions = Serel::Question.find(id) > > see http://api.stackoverflow.com/1.1/usage/methods/questions-by-ids. > According to this, we need to turn the body parameter true. > > How to turn the parameter "body" true. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/lPtjnayfE-IJ. For more options, visit https://groups.google.com/groups/opt_out.
Possibly Parallel Threads
- StackOverflow Question: Need help with my Rspec Request Spec!
- What's wrong with my spec? (StackOverflow Question)
- Looking for Help/Advice on StackOverflow Question - Polymorphic Association with STI
- Please ask R questions on StackOverflow.com
- [Bug 18061] New: stackoverflow.com podcast player not working