-
Notifications
You must be signed in to change notification settings - Fork 34
questions show
vitorbaptista edited this page Aug 27, 2012
·
2 revisions
Description: Get question object
Format: XML
URL: GET /questions/7.xml?with_visitor_stats=true
Parameters:
- visitor_identifier: optional, string: Identifier of voter
- with_prompt: optional, bool: Returned question has attr “:picked_prompt” to result, thi is the id of the next prompt to display as chosen by the specified algorithm$
- with_appearance: optional, bool: Return question with extra attr “:appearance_id”, specifies appearance id of selected next prompt
- with_visitor_stats: optional, bool: Add integer fields “:visitor_votes” and “:visitor_ideas”, which specify statistics about selected question
- algorithm: optional, string = “catchup” : Select which algorithm to use for picking next prompt
- version: optional, string = “all”: Adds all versions of the question inside versions array
Returns:
Question object with optional extra fields.
<?xml version="1.0" encoding="UTF-8"?>
<question>
<active type="boolean">false</active>
<active-items-count type="integer">0</active-items-count>
<bloom nil="true"></bloom>
<choices-count type="integer">5</choices-count>
<created-at type="datetime">2010-07-01T23:48:00+00:00</created-at>
<creator-id type="integer">4</creator-id>
<first-prompt-algorithm-id type="integer" nil="true"></first-prompt-algorithm-id>
<id type="integer">7</id>
<inactive-choices-count type="integer">2</inactive-choices-count>
<information nil="true"></information>
<it-should-autoactivate-ideas type="boolean">false</it-should-autoactivate-ideas>
<items-count type="integer">0</items-count>
<local-identifier>1</local-identifier>
<name>test1</name>
<prompts-count type="integer">6</prompts-count>
<site-id type="integer">1</site-id>
<tracking nil="true"></tracking>
<updated-at type="datetime">2010-07-02T17:29:18+00:00</updated-at>
<uses-catchup type="boolean">true</uses-catchup>
<votes-count type="integer">10</votes-count>
<item-count type="integer">5</item-count>
<visitor_votes>0</visitor_votes>
<visitor_ideas>8</visitor_ideas>
</question>
Notes:
- :with_appearance is ignored if :with_prompt is not set
- currently fails silently if :with_prompt provied and either :with_appearance or :visitor_identifier are not present