lib/fitgem/body_measurements.rb
# Log body measurements to fitbit for the current user
#
# At least ONE measurement item is REQUIRED in the call, as well as the
# date. All measurement values to be logged for the user must be either an
# Integer, a Decimal value, or a String in "X.XX" format. The
# measurement units used for the supplied measurements are based on
# which {Fitgem::ApiUnitSystem} is set in {Fitgem::Client#api_unit_system}.
#
# @param [Hash] opts The options including data to log for the user
# @option opts [Integer, Decimal, String] :weight Weight measurement
# @option opts [Integer, Decimal, String] :waist Waist measurement
# @option opts [Integer, Decimal, String] :thigh Thigh measurement
# @option opts [Integer, Decimal, String] :neck Neck measurement
# @option opts [Integer, Decimal, String] :hips Hips measurement
# @option opts [Integer, Decimal, String] :forearm Forearm measurement
# @option opts [Integer, Decimal, String] :fat Body fat percentage measurement
# @option opts [Integer, Decimal, String] :chest Chest measurement
# @option opts [Integer, Decimal, String] :calf Calf measurement
# @option opts [Integer, Decimal, String] :bicep Bicep measurement
# @option opts [DateTime, Date, String] :date Date to log measurements
#   for; provided either as a DateTime, Date, or a String in
#   "yyyy-MM-dd" format
#
# @return [Hash] Hash containing the key +:body+ with an inner hash
#   of all of the logged measurements
#
# @since v0.4.0
Log body measurements to fitbit for the current user
At least ONE measurement item is REQUIRED in the call, as well as the
date. All measurement values to be logged for the user must be either an
Integer, a Decimal value, or a String in "X.XX" format. The
measurement units used for the supplied measurements are based on
which {Fitgem::ApiUnitSystem} is set in {Fitgem::Client#api_unit_system}.
Log body measurements to fitbit for the current user At least ONE measurement item is REQUIRED in the call as well as the date . All measurement values to be logged for the user must be either an Integer a Decimal value or a String in " X . XX " format . The measurement units used for the supplied measurements are based on which { Fitgem :: ApiUnitSystem } is set in { Fitgem :: Client#api_unit_system } .
def log_body_measurements(opts)
      opts[:date] = format_date(opts[:date]) if opts[:date]
      post("/user/#{@user_id}/body.json", opts)
    end
def log_body_measurements ( opts ) opts [ :date ] = format_date ( opts [ :date ] ) if opts [ :date ] post ( "/user/#{@user_id}/body.json" , opts ) end
Log body measurements to fitbit for the current user
At least ONE measurement item is REQUIRED in the call, as well as the
date.
Log body measurements to fitbit for the current user At least ONE measurement item is REQUIRED in the call as well as the date .
# Update the date (if exists)
Hash containing the key +:body+ with an inner hash of all of the logged measurements
Hash containing the key + : body + with an inner hash of all of the logged measurements
Hash
opts
:date Date to log measurements for; provided either as a DateTime, Date, or a String in "yyyy-MM-dd" format
: date Date to log measurements for ; provided either as a DateTime Date or a String in " yyyy - MM - dd " format
opts The options including data to log for the user
opts The options including data to log for the user
since
None