0.4.1 • Published 5 years ago

assistant-google v0.4.1

Weekly downloads
27
License
SEE LICENSE IN <L...
Repository
github
Last release
5 years ago

assistant-google

This package integrates Google Assistant into AssistantJS via assistant-apiai. Make sure you have assistant-apiai set up, install assistant-google with npm install assistant-google --save and add it as an dependency to your index.ts:

import { descriptor as googleDescriptor } from "assistant-google";

/** and below, in your "initializeSetups" method: */
assistantJs.registerComponent(googleDescriptor);

After that add the GoogleTypes and the Google-Handler to your handler-config.ts. Replace or remove ADD_OTHER_TYPES_HERE and ADD_OTHER_HANDLER_HERE<CurrentAnswerTypes> if needed.

import { GoogleSpecificTypes, GoogleHandler} from "assistant-google";
import { State } from "assistant-source";

export type MergedAnswerTypes = GoogleSpecificTypes & ADD_OTHER_TYPES_HERE;
export type MergedHandler = GoogleHandler<CurrentAnswerTypes> & ADD_OTHER_HANDLER_HERE<MergedAnswerTypes>;

export type MergedSetupSet = State.SetupSet<MergedAnswerTypes, MergedHandler>

And that's it! Your AssistantJS voice application is now ready for Google Assistant. There is no more configuration needed!

Debugging OAuth

If you start your AssistantJS server with FORCED_GOOGLE_OAUTH_TOKEN="mytoken", all google assistant requests will return "mytoken" as OAuth token. That way, you can test or demo your skill without having a full OAuth setup in place.

0.4.1

5 years ago

0.4.0

5 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

7 years ago