surveyGetList
public static array surveyGetList(string token,string filter,string status,int pagenumber,int pagesize,string orderBy,string sortOrder)
Get the list of Surveys using the filter and paging limits, order by the name or date of the surveys.
Section
Survey Related Methods

Parameters
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 survey
string statusThe status of the survey
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 survey

Returns
arrayReturns an array with the results.


Examples
download example code
xmlrpc_surveyGetList.php


  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. $SurveyLists = $client->surveyGetList($token, "", "", 1, 100, "", "");
  11.  
  12. foreach($SurveyLists as $rec) {
  13.     echo $rec['sequence'] . "] Survey Name: " . $rec['name'] . "(" . $rec['id'] . ")";
  14.     echo "\t Url For accessing(previewing) the Survey:" . $rec['url'] . "(" . $rec['url'] . ")";
  15.     echo "\t No of Questions:" . $rec['questions'] ;
  16.     echo "\t Survey Live Date:" . $rec['livedate'] ;
  17.     echo "\t Post-Back Url:" . $rec['successurl'] ;
  18.     echo "\t Intro Msg:" . $rec['intro'] ;
  19.     echo "\t Status:" . $rec['status'] ;
  20.     echo "\t Created Date: " . $rec['createdDate'] ;
  21.     echo "\t Updated Date: " . $rec['modifiedDate'];
  22.     echo "<br />";
  23. }
  24.  
  25. ?>