endoplasmic / google-assistant

A node.js implementation of the Google Assistant SDK
MIT License
283 stars 75 forks source link

Pass json data rather than a file? #71

Closed greghesp closed 4 years ago

greghesp commented 5 years ago

Is there a way to pass the token and secret json objects as a location in something like lowdb or similar?

I'm trying to implement refresh my Assistant Relay to make it more user friendly, and would be great if i could just pass the JSON data rather than a file

endoplasmic commented 4 years ago

I think if you go down that road, it's probably easier for you to create your own google authed client and pass it in as oauth2Client in the config.

greghesp commented 4 years ago

Yep that's what I ended up doing. I then just required your conversation component directly

const Conversation = require('google-assistant/components/conversation')