googl_LinksExpand: Expand a short URL to a longer one

Description Usage Arguments Value Quotas Note See Also Examples

View source: R/googl_links.R

Description

For the given short URL, the url.get method returns the corresponding long URL and the status.

Usage

1
2
googl_LinksExpand(shortUrl = "", projection = "FULL",
  showRequestURL = FALSE)

Arguments

shortUrl

- The short URL, including the protocol.

projection

- "FULL" - returns the creation timestamp and all available analytics (default) OR "ANALYTICS_CLICKS" - returns only click counts OR "ANALYTICS_TOP_STRINGS" - returns only top string counts (e.g. referrers, countries, etc)

showRequestURL

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

Value

id - is the short URL you passed in.

longUrl - is the long URL to which it expands. Note that longUrl may not be present in the response, for example, if status is "REMOVED".

status - is "OK" for most URLs. If Google believes that the URL is fishy, status may be something else, such as "MALWARE".

Quotas

By default, your registered project gets 1,000,000 requests per day for the URL Shortener API (https://console.developers.google.com/)

Note

Returns a dataframe of expanded short URL and a list of its analytics.

See Also

See https://developers.google.com/url-shortener/v1/getting_started#shorten

See https://developers.google.com/url-shortener/v1/url/get

Examples

1
2
3
4
5
6
## Not run: 
googl_token <- googl_auth(key = "", secret = "")
g1 <- googl_LinksExpand(shortUrl = "http://goo.gl/vM0w4",showRequestURL = TRUE)
g4 <- googl_LinksExpand(shortUrl="http://goo.gl/vM0w4",projection = "ANALYTICS_TOP_STRINGS")

## End(Not run)

urlshorteneR documentation built on May 29, 2017, 3:48 p.m.