google-api-provider 1.0.3
Install from the command line:
Learn more about npm packages
$ npm install @meese-os/google-api-provider@1.0.3
Install via package.json:
"@meese-os/google-api-provider": "1.0.3"
About this version
This is the Google API Provider for meeseOS.
npm install @meese-os/google-api-provider
In your client bootstrap file (src/client/index.js
):
import { GapiServiceProvider } from "@meese-os/google-api-provider";
meeseOS.register(GapiServiceProvider, {
args: {
enabled: true,
src: "https://accounts.google.com/gsi/client",
// You have to define these
client: {
api_key: "",
client_id: "",
scope: []
}
}
});
For example in an application:
const meeseOSgapi = core.make("meeseOS/gapi").create();
meeseOSgapi.on("signed-in", () => console.log("You were signed in"));
meeseOSgapi.on("signed-out", () => console.log("You were signed out"));
meeseOSgapi.login().then(gapi => {
// Do whatever
});
proc.on("destroy", () => meeseOSgapi.destroy());