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

MShealth

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

MShealth

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

MShealth

Ruby API wrapper for the Microsoft Health Cloud.

Installation

Add this line to your application's Gemfile:

gem 'MShealth'

And then execute:

$ bundle

Or install it yourself as:

$ gem install MShealth

Usage

Check get started on how to register application and the application authentication scheme.

Set the token:

MShealth.configure do |c|
  c.token = "your token"
end

Then get client:

client = MShealth.client

Profile

client.profile #Get the details about this user from their Microsoft Health profile.

Devices

client.device(id:'FFFF1700-FFFF-FFFF-8529-454E11000210') #Get the single device info
client.devices #Return a list devices

Activities

# Get the single activity. "details,minute_summaries,map_points" are optional.
activity = client.activity(id:"2519647921241112976",details:1,minute_summaries:1,map_points:1)
# Get all activities during the period in an array. "details,minute_summaries,map_points,activity_types" are optional.
activities = client.activities(start_time:Time.new(2015,5,27),
  end_time:Time.new(2015,7,29),
  activity_types:"Run,Sleep",
  details:1,
  minute_summaries:1,
  map_points:1)

Summary

# Get all summaries during the period in an array. "end_time,device_id" are optional.
summary = client.summary(period:'hourly',
  start_time:Time.new(2015,6,27),
  end_time:Time.new(2015,7,20),
  device_id:"FFFF1700-FFFF-FFFF-8529-454E11000210")

Return object

All returns are stored in a hash-like Mash object. All naming of parameters are ruby-ish.(eg:firstName -> first_name)

profile = client.profile
profile.first_name
# You can check the whole structure using to_yaml:
puts profile.to_yaml

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yielder/MShealth.

Todo

  • Add documentation
  • Add oauth2 support

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 31 Jul 2015

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