1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18/** 19 * Service definition for Urlshortener (v1). 20 * 21 * <p> 22 * Lets you create, inspect, and manage goo.gl short URLs</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://developers.google.com/url-shortener/v1/getting_started" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31class Google_Service_Urlshortener extends Google_Service 32{ 33 /** Manage your goo.gl short URLs. */ 34 const URLSHORTENER = 35 "https://www.googleapis.com/auth/urlshortener"; 36 37 public $url; 38 39 /** 40 * Constructs the internal representation of the Urlshortener service. 41 * 42 * @param Google_Client $client 43 */ 44 public function __construct(Google_Client $client) 45 { 46 parent::__construct($client); 47 $this->rootUrl = 'https://www.googleapis.com/'; 48 $this->servicePath = 'urlshortener/v1/'; 49 $this->batchPath = 'batch/urlshortener/v1'; 50 $this->version = 'v1'; 51 $this->serviceName = 'urlshortener'; 52 53 $this->url = new Google_Service_Urlshortener_Resource_Url( 54 $this, 55 $this->serviceName, 56 'url', 57 array( 58 'methods' => array( 59 'get' => array( 60 'path' => 'url', 61 'httpMethod' => 'GET', 62 'parameters' => array( 63 'shortUrl' => array( 64 'location' => 'query', 65 'type' => 'string', 66 'required' => true, 67 ), 68 'projection' => array( 69 'location' => 'query', 70 'type' => 'string', 71 ), 72 ), 73 ),'insert' => array( 74 'path' => 'url', 75 'httpMethod' => 'POST', 76 'parameters' => array(), 77 ),'list' => array( 78 'path' => 'url/history', 79 'httpMethod' => 'GET', 80 'parameters' => array( 81 'projection' => array( 82 'location' => 'query', 83 'type' => 'string', 84 ), 85 'start-token' => array( 86 'location' => 'query', 87 'type' => 'string', 88 ), 89 ), 90 ), 91 ) 92 ) 93 ); 94 } 95} 96