MicroPoll API

API's available with MicroPoll

The following Method Calls are available: -
micropoll.getVoteCount
Returns the Poll Stats for the Poll
Parameters
Name Type Description
Poll ID Long The poll id
API Key String The Secret API key of the Poll Owner.
Return
Type Description
String
  • The Individual and Total vote counts for that Poll .
Data Returned By JSON
Options Get JSON Data
Id - The poll id
  • response.micropoll.id
Title - The poll title
  • response.micropoll.title
Votes Per Option - The individual option votes
  • response.micropoll.votePerOption[0].Option1Votes
  • - Votes for 1st option.
  • response.micropoll.votePerOption[1].Option2Votes
  • - Votes for 2nd option.
Vote Count - The total votes of poll
  • response.micropoll.voteCount


micropoll.getPolls
Returns all the active polls for the account.
Parameters
Name Type Description
API Key String The Secret API key of the Poll Owner.
Return
Type Description
String[](Array)
  • The Polls for the account.
Data Returned By JSON
Options Get JSON Data
Id - The poll id
  • response.micropolls[0].id
  • - Id of the first poll.
  • response.micropolls[1].id
  • - Id of the second poll.
Title - The poll title
  • response.micropolls[0].title
  • - Title of the first poll.
  • response.micropolls[1].title
  • - Title of the second poll.
Result Url - The result url of the poll
  • response.micropolls[0].resultUrl
  • response.micropolls[1].resultUrl
Answers - The answer options of the poll.
  • response.micropolls[0].answers[0].answerText
  • - First answer option of first poll.
  • response.micropolls[0].answers[1].answerText
  • - Second answer option of first poll.
  • response.micropolls[1].answers[0].answerText
  • - First answer option of second poll.
  • response.micropolls[1].answers[1].answerText
  • - Second answer option of second poll.
Votes Per Option - The individual option votes
  • response.micropolls[0].votePerOption[0].Option1Votes
  • - Votes for 1st option of 1st Poll.
  • response.micropolls[0].votePerOption[1].Option2Votes
  • - Votes for 2nd option of 1st Poll.
  • response.micropolls[1].votePerOption[0].Option1Votes
  • - Votes for 1st option of 2nd Poll.
  • response.micropolls[1].votePerOption[1].Option2Votes
  • - Votes for 2nd option of 2nd Poll.
Vote Count - The total votes of poll
  • response.micropolls[0].voteCount
  • - Total Votes for the 1st Poll.
  • response.micropolls[1].voteCount
  • - Total Votes for the 2nd Poll.
Embed code - The embedded code of the poll.
  • response.micropolls[0].embedCode
  • - Embedded code of first poll.
  • response.micropolls[1].embedCode
  • - Embedded code of second poll.


micropoll.getAllVoteCounts
Returns all the vote data for all active polls.
Parameters
Name Type Description
API Key String The Secret API key of the Poll Owner.
Return
Type Description
String[](Array)
  • All the vote data of all active polls of account.
Data Returned By JSON
Options Get JSON Data
Id - The poll id
  • response.micropollsResults[0].id
  • - Id of the first poll.
  • response.micropollsResults[1].id
  • - Id of the second poll.
Title - The poll title
  • response.micropollsResults[0].title
  • - Title of the first poll.
  • response.micropollsResults[1].title
  • - Title of the second poll.
Votes Per Option - The individual option votes
  • response.micropollsResults[0].votePerOption[0].Option1Votes
  • - Votes for 1st option of 1st Poll.
  • response.micropollsResults[0].votePerOption[1].Option2Votes
  • - Votes for 2nd option of 1st Poll.
  • response.micropollsResults[1].votePerOption[0].Option1Votes
  • - Votes for 1st option of 2nd Poll.
  • response.micropollsResults[1].votePerOption[1].Option2Votes
  • - Votes for 2nd option of 2nd Poll.
Vote Count - The total votes of poll
  • response.micropollsResults[0].voteCount
  • - Total Votes for the 1st Poll.
  • response.micropollsResults[1].voteCount
  • - Total Votes for the 2nd Poll.


micropoll.getPollResultsUrl
Returns the results URL of the Poll id.
Parameters
Name Type Description
API Key String The Secret API key of the Poll Owner.
Poll ID Long The id of the poll.
Return
Type Description
String
  • The results URL of the poll id.
Data Returned By JSON
Options Get JSON Data
Id - The poll id
  • response.micropoll.id
Title - The poll title
  • response.micropoll.title
Result url - The result url of poll
  • response.micropoll.resultUrl


micropoll.getPollEmbedHtml
Returns the embedded poll script of the poll id.
Parameters
Name Type Description
API Key String The Secret API key of the Poll Owner.
Poll ID Long The id of the poll.
Return
Type Description
String
  • The Embed code of the poll id.
Data Returned By JSON
Options Get JSON Data
Id - The poll id
  • response.micropoll.id
Title - The poll title
  • response.micropoll.title
Result url - The result url of poll
  • response.micropoll.embedCode


micropoll.vote
Returns the Poll Stats for the Poll
Parameters
Name Type Description
Poll ID Long The poll id
Option Number int The option number of the poll answers on which to vote (1st answer option is 1, 2nd answer option is 2 and so on...). If 1 is passed in option number the vote will be recorded for 1st option in your poll.
API Key String The Secret API key of the Poll Owner.
Return
Type Description
String
  • Will vote for the selected option number and return the Individual and Total vote counts for that Poll .
Data Returned By JSON
Options Get JSON Data
Id - The poll id
  • response.micropoll.id
Title - The poll title
  • response.micropoll.title
Votes Per Option - The individual option votes
  • response.micropoll.votePerOption[0].Option1Votes
  • - Votes for 1st option.
  • response.micropoll.votePerOption[1].Option2Votes
  • - Votes for 2nd option.
Vote Count - The total votes of poll
  • response.micropoll.voteCount