README.rdoc in simplificator-withings-0.2.0 vs README.rdoc in simplificator-withings-0.2.1

- old
+ new

@@ -1,8 +1,8 @@ = simplificator-withings -This is a ruby implementation for the Withings API. Description of the API can be found here: http://www.withings.com/en/api/ +This is a ruby implementation for the Withings API. Description of the API can be found here: http://www.withings.com/en/api == Status The gem is still under development and the API might change a bit. == Installation @@ -26,41 +26,33 @@ * All the methods making remote calls can throw Withing::ApiError if something goes wrong (wrong public_key, missing parameters, ...). You can find more details on the error by looking at the status code in the error. == How To Require the API implementation - require 'rubygems' require 'withings' All classes are name-spaced, if your other code allows you can include Withings - include Withings A user can be authenticated with email address and password - user = User.authenticate('<YOUR EMAIL ADDRESS>', '<YOUR PASSWORD>') Or you can fetch details if you have the user id and public key - user = User.info('<YOUR USER ID>', '<YOUR PUBLIC KEY>') If you already have user id and public key and you do not need further information on the user - user = User.new(:user_id => '<YOUR USER ID>', :public_key => '<YOUR PUBLIC_KEY>') enable/disable sharing, disabling it will reset the public key - user.share=true You can handle subscriptions through the API - user.subscribe_notification('http://foo.bar.com', 'test subscription') user.describe_notification('http://foo.bar.com') user.revoke_notification('http://foo.bar.com') And finally you can get measurements, after all it's a scale - user.measurement_groups(:per_page => 10, :page => 1, :end_at => Time.now) user.measurement_groups(:category => MeasurementGroup::CATEGORY_TARGET) user.measurement_groups(:last_updated_at => Time.at(12345)) user.measurement_groups(:start_at => Time.at(12345), :end_at => Time.at(67890)) user.measurement_groups(:measurement_type => MeasurementGroup::TYPE_FAT)