public static array pollGetList(string token,string filter,string status,int pagenumber,int pagesize,string orderBy,string sortOrder)
Get the list of Polls using the filter and paging limits, order by the name or date of the polls.
Poll Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
string filterThe filter you want to apply when fetching the poll
string statusThe status of the poll
int pageNumberThe page number from which you want the list.
int pageSizeThe number of results per page
string orderByThe field you want to order by (list / date)
string sortOrderThe status of the poll

arrayReturns an array with the results.

Return Structure
integer sequenceThe sequence number of the record
string idThe ID of the Poll.
string questionQuestion of the poll
string urlUrl for getting the Poll.
string statusStatus of the poll
string createdDateThe date on which the poll was created
string modifiedDateThe date on which the poll was last updated
string responsesNumber of responses untill now recorded
string answer1Answer 1 of the question
string answer1CountNo. of responses for answer1
string answer2Answer 2 of the question
string answer2CountNo. of responses for answer2
string answer3Answer 3 of the question
string answer3CountNo. of responses for answer3
string answer4Answer 4 of the question
string answer4CountNo. of responses for answer4
string answer5Answer 5 of the question
string answer5CountNo. of responses for answer5
string borderbgBackground Color of Border
string answercolorAnswer font color
string answerfontAnswer font family
string formbgBackground color of the Form
string questioncolorQuestion font color
string questionfontfont family of the question
string buttontextText which will appear at the button of the poll

download example code

  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10. $PollLists = $client->pollGetList($token, "", "", 1, 100, "", "");
  12. foreach($PollLists as $rec) {
  13.     echo $rec['sequence'] . "] Poll Name: " . $rec['name'] . "(" . $rec['id'] . ")";
  14.     echo "\t Question of the Poll:" . $rec['question'] . "(" . $rec['question'] . ")";
  15.     echo "\t Poll Live Date:" . $rec['livedate'] ;
  16.     echo "\t No of Questions:" . $rec['questions'] ;
  17.     echo "\t Status:" . $rec['status'] ;
  18.     echo "\t Created Date: " . $rec['createdDate'] ;
  19.     echo "\t Updated Date: " . $rec['modifiedDate'];
  20.     echo "<br />";
  21. }
  23. ?>