Skip to content

Instantly share code, notes, and snippets.

ejain /
Created Jan 31, 2017
Retrieves sleep presence records from Emfit QS, and merges the records into a single spreadsheet.
import io, re, requests, sys, time, zipfile
def get_device(token):
r = get("/api/v1/user/get", token)
device = r.json()["user"]["devices"]
print("Device: " + device, file = sys.stderr)
return device
def list_presences(token, device):
r = get("/v4/presence/{0}/latest".format(device), token)