Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/majksa-ih/googledriveapi
Operates with Google Drive. For ex. upload, download, create, move, list files and folders.
https://github.com/majksa-ih/googledriveapi
google google-drive google-drive-api google-drive-uploader php php-5 php-5-6 php-library
Last synced: 2 months ago
JSON representation
Operates with Google Drive. For ex. upload, download, create, move, list files and folders.
- Host: GitHub
- URL: https://github.com/majksa-ih/googledriveapi
- Owner: majksa-ih
- Created: 2019-06-20T15:33:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T19:21:38.000Z (over 1 year ago)
- Last Synced: 2024-10-12T12:20:11.075Z (2 months ago)
- Topics: google, google-drive, google-drive-api, google-drive-uploader, php, php-5, php-5-6, php-library
- Language: PHP
- Homepage: http://www.majksa.cz
- Size: 4.03 MB
- Stars: 9
- Watchers: 2
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Drive Api
* Author: Majksa
* Version: 1.0.0
* PHP version: 5.6+## Usage
1. Go to [https://console.developers.google.com/](https://console.developers.google.com/)
2. Create new project
3. Create O2Auth credentials with redirect uri and download them
4. Load using `include '/path/to/GoogleDriveApi/GoogleDriveApi.php';`
5. When creating `new GoogleDriveApi()` send path to credentials as the parameter.## Methods
* log out `logOut()`
* get email `getEmail()`
* list files `listFiles($fields = "files(id, name, owners)")`
* create folder `createFolder($name, $parentId = "root")`
* upload file `uploadFile($fullName, $mimeType, $fullPath, $parentId = "root")`
* upload file basic `uploadFileBasic($name, $type, $extension, $pathToFileDir, $parentId = "root")`
* create file `createFile($fullName, $mimeType, $parentId = "root")`
* create file basic `createFileBasic($name, $type, $extension, $parentId = "root")`
* move file `moveFile($fileId, $folderId)`
* download file `downloadFile($fileId)`
* test files owners `testFilesOwners()`
* set verified owners `setVerifiedOwner($ids)`