{
 "kind": "discovery#restDescription",
 "etag": "\"0kaFfN0xfjZjASExv-gUnrWhdto/T4bB77XUfbpGWn7xKXxC7yFKgeE\"",
 "discoveryVersion": "v1",
 "id": "urlshortener:v1",
 "name": "urlshortener",
 "version": "v1",
 "title": "Codegen Test API",
 "description": "An API with some use of Unicode.",
 "ownerDomain": "google.com",
 "ownerName": "Google",
 "icons": {
  "x16": "http://www.google.com/images/icons/product/search-16.gif",
  "x32": "http://www.google.com/images/icons/product/search-32.gif"
 },
 "documentationLink": "http://code.google.com/apis/urlshortener/v1/getting_started.html",
 "protocol": "rest",
 "baseUrl": "https://www.googleapis.com/urlshortener/v1/",
 "basePath": "/urlshortener/v1/",
 "rootUrl": "https://www.googleapis.com/",
 "servicePath": "urlshortener/v1/",
 "batchPath": "batch",
 "parameters": {
  "alt": {
   "type": "string",
   "description": "Data format for the response.",
   "default": "json",
   "enum": [
    "json"
   ],
   "enumDescriptions": [
    "Responses with Content-Type of application/json"
   ],
   "location": "query"
  },
  "fields": {
   "type": "string",
   "description": "Selector specifying which fields to include in a partial response.",
   "location": "query"
  },
  "key": {
   "type": "string",
   "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
   "location": "query"
  },
  "oauth_token": {
   "type": "string",
   "description": "OAuth 2.0 token for the current user.",
   "location": "query"
  },
  "prettyPrint": {
   "type": "boolean",
   "description": "Returns response with indentations and line breaks.",
   "default": "true",
   "location": "query"
  },
  "germanic": {
   "type": "string",
   "description": "Returns response with extra umläuts.",
   "location": "query"
  }
 },
 "auth": {
  "oauth2": {
   "scopes": {
    "https://www.googleapis.com/auth/urlshortener": {
     "description": "Manage your goo.gl short ÚRLs"
    }
   }
  }
 },
 "schemas": {
  "AnalyticsSnapshot": {
   "id": "AnalyticsSnapshot",
   "description": "This schema has uses Útf-8. Héllö Wörld!",
   "type": "object",
   "properties": {
    "browsers": {
     "type": "array",
     "description": "Tøp browsers, e.g. \"Chrome\"; sorted by (descending) click counts. Only present if this data is available.",
     "items": {
      "$ref": "StringCount"
     }
    },
    "countries": {
     "type": "array",
     "description": "Top countries (expressed as country codes), e.g. \"US\" or \"DE\"; sorted by (descending) click counts. Only present if this data is available.",
     "items": {
      "$ref": "StringCount"
     }
    },
    "longUrlClicks": {
     "type": "string",
     "description": "Number of clicks on all goo.gl short ÚRLs pointing to this long ÚRL.",
     "format": "int64"
    },
    "platforms": {
     "type": "array",
     "description": "Top platforms or OSes, e.g. \"Windows\"; sorted by (descending) click counts. Only present if this data is available.",
     "items": {
      "$ref": "StringCount"
     }
    },
    "referrers": {
     "type": "array",
     "description": "Top referring hosts, e.g. \"www.google.com\"; sorted by (descending) click counts. Only present if this data is available.",
     "items": {
      "$ref": "StringCount"
     }
    },
    "shortUrlClicks": {
     "type": "string",
     "description": "Number of clicks on this short ÚRL.",
     "format": "int64"
    }
   }
  },
  "AnalyticsSummary": {
   "id": "AnalyticsSummary",
   "type": "object",
   "properties": {
    "allTime": {
     "$ref": "AnalyticsSnapshot",
     "description": "Click analytics over all time."
    },
    "day": {
     "$ref": "AnalyticsSnapshot",
     "description": "Click analytics over the last day."
    },
    "month": {
     "$ref": "AnalyticsSnapshot",
     "description": "Click analytics over the last month."
    },
    "twoHours": {
     "$ref": "AnalyticsSnapshot",
     "description": "Click analytics over the last two hours."
    },
    "week": {
     "$ref": "AnalyticsSnapshot",
     "description": "Click analytics over the last week."
    }
   }
  },
  "StringCount": {
   "id": "StringCount",
   "type": "object",
   "properties": {
    "count": {
     "type": "string",
     "description": "Number of clicks for this top entry, e.g. for this particular country or browser.",
     "format": "int64"
    },
    "id": {
     "type": "string",
     "description": "Label assigned to this top entry, e.g. \"US\" or \"Chrome\"."
    }
   }
  },
  "Url": {
   "id": "Url",
   "type": "object",
   "properties": {
    "analytics": {
     "$ref": "AnalyticsSummary",
     "description": "A summary of the click analytics for the short and long ÚRL. Might not be present if not requested or currently unavailable."
    },
    "created": {
     "type": "string",
     "description": "Time the short ÚRL 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\"."
    },
    "id": {
     "type": "string",
     "description": "Short ÚRL, e.g. \"http://goo.gl/l6MS\"."
    },
    "kind": {
     "type": "string",
     "description": "The fixed string \"urlshortener#url\".",
     "default": "urlshortener#url"
    },
    "longUrl": {
     "type": "string",
     "description": "Long ÚRL, e.g. \"http://www.google.com/\". Might not be present if the status is \"REMOVED\"."
    },
    "status": {
     "type": "string",
     "description": "Status of the target ÚRL. Possible values: \"OK\", \"MALWARE\", \"PHISHING\", or \"REMOVED\". A ÚRL might be marked \"REMOVED\" if it was flagged as spam, for example."
    }
   }
  },
  "UrlHistory": {
   "id": "UrlHistory",
   "type": "object",
   "properties": {
    "items": {
     "type": "array",
     "description": "A list of ÚRL resources.",
     "items": {
      "$ref": "Url"
     }
    },
    "itemsPerPage": {
     "type": "integer",
     "description": "Number of items returned with each full \"page\" of results. Note that the last page could have fewer items than the \"itemsPerPage\" value.",
     "format": "int32"
    },
    "kind": {
     "type": "string",
     "description": "The fixed string \"urlshortener#urlHistory\".",
     "default": "urlshortener#urlHistory"
    },
    "nextPageToken": {
     "type": "string",
     "description": "A token to provide to get the next page of results."
    },
    "totalItems": {
     "type": "integer",
     "description": "Total number of short ÚRLs associated with this user (may be approximate).",
     "format": "int32"
    }
   }
  }
 },
 "resources": {
  "url": {
   "methods": {
    "get": {
     "id": "urlshortener.url.get",
     "path": "url",
     "httpMethod": "GET",
     "description": "Expands a short ÚRL or gets creation time and analytics.",
     "parameters": {
      "projection": {
       "type": "string",
       "description": "Additional information to return.",
       "enum": [
        "ANALYTICS_CLICKS",
        "ANALYTICS_TOP_STRINGS",
        "FULL"
       ],
       "enumDescriptions": [
        "Returns only click counts.",
        "Returns only top string counts.",
        "Returns the creation timestamp and all available analytics."
       ],
       "location": "query"
      },
      "shortUrl": {
       "type": "string",
       "description": "The short ÚRL, including the protocol.",
       "required": true,
       "location": "query"
      }
     },
     "parameterOrder": [
      "shortUrl"
     ],
     "response": {
      "$ref": "Url"
     }
    },
    "insert": {
     "id": "urlshortener.url.insert",
     "path": "url",
     "httpMethod": "POST",
     "description": "Creates a new short ÚRL.",
     "request": {
      "$ref": "Url"
     },
     "response": {
      "$ref": "Url"
     },
     "scopes": [
      "https://www.googleapis.com/auth/urlshortener"
     ]
    },
    "list": {
     "id": "urlshortener.url.list",
     "path": "url/history",
     "httpMethod": "GET",
     "description": "Retrieves a list of ÚRLs shortened by a user.",
     "parameters": {
      "projection": {
       "type": "string",
       "description": "Additional information to return.",
       "enum": [
        "ANALYTICS_CLICKS",
        "FULL"
       ],
       "enumDescriptions": [
        "Returns short ÚRL click counts.",
        "Returns short ÚRL click counts."
       ],
       "location": "query"
      },
      "start-token": {
       "type": "string",
       "description": "Token for requesting successive pages of results.",
       "location": "query"
      }
     },
     "response": {
      "$ref": "UrlHistory"
     },
     "scopes": [
      "https://www.googleapis.com/auth/urlshortener"
     ]
    }
   }
  }
 }
}
