Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinschaich/gapi-client
🗺 A very thin wrapper for Google's client-side javascript V3 API
https://github.com/kevinschaich/gapi-client
api api-client api-wrapper client client-lib client-library client-side gapi gapi-client google google-api google-apis javascript npm npm-package package
Last synced: 3 months ago
JSON representation
🗺 A very thin wrapper for Google's client-side javascript V3 API
- Host: GitHub
- URL: https://github.com/kevinschaich/gapi-client
- Owner: kevinschaich
- License: mit
- Created: 2017-02-10T18:27:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-16T20:12:33.000Z (over 6 years ago)
- Last Synced: 2024-10-03T20:34:08.583Z (4 months ago)
- Topics: api, api-client, api-wrapper, client, client-lib, client-library, client-side, gapi, gapi-client, google, google-api, google-apis, javascript, npm, npm-package, package
- Homepage: https://www.npmjs.com/package/gapi-client
- Size: 9.77 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gapi-client
A *very* thin wrapper for Google's client-side javascript V3 API.
## Example
```bash
npm install --save gapi-client
````index.js:`
```javascript
import gapi from 'gapi-client';//On load, called to load the auth2 library and API client library.
gapi.load('client:auth2', initClient);// Initialize the API client library
function initClient() {
gapi.client.init({
discoveryDocs: ["https://www.googleapis.com/discovery/v1/apis/drive/v3/rest"],
clientId: 'YOUR_CLIENT_ID',
scope: 'https://www.googleapis.com/auth/drive.metadata.readonly'
}).then(function () {
// do stuff with loaded APIs
console.log('it worked');
});
}```
## License
MIT © [Kevin Schaich](https://kevinschaich.io)