4.0.2 • Published 4 years ago
@advanced-rest-client/google-drive-browser v4.0.2
Google Drive browser for Advanced Rest Client
A file browser for Google Drive.
Renders list view for Google Drive items that the application hosting the element has access to. The access is determined by accessToken generated for specific client id or by apiKey property. Learn more about access in Google Drive API docs.
Authorization
The element does not handle user authentication. The accessToken property has to be set on the element.
Listening for user actions
The element allows the user to pick and open a Google Drive item. When this happens the element downloads content of the file using the same access token and dispatches drive-file custom event. The event contains content and driveId properties.
document.querySelector('google-drive-browser').addEventListener('pick', (e) => {
const driveId = e.detail;
console.log(`Selected file: ${driveId}`);
});Usage
Installation
npm install --save @advanced-rest-client/google-drive-browserDevelopment
git clone https://github.com/advanced-rest-client/google-drive-browser
cd google-drive-browser
npm installRunning the demo locally
npm startRunning the tests
npm test4.0.2
4 years ago
4.0.0
5 years ago
3.1.0
6 years ago
3.0.0
6 years ago
3.0.0-preview.3
7 years ago
3.0.0-preview.2
7 years ago
3.0.0-preview.1
7 years ago