Overview

Namespaces

  • None
  • PHP

Classes

  • Mandrill
  • Mandrill_Exports
  • Mandrill_Inbound
  • Mandrill_Internal
  • Mandrill_Ips
  • Mandrill_Messages
  • Mandrill_Rejects
  • Mandrill_Senders
  • Mandrill_Subaccounts
  • Mandrill_Tags
  • Mandrill_Templates
  • Mandrill_Urls
  • Mandrill_Users
  • Mandrill_Webhooks
  • Mandrill_Whitelists

Exceptions

  • Mandrill_Error
  • Mandrill_HttpError
  • Mandrill_Invalid_DeleteDefaultPool
  • Mandrill_Invalid_DeleteNonEmptyPool
  • Mandrill_Invalid_EmptyDefaultPool
  • Mandrill_Invalid_Key
  • Mandrill_Invalid_Reject
  • Mandrill_Invalid_Tag_Name
  • Mandrill_Invalid_Template
  • Mandrill_IP_ProvisionLimit
  • Mandrill_PaymentRequired
  • Mandrill_ServiceUnavailable
  • Mandrill_Unknown_Export
  • Mandrill_Unknown_InboundDomain
  • Mandrill_Unknown_IP
  • Mandrill_Unknown_Message
  • Mandrill_Unknown_Pool
  • Mandrill_Unknown_Sender
  • Mandrill_Unknown_Subaccount
  • Mandrill_Unknown_Template
  • Mandrill_Unknown_Url
  • Mandrill_Unknown_Webhook
  • Mandrill_ValidationError
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: class Mandrill_Urls {
 4:     public function __construct(Mandrill $master) {
 5:         $this->master = $master;
 6:     }
 7: 
 8:     /**
 9:      * Get the 100 most clicked URLs
10:      * @return array the 100 most clicked URLs and their stats
11:      *     - return[] struct the individual URL stats
12:      *         - url string the URL to be tracked
13:      *         - sent integer the number of emails that contained the URL
14:      *         - clicks integer the number of times the URL has been clicked from a tracked email
15:      *         - unique_clicks integer the number of unique emails that have generated clicks for this URL
16:      */
17:     public function getList() {
18:         $_params = array();
19:         return $this->master->call('urls/list', $_params);
20:     }
21: 
22:     /**
23:      * Return the 100 most clicked URLs that match the search query given
24:      * @param string $q a search query
25:      * @return array the 100 most clicked URLs matching the search query
26:      *     - return[] struct the URL matching the query
27:      *         - url string the URL to be tracked
28:      *         - sent integer the number of emails that contained the URL
29:      *         - clicks integer the number of times the URL has been clicked from a tracked email
30:      *         - unique_clicks integer the number of unique emails that have generated clicks for this URL
31:      */
32:     public function search($q) {
33:         $_params = array("q" => $q);
34:         return $this->master->call('urls/search', $_params);
35:     }
36: 
37:     /**
38:      * Return the recent history (hourly stats for the last 30 days) for a url
39:      * @param string $url an existing URL
40:      * @return array the array of history information
41:      *     - return[] struct the information for a single hour
42:      *         - time string the hour as a UTC date string in YYYY-MM-DD HH:MM:SS format
43:      *         - sent integer the number of emails that were sent with the URL during the hour
44:      *         - clicks integer the number of times the URL was clicked during the hour
45:      *         - unique_clicks integer the number of unique clicks generated for emails sent with this URL during the hour
46:      */
47:     public function timeSeries($url) {
48:         $_params = array("url" => $url);
49:         return $this->master->call('urls/time-series', $_params);
50:     }
51: 
52: }
53: 
54: 
55: 
API documentation generated by ApiGen 2.8.0