Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple javascript library for reading glucose data from the Dexcom Share API.

License

NotificationsYou must be signed in to change notification settings

coderkearns/dexcom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple non-official javascript library for reading glucose data from the Dexcom Share API.

Installation

Browser

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>

Node.js

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');

Usage

Step 1. Enable the Dexcom Share service on your account

This step only needs to be done once per account.

Download theDexcom G6 / G5 / G4 app, thenenable the Share service.

Step 2. Create a Client instance

constdexcomClient=newClient()

Step 3. Log in to an account

awaitdexcomClient.login("myUsername","myPasswordIsCool1*")

Step 4. Get your glucose values

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)

License

This project is licensed under theMIT License - see theLICENSE file for details.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp