<commit_before>= wiscale

Ruby Wrapper for Withings Wifi Scale API

== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 <NAME>. See LICENSE for details.<commit_msg>Update readme with some examples<commit_after>= wiscale

Ruby Wrapper for Withings Wifi Scale API

== Examples


require 'wiscale'

client = WiScale.new(:userid => 123, :publickey => '<KEY>')


# Get all measurements without any filters
measurements = client.get_meas

# Get only the last measurement
measurements = client.get_meas(:limit => 1)

# Get the last measurement as weight in lbs and %fat
measurements[0].each do |rec|
  type = rec['type'].to_i
  value = (rec['value'].to_i * (10 ** rec['unit'])).to_f

  if type == 6
    puts "Fat %: " + value.round(2)
  elsif type == 1
    puts "Weight " + (value * 2.20462262).round(2) + " lb"
  end
end

# Subscribe a URL to push notification
client.notify_subscribe('http://www.mytestingurl.com', 'this is a test')

# Get the notification you just created
client.notify_get('http://www.mytestingurl.com')

# Revoke the notification
client.notify_revoke('http://www.mytestingurl.com')


# Get all user information
client.get_by_userid

# Get a list of users for a logon
WiScale.get_users_list('<EMAIL>', '<PASSWORD>')


== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2010 <NAME>. See LICENSE for details.
{'fraction_non_alphanumeric': 0.09588400374181479, 'fraction_numerical': 0.013096351730589336, 'mean_word_length': 3.986013986013986, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4384595', 'n_tokens_mistral': 689, 'n_tokens_neox': 651, 'n_words': 285}