GET /api/polls/:poll_id

get information about a poll with poll_id

GET /api/messages/:message_id/poll

get information about a poll with message_id

Success Response Code: 200

Params

Param name Description
poll_id
optional

id of the poll


Value: Must be a Integer
message_id
optional

id of the messsage


Value: Must be a Integer

Response Fields

poll[id] unique ID for the poll Integer
poll[question] question poll is asking String
poll[social_object_id] social object associated with this poll Integer
poll[my_response_id] if requesting user has answered the poll, id of their response Integer
poll[answers] potential answers to this poll Array<PollAnswer>
answer[id] answer's ID Integer
answer[text] text to display with the answer String
answer[response_count] number of votes so far this answer Integer

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/polls/1.json"
curl -X GET -v --basic -u "emily@socialcast.com:demo" "https://demo.socialcast.com/api/messages/431/poll.json"

Examples

GET 
200
{
  "poll": {
    "id": 1,
    "question": "whø & what am I? 1",
    "answers": [
      {
        "id": 1,
        "text": "høme & away 1",
        "response_count": 0
      }
    ],
    "social_object_id": 39,
    "my_response_id": null
  }
}