Skip to content

smartclock-app/AlexaQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alexa Query

A Dart library for querying Alexa devices. Designed for use with SmartClock

API Reference

All client methods return a Future.

Initialize Query Client

import "package:alexaquery_dart/alexaquery_dart.dart";
final client = QueryClient(
  File("cookies.json"),
  loginToken: alexa_refresh_token, // optional
  logger_function: (message, level) => print("[$level] $message"), //optional
);

Login

bool loginSuccessful = await client.login(userId, amazon_refresh_token);

Get Devices

List<Device> devices = await client.getDevices(userId);
for(var device in devices) {
  print(device.accountName);
}

Get Notifications

List<Notification> notifications = await client.getNotifications(userId);
for(var n in notifications) {
  print(n.type);
}

Get Queue

List<Device> devices = await getDevices(userId);
Queue queue = await client.getQueue(userId, devices.first.accountName);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages