Skip to content

Questions Calls

Rashmi Yadav edited this page Oct 31, 2013 · 1 revision

####To call /questions

RubyStackoverflow.questions(options = {})

Example

response = RubyStackoverflow.questions({order: 'asc'})
response.data
#=> [#<RubyStackoverflow::Client::Question:0x007fa41b162558 @answers=[], @question_id=19599495, @last_edit_date="2013-10-25 21:18:33 UTC",..]

####To call /questions/{ids} (questions identified in {ids})

RubyStackoverflow.questions_by_ids([ids], options = {})

Example

response = RubyStackoverflow.questions_by_ids(['19294359'], {order: 'asc'})
response.data
#=> [#<RubyStackoverflow::Client::Question:0x007fa41b162558 @answers=[], @question_id=19294359, @last_edit_date="2013-10-25 21:18:33 UTC",..]

####To call /questions/{ids}/answers (answers to a set of questions identified in id)

RubyStackoverflow.answers_of_questions([ids], options = {})

Example

response = RubyStackoverflow.answers_of_questions(['19294359'], {order: 'asc'})
response.data
#=> [#<RubyStackoverflow::Client::Answer:0x007fd5038b81e0 @answer_id=19405900, @creation_date="2013-10-16 14:18:59 UTC",..]

####To call /questions/{ids}/comments (comments on a set of questions identified in id)

RubyStackoverflow.comments_of_questions([ids], options = {})

Example

response = RubyStackoverflow.comments_of_questions(['13804832'], {order: 'asc'})
response.data
#=> [#<RubyStackoverflow::Client::Comment:0x007ff81aa987c8 @comment_id=18990742, @creation_date="2012-12-10 16:29:09 UTC", @score=1,..]

####To call /questions/{ids}/linked (questions which link to those questions identified in {ids})

RubyStackoverflow.linked_questions([ids], options = {})

Example

response = RubyStackoverflow.linked_questions(['13804832'], {order: 'asc'})
response.data
#=> [#<RubyStackoverflow::Client::Question:0x007fa41b162558 @answers=[], @question_id=19293359, @last_edit_date="2013-10-25 21:18:33 UTC",...]

####To call /questions/{ids}/related (questions that the site considers related to those identified in {ids})

RubyStackoverflow.related_questions([ids], options = {})

Example

response = RubyStackoverflow.related_questions(['13804832'], {order: 'asc'})
response.data
#=> [#<RubyStackoverflow::Client::Question:0x007fdb09163c08 @answers=[], @comments=[], @question_id=17479135, @last_edit_date="2013-07-07 19:52:59 UTC",...]

####To call /questions/{ids}/timeline (Returns a subset of the events that have happened to the questions identified in id)

RubyStackoverflow.timeline_of_questions([ids], options = {})

Example

response = RubyStackoverflow.timeline_of_questions(['13804832','16067043'], {order: 'asc'})
response.data.first.posts
#=> [#<RubyStackoverflow::Client::Post:0x007fe9029d85a8 @timeline_type="comment", @post_id=16176338, @comment_id=23206076,...]

####To call questions/featured (questions with active bounties in the system)

RubyStackoverflow.featured_questions(options = {})

Example

response = RubyStackoverflow.featured_questions({page: 1,pagesize: 1})
response.data
#=> [#<RubyStackoverflow::Client::Question:0x007fdb09163c08 @answers=[], @comments=[], @question_id=19507639, @last_edit_date="2013-07-07 19:52:59 UTC",...]

####To call questions/unanswered (questions the site considers to be unanswered)

RubyStackoverflow.unanswered_questions(options = {})

Example

response = RubyStackoverflow.unanswered_questions({page: 1,pagesize: 1})
response.data
#=> [#<RubyStackoverflow::Client::Question:0x007fdb09163c08 @answers=[], @comments=[], @question_id=19507639, @last_edit_date="2013-07-07 19:52:59 UTC",...]

####To call questions/no-answers (questions which have received no answers)

RubyStackoverflow.noanswered_questions(options = {})

Example

response = RubyStackoverflow.noanswered_questions({page: 1,pagesize: 1})
response.data
#=> [#<RubyStackoverflow::Client::Question:0x007fdb09163c08 @answers=[], @comments=[], @question_id=19507639, @last_edit_date="2013-07-07 19:52:59 UTC",...]
Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy