- Notifications
You must be signed in to change notification settings - Fork3
A simple javascript library for reading glucose data from the Dexcom Share API.
License
coderkearns/dexcom
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A simple non-official javascript library for reading glucose data from the Dexcom Share API.
dexcom can be used client-side (in-browser) by adding the script to your html:
$ curl -sL https://raw.githubusercontent.com/coderkearns/dexcom/master/index.js> dexcom.js
<scriptsrc="dexcom.js"></script>
dexcom can also be used in node.js, but requires fetch. It can currently be used in Node.js v17.6.x and above.
$ curl -sL https://raw.githubusercontent.com/coderkearns/dexcom/master/index.js> dexcom.js$ node --versionv17.6.0$ node --experimental-fetch<file>.js
// <file>.jsconstClient=require('./dexcom.js');
This step only needs to be done once per account.
Download theDexcom G6 / G5 / G4 app, thenenable the Share service.
constdexcomClient=newClient()
awaitdexcomClient.login("myUsername","myPasswordIsCool1*")
constlastReading=awaitdexcomClient.fetchLastReading()console.log(`Reading value is${lastReading.trend.arrow}${lastReading.mgdl}. The value is${lastReading.trend.desc}. The value was measured at${lastReading.time}.`)constlast20ReadingsInTheLast1Hour=awaitdexcomClient.fetchReadings(60,20)
This project is licensed under theMIT License - see theLICENSE file for details.
About
A simple javascript library for reading glucose data from the Dexcom Share API.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.