public
Created

Fixes for apiDriveService

  • Download Gist
apiDriveService.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Index: src/contrib/apiDriveService.php
===================================================================
--- src/contrib/apiDriveService.php (revision 417)
+++ src/contrib/apiDriveService.php (working copy)
@@ -33,7 +33,7 @@
* @param DriveFile $postBody
* @return DriveFile
*/
- public function insert(com.google.drive.model.DriveFile $postBody, $optParams = array()) {
+ public function insert(DriveFile $postBody, $optParams = array()) {
$params = array('postBody' => $postBody);
$params = array_merge($params, $optParams);
$data = $this->__call('insert', array($params));
@@ -55,7 +55,7 @@
* @opt_param bool newRevision Whether a blob upload should create a new revision. If not set or false, the blob data in the current head revision will be replaced.
* @return DriveFile
*/
- public function patch($id, com.google.drive.model.DriveFile $postBody, $optParams = array()) {
+ public function patch($id, DriveFile $postBody, $optParams = array()) {
$params = array('id' => $id, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
$data = $this->__call('patch', array($params));
@@ -77,7 +77,7 @@
* @opt_param bool newRevision Whether a blob upload should create a new revision. If not set or false, the blob data in the current head revision will be replaced.
* @return DriveFile
*/
- public function update($id, com.google.drive.model.DriveFile $postBody, $optParams = array()) {
+ public function update($id, DriveFile $postBody, $optParams = array()) {
$params = array('id' => $id, 'postBody' => $postBody);
$params = array_merge($params, $optParams);
$data = $this->__call('update', array($params));
@@ -137,7 +137,7 @@
$this->serviceName = 'drive';
$apiClient->addService($this->serviceName, $this->version);
- $this->files = new FilesServiceResource($this, $this->serviceName, 'files', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "mediaUpload": {"maxSize": "10GB", "accept": ["*/*"], "protocols": {"simple": {"path": "/upload/drive/v1/files", "multipart": true}, "resumable": {"path": "/resumable/upload/drive/v1/files", "multipart": true}}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "httpMethod": "POST", "path": "files", "id": "drive.files.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "parameters": {"updateViewedDate": {"default": "true", "type": "boolean", "location": "query"}, "id": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["BASIC", "FULL"], "type": "string", "location": "query"}}, "id": "drive.files.get", "httpMethod": "GET", "path": "files/{id}", "response": {"$ref": "File"}}, "update": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "parameters": {"updateViewedDate": {"default": "true", "type": "boolean", "location": "query"}, "updateModifiedDate": {"default": "false", "type": "boolean", "location": "query"}, "id": {"required": true, "type": "string", "location": "path"}, "newRevision": {"default": "true", "type": "boolean", "location": "query"}}, "mediaUpload": {"maxSize": "10GB", "accept": ["*/*"], "protocols": {"simple": {"path": "/upload/drive/v1/files/{id}", "multipart": true}, "resumable": {"path": "/resumable/upload/drive/v1/files/{id}", "multipart": true}}}, "request": {"$ref": "File"}, "id": "drive.files.update", "httpMethod": "PUT", "path": "files/{id}", "response": {"$ref": "File"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "parameters": {"updateViewedDate": {"default": "true", "type": "boolean", "location": "query"}, "updateModifiedDate": {"default": "false", "type": "boolean", "location": "query"}, "id": {"required": true, "type": "string", "location": "path"}, "newRevision": {"default": "true", "type": "boolean", "location": "query"}}, "request": {"$ref": "File"}, "id": "drive.files.patch", "httpMethod": "PATCH", "path": "files/{id}", "response": {"$ref": "File"}}}}', true));
+ $this->files = new FilesServiceResource($this, $this->serviceName, 'files', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "mediaUpload": {"maxSize": "10GB", "accept": ["*/*"], "protocols": {"simple": {"path": "/upload/drive/v1/files", "multipart": true}, "resumable": {"path": "/resumable/upload/drive/v1/files", "multipart": true}}}, "request": {"$ref": "File"}, "response": {"$ref": "File"}, "httpMethod": "POST", "path": "files", "id": "drive.files.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "parameters": {"updateViewedDate": {"default": "true", "type": "boolean", "location": "query"}, "id": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["BASIC", "FULL"], "type": "string", "location": "query"}}, "id": "drive.files.get", "httpMethod": "GET", "path": "files/{id}", "response": {"$ref": "File"}}, "update": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "parameters": {"updateViewedDate": {"default": "true", "type": "boolean", "location": "query"}, "updateModifiedDate": {"default": "false", "type": "boolean", "location": "query"}, "id": {"required": true, "type": "string", "location": "path"}, "newRevision": {"default": "true", "type": "boolean", "location": "query"}}, "mediaUpload": {"maxSize": "10GB", "accept": ["*/*"], "protocols": {"simple": {"path": "/upload/drive/v1/files/{id}", "multipart": true}, "resumable": {"path": "/resumable/upload/drive/v1/files/{id}", "multipart": true}}}, "request": {"$ref": "File"}, "id": "drive.files.update", "httpMethod": "PUT", "path": "files/{id}", "response": {"$ref": "File"}}, "patch": {"scopes": ["https://www.googleapis.com/auth/drive.file"], "parameters": {"updateViewedDate": {"default": "true", "type": "boolean", "location": "query"}, "updateModifiedDate": {"default": "false", "type": "boolean", "location": "query"}, "id": {"required": true, "type": "string", "location": "path"}, "newRevision": {"default": "true", "type": "boolean", "location": "query"}}, "request": {"$ref": "File"}, "id": "drive.files.patch", "httpMethod": "PATCH", "path": "files/{id}", "response": {"$ref": "File"}}}}', true));
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.