npm.io
2.0.1 • Published 3 years ago

alexaquery

Licence
MIT
Version
2.0.1
Deps
1
Size
20 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

API Reference

All alexa methods return a promise.

Initialize Query Client

import AlexaQuery from "alexaquery";
const alexa = new AlexaQuery(cookiePath);

cookiePath is relative to your home directory.

Login
// The userId is used to identify the cookie and can be any string.
// Returns a boolean (True == success)
await alexa.login(userId, amazon_refresh_token);
Check Login Status
// Returns a boolean
await alexa.checkStatus(userId);
Get Devices
// Returns an array of devices
await alexa.getDevices(userId);
Get Notifications
// Returns an array of notifications
await alexa.getNotifications(userId);
Get Queue
// Returns a Queue Object
await alexa.getQueue(userId, device);