Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dexcom_share_api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dexcom_share_api

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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"

# Create a client with your username and password from Dexcom Share.
# If you get authentication issues, try to confirm your username/password by
# logging into Dexcom Share directly.
client = DexcomShareApi.create_client(
  username: "Dexcom share username",
  password: "Dexcom share password",
  # If your account is registered in the US, otherwise `outside-us`.
  server: "us",
)

# Defaults to outputting the last 10 entries
# Optionally can pass in the _last_ parameter.
# ```
#   client.estimated_glucose(last: 5)
# ```
glucose = client.estimated_glucose
glucose.each do |entry|
  puts entry.mmol # => 5.39
  puts entry.mgdl # => 151.0
  puts entry.trend # => "flat"
  puts entry.trend_arrow # => "→"
  # Timestamp is an iso8601
  puts entry.timestamp # => "2024-03-06T04:14:53+00:00"
end

# Alternatively, to grab the last entry:
glucose = client.last_estimated_glucose
puts glucose.to_h # => {:trend=>"flat", :trend_arrow=>"→", :timestamp=>"2024-03-06T04:14:53+00:00", :mmol=>8.39, :mgdl=>151.0}

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:

  • bin/test

To build:

  • gem build && gem install dexcom_share_api

FAQs

Package last updated on 06 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc