#Basis-fetch
Quick module to get one days metrics from the Basis Peak private API. Using the Basis private API so it could break at any time. Tests and support for other data types coming soon.
$ npm install basis-fetch
Username and Password thay ou use on https://app.mybasis.com/
basis.requestUser(username, password, "2015-05-04");
// returns error, access token
Date Format: YYYY-MM-DD
basis.getMetrics(accessToken, "2015-05-03", "details", callback)
// returns error, array of data
Finds the most recent complete data.
basis.getLatest(data, function(metric) {
console.log("time: ", moment.unix(metric.date).format("dddd, MMMM Do YYYY, h:mm:ss a"));
console.log("temp (c): ", convertTemp(metric.skinTemp));
console.log("latest metric:", metric);
}