blob: bb004fc7d67da48c5fc5605ad1e1793d0e683184 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="urlshortener_v1.html">URL Shortener API</a> . <a href="urlshortener_v1.url.html">url</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#get">get(shortUrl, projection=None)</a></code></p>
<p class="firstline">Expands a short URL or gets creation time and analytics.</p>
<p class="toc_element">
<code><a href="#insert">insert(body)</a></code></p>
<p class="firstline">Creates a new short URL.</p>
<p class="toc_element">
<code><a href="#list">list(start_token=None, projection=None)</a></code></p>
<p class="firstline">Retrieves a list of URLs shortened by a user.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="get">get(shortUrl, projection=None)</code>
<pre>Expands a short URL or gets creation time and analytics.
Args:
shortUrl: string, The short URL, including the protocol. (required)
projection: string, Additional information to return.
Allowed values
ANALYTICS_CLICKS - Returns only click counts.
ANALYTICS_TOP_STRINGS - Returns only top string counts.
FULL - Returns the creation timestamp and all available analytics.
Returns:
An object of the form:
{
"status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
"kind": "urlshortener#url", # The fixed string "urlshortener#url".
"created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
"analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
"week": { # Click analytics over the last week.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"allTime": { # Click analytics over all time.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"twoHours": { # Click analytics over the last two hours.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"day": { # Click analytics over the last day.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"month": { # Click analytics over the last month.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
},
"longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
"id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
}</pre>
</div>
<div class="method">
<code class="details" id="insert">insert(body)</code>
<pre>Creates a new short URL.
Args:
body: object, The request body. (required)
The object takes the form of:
{
"status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
"kind": "urlshortener#url", # The fixed string "urlshortener#url".
"created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
"analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
"week": { # Click analytics over the last week.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"allTime": { # Click analytics over all time.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"twoHours": { # Click analytics over the last two hours.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"day": { # Click analytics over the last day.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"month": { # Click analytics over the last month.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
},
"longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
"id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
}
Returns:
An object of the form:
{
"status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
"kind": "urlshortener#url", # The fixed string "urlshortener#url".
"created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
"analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
"week": { # Click analytics over the last week.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"allTime": { # Click analytics over all time.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"twoHours": { # Click analytics over the last two hours.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"day": { # Click analytics over the last day.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"month": { # Click analytics over the last month.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
},
"longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
"id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(start_token=None, projection=None)</code>
<pre>Retrieves a list of URLs shortened by a user.
Args:
start_token: string, Token for requesting successive pages of results.
projection: string, Additional information to return.
Allowed values
ANALYTICS_CLICKS - Returns short URL click counts.
FULL - Returns short URL click counts.
Returns:
An object of the form:
{
"nextPageToken": "A String", # A token to provide to get the next page of results.
"items": [ # A list of URL resources.
{
"status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
"kind": "urlshortener#url", # The fixed string "urlshortener#url".
"created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
"analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
"week": { # Click analytics over the last week.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"allTime": { # Click analytics over all time.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"twoHours": { # Click analytics over the last two hours.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"day": { # Click analytics over the last day.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
"month": { # Click analytics over the last month.
"shortUrlClicks": "A String", # Number of clicks on this short URL.
"countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
{
"count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
"id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
},
],
"longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
},
},
"longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
"id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
},
],
"kind": "urlshortener#urlHistory", # The fixed string "urlshortener#urlHistory".
"itemsPerPage": 42, # Number of items returned with each full "page" of results. Note that the last page could have fewer items than the "itemsPerPage" value.
"totalItems": 42, # Total number of short URLs associated with this user (may be approximate).
}</pre>
</div>
</body></html>