A very thin Node wrapper for Google's client-side javascript V3 API. For gapi documentation, see Google API Client Reference and for API_KEY, see Google Developers Console.
npm install --save gapi-clientimportgapifrom'gapi-client'// Example : Auth2 (synchronous)constinit=()=>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'})gapi.load('client:auth2',init)// Example : Youtube (synchronous)constinit={client: ()=>gapi.client.load('youtube','v3',init.youtube),youtube: ()=>gapi.client.setApiKey('YOUR_API_KEY')}gapi.load('client',init.client)// Example : Youtube (promisified)newPromise(resolve=>gapi.load('client',resolve)).then(()=>newPromise(resolve=>gapi.client.load('youtube','v3',resolve))).then(()=>gapi.client.setApiKey('YOUR_API_KEY'))MIT license.