Main Nest API for node (also see: nest-api-thermostat-api and nest-api-protect-api) Adapted from:
npm install nest-api
In order to instantiate and use the main Nest API should use the following: var NestApi = require('nest-api'); var nestApi = new NestApi('YOUR_EMAIL', 'YOUR_PASSWORD');
// Login (must be called first to establish a session)
nestApi.login(function(data) {
// A callback for something you would want to do on login
});
nestApi.get('PROPERTY_NAME', function(data) {
// Get a property from the Nest API. See the Appendix for a list of properties.
});
TODO: Fill in some examples
Please feel free to modify and contribute to this code:
- GitHub: node-nest-api
- Author: John Wyles [email protected] (http://johnwyles.com)
- Inspiration: Aaron Cornelius (https://github.com/wiredprairie/unofficial_nodejs_nest)
- Inspiration: Devon Crouse (https://github.com/devoncrouse/nest-nodejs)
See LICENSE
- Implement Nock for testing
- Write generic getter for information
- Research POST operations for Nest API and write setters
Below is an example data structure / JSON object returned from the Nest API:
{
user_alert_dialog: { '###': { /* ... */ } },
track: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
message_center: { '###': { /* ... */ } },
utility: { /* ... */ },
where: { '### uuid ###': { /* ... */ },
structure: { '### uuid ###': { /* ... */ },
message: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
tuneups: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
device: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
demand_response: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
user: { '###': { /* ... */ },
link: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
device_alert_dialog: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
metadata: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
user_settings: { '###': { /* ... */ },
schedule: { '0123456789ABCDEF': { /* ... */ }, /* ... */ },
shared: { '0123456789ABCDEF': { /* ... */ }, /* ... */ }
}