« Back to Documentation Overview

listInterestGroupDel – v1.1

 listInterestGroupDel(string apikey, string id, string group_name, mixed grouping_id, int optional)

Delete a single Interest Group - if the last group for a list is deleted, this will also turn groups for the list off.

Section
List Related
xml-rpc_listInterestGroupDel.php
Parameters
apikey a valid API Key for your user account. Get by visiting your API dashboard
id the list id to connect to. Get by calling lists()
group_name the interest group to delete
optional $grouping_id The grouping to delete the group from - get using listInterestGrouping() . If not supplied, the first grouping on the list is used.
Returns
bool true if the request succeeds, otherwise an error will be thrown

Examples (1)

download example code

[1] xml-rpc_listInterestGroupDel.php

  1. <?php
  2. /**
  3. This Example shows how to delete an Interest Group from one of your lists.
  4. using XML-RPC.
  5. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  6. **/
  7. require_once 'XML/RPC2/Client.php';
  8. require_once 'inc/config.inc.php';
  9. try {
  10. $client = XML_RPC2_Client::create($apiUrl);
  11.  
  12. $result = $client->listInterestGroupDel($apikey, $listId, 'A test');
  13. echo "SUCCESS! \n";
  14. echo "Result returned: ".$result."\n";
  15. } catch (XML_RPC2_FaultException $e){
  16. echo "ERROR!!!!\n";
  17. echo $e->getFaultCode()." : ".$e->getFaultString()."\n";
  18. }
  19.