0.0
No commit activity in last 3 years
No release in over 3 years
Withings API Ruby thin client wrapper library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.0

Runtime

 Project Readme

Withings API Ruby thin client wrapper library

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'withings_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install withings_api

Usage

require 'withings_api'
require 'json'

# create a instance of API wrapper
t = WithingsAPI::Client.new({
  :consumer_key => 'YOUR_API_KEY',
  :consumer_secret => 'YOUR_API_SECRET',
  :token => 'YOUR_ACCESS_TOKEN',
  :token_secret => 'YOUR_ACCESS_SECRET'
})

# get weight (kg)
res = w.get_body_measures({
  'meastype' => '1'
})
puts res.headers
puts JSON.pretty_generate(JSON.parse(res.body))

Documentation

Documentation for withings_api http://www.rubydoc.info/gems/withings_api/

Withings Api Reference https://oauth.withings.com/api/doc

Development

$ rake -T
rake build            # Build withings_api-X.X.X.gem into the pkg directory
rake clean            # Remove any temporary products
rake clobber          # Remove any generated files
rake install          # Build and install withings_api-X.X.X.gem into system gems
rake install:local    # Build and install withings_api-X.X.X.gem into system gems without network access
rake release[remote]  # Create tag vX.X.X and build and push withings_api-X.X.X.gem to Rubygems
rake spec             # Run RSpec code examples

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/niwasawa/withings-api-ruby-thin-client-wrapper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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