0.4.0 • Published 7 years ago

lumolift v0.4.0

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

Lumo API client

Build Status

Unofficial Lumo Lift API client for node.js

Features

Usage

Install

npm install lumolift

Steps for last 24 hours

var lumolift = require('lumolift')

// assume you have already gotten an OAuth2 access token and it's still valid
var accessToken = 'YOUR_ACCESS_TOKEN'
var d = new Date()
var endTime = Math.round(d.getTime() / 1000)
var startTime = (endTime - 24 * 60 * 60) // 24 hours
var client = new lumolift.Client(accessToken)
client.activities(startTime, endTime, 'steps').then(function (data) {
  console.log(JSON.stringify(data, null, 1))
}).catch(function(error){
  console.error(error)
})

Checkout the rest of the samples