google-client-api

1.0.4 • Public • Published

google-client-api

module.exports(onComplete) ⏏

This module is a function which will return a Google Client API object assynchronously.

This function returns a promise. (if you're into promises) Which will return the gapi Object.

If you're not into promises then you can simply call this function and pass in a callback object.

Params

  • onComplete function - an optional callback which will return the Google Client API Object.

Returns: Promise - This function also returns a promise if you're into promises which will return the Google Client API Object.

Example

Using with Promise:

require( 'google-client-api' )().then( function( gapi ) {
    // Do something with the gapi object
});

Using with callback:

require( 'google-client-api' )( function( gapi ) {
    // Do something with the gapi object
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    2,809
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    2,809
  • 1.0.3
    2
  • 1.0.2
    2
  • 1.0.1
    2
  • 1.0.0
    2

Package Sidebar

Install

npm i google-client-api

Weekly Downloads

639

Version

1.0.4

License

MIT

Last publish

Collaborators

  • mikkoh