Forum: Ruby on Rails How to add body parameter in Serel gem (stackoverflow api)

Posted by prateek papriwal (Guest)
on 2013-02-10 07:00
(Received via mailing list)
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/que....
According to this, we need to turn the body parameter true.

How to turn the parameter "body" true.
Posted by prateek papriwal (Guest)
on 2013-02-10 07:02
(Received via mailing list)
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)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.