Back to Documentation Overview
campaignFolders
public static campaignFolders(string apikey)
List all the folders for a user account
- Section:
- Campaign Related
- Parameters:
- apikey a valid API Key for your user account. Get by calling login()
- Returns:
- array - Array of folder structs (see Returned Fields for details)
- Returned Fields:
integer folder_id Folder Id for the given folder, this can be used in the campaigns() function to filter on. string name Name of the given folder - <?php
- /**
- This Example shows how to pull a list of your Campaign Folders via the MCAPI class.
- **/
- require_once 'inc/MCAPI.class.php';
- require_once 'inc/config.inc.php'; //contains apikey
- $retval = $api->campaignFolders();
- if ($api->errorCode){
- } else {
- } else {
- foreach($retval as $folder){
- }
- }
- }
- <?php
- /**
- This Example shows how to get the list of Campaign Folders you have setup on
- your account using XML-RPC.
- Note that we are using the PEAR XML-RPC2 client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.inc.php';
- try {
- $result = $client->campaignFolders($apikey);
- foreach($result as $folder){
- }
- } catch (XML_RPC2_FaultException $e){
- }
Examples (2)
download example code[1] mcapi_campaignFolders.php
[2] xml-rpc_campaignFolders.php
|
Add New Note
User Contributed Notes for
campaignFolders |
|---|
| No notes, yet... Will you be the first?? |