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 PhotosLibrary (v1). 20 * 21 * <p> 22 * Manage photos, videos, and albums in Google Photos</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://developers.google.com/photos/" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31class Google_Service_PhotosLibrary extends Google_Service 32{ 33 /** View the photos, videos and albums in your Google Photos. */ 34 const DRIVE_PHOTOS_READONLY = 35 "https://www.googleapis.com/auth/drive.photos.readonly"; 36 /** View and manage your Google Photos library. */ 37 const PHOTOSLIBRARY = 38 "https://www.googleapis.com/auth/photoslibrary"; 39 /** Add to your Google Photos library. */ 40 const PHOTOSLIBRARY_APPENDONLY = 41 "https://www.googleapis.com/auth/photoslibrary.appendonly"; 42 /** View your Google Photos library. */ 43 const PHOTOSLIBRARY_READONLY = 44 "https://www.googleapis.com/auth/photoslibrary.readonly"; 45 /** Manage photos added by this app. */ 46 const PHOTOSLIBRARY_READONLY_APPCREATEDDATA = 47 "https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata"; 48 /** Manage and add to shared albums on your behalf. */ 49 const PHOTOSLIBRARY_SHARING = 50 "https://www.googleapis.com/auth/photoslibrary.sharing"; 51 52 public $albums; 53 public $mediaItems; 54 public $sharedAlbums; 55 56 /** 57 * Constructs the internal representation of the PhotosLibrary service. 58 * 59 * @param Google_Client $client 60 */ 61 public function __construct(Google_Client $client) 62 { 63 parent::__construct($client); 64 $this->rootUrl = 'https://photoslibrary.googleapis.com/'; 65 $this->servicePath = ''; 66 $this->version = 'v1'; 67 $this->serviceName = 'photoslibrary'; 68 69 $this->albums = new Google_Service_PhotosLibrary_Resource_Albums( 70 $this, 71 $this->serviceName, 72 'albums', 73 array( 74 'methods' => array( 75 'addEnrichment' => array( 76 'path' => 'v1/albums/{+albumId}:addEnrichment', 77 'httpMethod' => 'POST', 78 'parameters' => array( 79 'albumId' => array( 80 'location' => 'path', 81 'type' => 'string', 82 'required' => true, 83 ), 84 ), 85 ),'create' => array( 86 'path' => 'v1/albums', 87 'httpMethod' => 'POST', 88 'parameters' => array(), 89 ),'get' => array( 90 'path' => 'v1/albums/{+albumId}', 91 'httpMethod' => 'GET', 92 'parameters' => array( 93 'albumId' => array( 94 'location' => 'path', 95 'type' => 'string', 96 'required' => true, 97 ), 98 ), 99 ),'list' => array( 100 'path' => 'v1/albums', 101 'httpMethod' => 'GET', 102 'parameters' => array( 103 'pageToken' => array( 104 'location' => 'query', 105 'type' => 'string', 106 ), 107 'pageSize' => array( 108 'location' => 'query', 109 'type' => 'integer', 110 ), 111 ), 112 ),'share' => array( 113 'path' => 'v1/albums/{+albumId}:share', 114 'httpMethod' => 'POST', 115 'parameters' => array( 116 'albumId' => array( 117 'location' => 'path', 118 'type' => 'string', 119 'required' => true, 120 ), 121 ), 122 ), 123 ) 124 ) 125 ); 126 $this->mediaItems = new Google_Service_PhotosLibrary_Resource_MediaItems( 127 $this, 128 $this->serviceName, 129 'mediaItems', 130 array( 131 'methods' => array( 132 'batchCreate' => array( 133 'path' => 'v1/mediaItems:batchCreate', 134 'httpMethod' => 'POST', 135 'parameters' => array(), 136 ),'get' => array( 137 'path' => 'v1/mediaItems/{+mediaItemId}', 138 'httpMethod' => 'GET', 139 'parameters' => array( 140 'mediaItemId' => array( 141 'location' => 'path', 142 'type' => 'string', 143 'required' => true, 144 ), 145 ), 146 ),'search' => array( 147 'path' => 'v1/mediaItems:search', 148 'httpMethod' => 'POST', 149 'parameters' => array(), 150 ), 151 ) 152 ) 153 ); 154 $this->sharedAlbums = new Google_Service_PhotosLibrary_Resource_SharedAlbums( 155 $this, 156 $this->serviceName, 157 'sharedAlbums', 158 array( 159 'methods' => array( 160 'join' => array( 161 'path' => 'v1/sharedAlbums:join', 162 'httpMethod' => 'POST', 163 'parameters' => array(), 164 ),'list' => array( 165 'path' => 'v1/sharedAlbums', 166 'httpMethod' => 'GET', 167 'parameters' => array( 168 'pageToken' => array( 169 'location' => 'query', 170 'type' => 'string', 171 ), 172 'pageSize' => array( 173 'location' => 'query', 174 'type' => 'integer', 175 ), 176 ), 177 ), 178 ) 179 ) 180 ); 181 } 182} 183