pollUpdate
public static string pollUpdate(string token,string PollID PollStructure pollData)
Update an existing Poll based on the details provided. Return the ID of the Updated Poll.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| string PollID | The ID of the poll which you want to Update |
| array pollData | The array containing the poll details.
| string name | This will only be seen by you and is used to organize your poll. | | string question | Question for your poll. | | string answer1 | Option1 for the question. | | string answer2 | Option2 for the question. | | string answer3 | Option3 for the question. | | string answer4 | Option4 for the question. | | string answer5 | Option5 for the question. | | integer answercolor | Font Color of your poll answers. | | string answerfont | Font which is used for the appearence of your answers. | | string borderbg | Background color of your Poll's Border | | string buttontext | Text which is to be appeared on the button of your poll | | string formbg | Preffered background color for the form of your poll. |
|
| Returns |
| string | Returns the ID of the Updated Poll. |
- <?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);
-
- $PollID='473';
- $pollDetail['name'] = 'Resturant Poll';
- $pollDetail['question'] = 'Do you eat out regularly';
- $pollDetail['answer1'] = 'Never';
- $pollDetail['answer2'] = 'Once a year';
- $pollDetail['answer3'] = 'Every Month';
- $pollDetail['answer4'] = 'Every Week';
- $pollDetail['answer5'] = 'Daily';
- $pollDetail['answercolor'] = '#0000ff';
- $pollDetail['answerfont'] = 'Comic Sans Ms';
- $pollDetail['borderbg'] = '#777700';
- $pollDetail['buttontext'] = 'Submit';
- $pollDetail['formbg'] = '#FDF000';
- $UpdatedPollID = $client->pollUpdate($token,$PollID,$pollDetail);
- ?>