You are here

function MCAPI::campaignShareReport in Mailchimp 7

Same name and namespace in other branches
  1. 6.2 MCAPI.class.php \MCAPI::campaignShareReport()

Get the URL to a customized VIP Report for the specified campaign and optionally send an email to someone with links to it. Note subsequent calls will overwrite anything already set for the same campign (eg, the password)

Related

@returnf string title The Title of the Campaign being shared @returnf string url The URL to the shared report @returnf string secure_url The URL to the shared report, including the password (good for loading in an IFRAME). For non-secure reports, this will not be returned @returnf string password If secured, the password for the report, otherwise this field will not be returned

Parameters

string $cid the campaign id to share a report for (can be gathered using campaigns()):

array $opts optional various parameters which can be used to configure the shared report: string header_type optional - "text" or "image', defaults to "text' string header_data optional - if "header_type" is text, the text to display. if "header_type" is "image" a valid URL to an image file. Note that images will be resized to be no more than 500x150. Defaults to the Accounts Company Name. bool secure optional - whether to require a password for the shared report. defaults to "true" string password optional - if secure is true and a password is not included, we will generate one. It is always returned. string to_email optional - optional, email address to share the report with - no value means an email will not be sent array theme optional - an array containing either 3 or 6 character color code values for: "bg_color", "header_color", "current_tab", "current_tab_text", "normal_tab", "normal_tab_text", "hover_tab", "hover_tab_text" string css_url optional - a link to an external CSS file to be included after our default CSS (http://vip-reports.net/css/vip.css) <strong>only if</strong> loaded in an IFRAME - max 255 characters

Return value

struct Struct containing details for the shared report

File

./MCAPI.class.php, line 737

Class

MCAPI

Code

function campaignShareReport($cid, $opts = array()) {
  $params = array();
  $params["cid"] = $cid;
  $params["opts"] = $opts;
  return $this
    ->callServer("campaignShareReport", $params);
}