Learn R Programming

urlshorteneR (version 0.9.2)

bitly_LinksMetricsCountries: Returns metrics about the countries from a link.

Description

Returns metrics about the countries referring click traffic to a single Bitlink.

Usage

bitly_LinksMetricsCountries(link, limit = 1000, unit = c("minute", "hour",
  "day", "week", "month"), units = -1, showRequestURL = FALSE)

Arguments

link

- a Bitlink.

limit

- 1 to 1000 (default=1000).

unit

- minute, hour, day, week or month, default: day; Note: when unit is minute the maximum value for units is 60.

units

- an integer representing the time units to query data for. Pass -1 to return all units of time.

showRequestURL

- show URL which has been build and requested from server. For debug purposes.

Value

clicks - the number of clicks referred from this country.

country - the two-letter code of the referring country.

See Also

http://dev.bitly.com/link_metrics.html#v3_link_countries

Examples

Run this code
# NOT RUN {
bitly_token <- bitly_auth(key = "", secret = "")
bitly_LinksMetricsCountries(link = "http://bit.ly/DPetrov", unit = "day", units = -1, limit = 100)
bitly_LinksMetricsCountries(link = "http://bit.ly/DPetrov", unit = "day", units = -1, limit = 100, 
showRequestURL= TRUE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab