pollGetList
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.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string filter | The filter you want to apply when fetching the poll |
| string status | The status of the poll |
| int pageNumber | The page number from which you want the list. |
| int pageSize | The number of results per page |
| string orderBy | The field you want to order by (list / date) |
| string sortOrder | The status of the poll |
| Returns |
| array | Returns an array with the results. |
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
- $PollLists = $client->pollGetList($token, "", "", 1, 100, "", "");
-
- foreach($PollLists as $rec) {
- echo $rec['sequence'] . "] Poll Name: " . $rec['name'] . "(" . $rec['id'] . ")";
- echo "\t Question of the Poll:" . $rec['question'] . "(" . $rec['question'] . ")";
- echo "\t Poll Live Date:" . $rec['livedate'] ;
- echo "\t No of Questions:" . $rec['questions'] ;
- echo "\t Status:" . $rec['status'] ;
- echo "\t Created Date: " . $rec['createdDate'] ;
- echo "\t Updated Date: " . $rec['modifiedDate'];
- echo "<br />";
- }
-
- ?>