Class: Mandrill::Urls
- Inherits:
-
Object
- Object
- Mandrill::Urls
- Defined in:
- lib/mandrill/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#add_tracking_domain(domain) ⇒ Hash
Add a tracking domain to your account.
-
#check_tracking_domain(domain) ⇒ Hash
Checks the CNAME settings for a tracking domain.
-
#initialize(master) ⇒ Urls
constructor
A new instance of Urls.
-
#list ⇒ Array
Get the 100 most clicked URLs.
-
#search(q) ⇒ Array
Return the 100 most clicked URLs that match the search query given.
-
#time_series(url) ⇒ Array
Return the recent history (hourly stats for the last 30 days) for a url.
-
#tracking_domains ⇒ Array
Get the list of tracking domains set up for this account.
Constructor Details
#initialize(master) ⇒ Urls
Returns a new instance of Urls.
1603 1604 1605 |
# File 'lib/mandrill/api.rb', line 1603 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
1601 1602 1603 |
# File 'lib/mandrill/api.rb', line 1601 def master @master end |
Instance Method Details
#add_tracking_domain(domain) ⇒ Hash
Add a tracking domain to your account
1672 1673 1674 1675 |
# File 'lib/mandrill/api.rb', line 1672 def add_tracking_domain(domain) _params = {:domain => domain} return @master.call 'urls/add-tracking-domain', _params end |
#check_tracking_domain(domain) ⇒ Hash
Checks the CNAME settings for a tracking domain. The domain must have been added already with the add-tracking-domain call
1688 1689 1690 1691 |
# File 'lib/mandrill/api.rb', line 1688 def check_tracking_domain(domain) _params = {:domain => domain} return @master.call 'urls/check-tracking-domain', _params end |
#list ⇒ Array
Get the 100 most clicked URLs
1614 1615 1616 1617 |
# File 'lib/mandrill/api.rb', line 1614 def list() _params = {} return @master.call 'urls/list', _params end |
#search(q) ⇒ Array
Return the 100 most clicked URLs that match the search query given
1627 1628 1629 1630 |
# File 'lib/mandrill/api.rb', line 1627 def search(q) _params = {:q => q} return @master.call 'urls/search', _params end |
#time_series(url) ⇒ Array
Return the recent history (hourly stats for the last 30 days) for a url
1640 1641 1642 1643 |
# File 'lib/mandrill/api.rb', line 1640 def time_series(url) _params = {:url => url} return @master.call 'urls/time-series', _params end |
#tracking_domains ⇒ Array
Get the list of tracking domains set up for this account
1656 1657 1658 1659 |
# File 'lib/mandrill/api.rb', line 1656 def tracking_domains() _params = {} return @master.call 'urls/tracking-domains', _params end |