QuimbleApi : GetAPoll

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Get a poll as XML on Quimble


Endpoint is: quimble.com/api/get/$id (where $id is the id number of the poll you want)

Simply send an http request with the following headers:

GET /api/get/$id HTTP/1.1
 Host: quimble.com
 Connection: Close
 Content-Type: application/xml
 Accept: application/xml
 Authorization: Basic $base64_encode_of_(username:password)


Notice the "Accept: application/xml" - that's important.

You will get a response like this:

<?xml version="1.0" encoding="UTF-8"?>
<poll>
  <options>
    <option>
      <name>Yes</name>
      <created-on type="datetime">2005-12-21T08:05:10-05:00</created-on>
      <votes-count type="integer">1</votes-count>
      <id type="integer">1262</id>
      <user-id type="integer">215</user-id>
      <poll-id type="integer">306</poll-id>
    </option>
    <option>
      <name>No</name>
      <created-on type="datetime">2005-12-21T08:05:10-05:00</created-on>
      <votes-count type="integer">0</votes-count>
      <id type="integer">1263</id>
      <user-id type="integer">215</user-id>
      <poll-id type="integer">306</poll-id>
    </option>
  </options>
  <created-on type="datetime">2005-12-21T08:05:10-05:00</created-on>
  <updated-at type="datetime">2005-12-21T08:10:06-05:00</updated-at>
  <votes-count type="integer">1</votes-count>
  <created-by type="integer">215</created-by>
  <id type="integer">306</id>
  <question>Does this work</question>
  <description>We are only testing</description>
  <is-public type="integer">1</is-public>
  <comments-count type="integer">0</comments-count>
  <allow-options type="integer">0</allow-options>
</poll>


or this:

<hash>
  <error type="integer">1</error>
</hash>


A little weirdness: The "is-public" boolean (0/1 - not an integer) is actually reversed. A value of "1" for is-public actually means it's a private poll. Polls created through the API default to private (not shown or searchable on Quimble itself).

There are 282 comments on this page. [Display comments]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.1
Page was generated in 2.0478 seconds