ProZ.com global directory of translation services
The translation workplace
Ideas

GET: /quickpolls/:id/results

Get a summary of responses to a quick poll.

Parameters

  • id: The quick poll ID.

Example request

curl -H "Authorization: Bearer {OAUTH2_ACCESS_TOKEN}" https://api.proz.com/v2/quickpolls/12345/results

Response

A JSON object with the following properties:

  • results: The requested quick poll results.
  • quickpoll_user: A quick poll user data object with information about the authenticated user's relationship to the quick poll (ex. their response if any, whether they are allowed to respond, etc).
{
  "results":  {
    "self_link": "https://api.proz.com/v2/quickpolls/12345/results",
    "quickpoll": "https://api.proz.com/v2/quickpolls/12345",
    "discussion_web_url": "http://www.proz.com/topic/280642",
    "question": "Do you have liability insurance?",
    "num_responses": 1185,
    "response_summary": [
      {
        "value": 1,
        "text": "Yes",
        "votes": 706
      },
      {
        "value": 2,
        "text": "No, but I am planning to",
        "votes": 50
      },
      {
        "value": 3,
        "text": "No",
        "votes": 244
      },
      {
        "value": 4,
        "text": "N/A",
        "votes": 185
      }
    ]
  },
  "quickpoll_user":  {
    "quickpoll": "https://api.proz.com/v2/quickpolls/12345",
    "user": "https://api.proz.com/v2/users/32a9a4d0-cb6e-463f-a0ab-63d0a0418bc7",
    "can_respond": true,
    "cant_respond_reason": null,
    "user_response": {
      "id": 45678,
      "quickpoll": "https://api.proz.com/v2/quickpolls/12345",
      "user": "https://api.proz.com/v2/users/32a9a4d0-cb6e-463f-a0ab-63d0a0418bc7",
      "created_at": "2015-04-19T12:59:23+00:00",
      "option_value": 3
    }
  }
}