surveyTemplateGetList
public static string surveyTemplateGetList(string token)
Create a new Survey using existing survey Template. Return the ID of the newly created Survey.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string templateID | ID of the existing Template |
| string surveyName | Name which you want to give to the newly created survey |
| Returns |
| string | The array containing the survey details.
| string id | Template id | | string name | Name of the Template | | string image | Image of the Template | | string description | Description of the Survey Template | | string quesCount | Number of questions available for the Template |
|
- <?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);
-
- $surveyTemplateLists = $client->surveyTemplateGetList($token);
- foreach($surveyTemplateLists as $rec) {
- echo $rec['sequence'] . "] Survey Template Name: " . $rec['name'] . "(" . $rec['id'] . ")";
- echo "\t Number of Questions:" . $rec['quesCount'] . "(" . $rec['image'] . ")";");
- echo "
";
- }
- ?>