TLDR; This is a tiny gem to interact with the Dexcom Share API. The API is
(unfortunately) private, so any implementation can't really have stability
guarantees. However, it hasn't changed for the past few years so it should be
fairly stable. Feel free to report any bugs and I'll fix them!
https://rubygems.org/gems/dexcom_share_api
Usage
require "dexcom_share_api"
client = DexcomShareApi.create_client(
username: "Dexcom share username",
password: "Dexcom share password",
server: "us",
)
glucose = client.estimated_glucose
glucose.each do |entry|
puts entry.mmol
puts entry.mgdl
puts entry.trend
puts entry.trend_arrow
puts entry.timestamp
end
glucose = client.last_estimated_glucose
puts glucose.to_h
History
I originally made this library in
JavaScript many years ago to enable
some watch-face development. Recently I had a use-case where I wanted to store
a bunch of Dexcom data in a database for some offline analysis, and decided I'd
port it to Ruby to make that process more enjoyable.
Development
To test:
To build:
gem build && gem install dexcom_share_api