Sha256: 91ebe06ebb085a5b640c3a9e4217c4b184555603827089209a1a6cd8fd4d27ef

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

module StatusCat
  module Checkers
    class Fitbit < Base
      def initialize
        @value = ENV[ 'FITBIT_CONSUMER_KEY' ]
        @status = fail_on_exception do
          user_info = ::Fitgem::Client.new(
                              :consumer_key => ENV[ 'FITBIT_CONSUMER_KEY' ],
                              :consumer_secret => ENV[ 'FITBIT_CONSUMER_SECRET' ],
                              :token => ENV[ 'FITBIT_TEST_TOKEN' ],
                              :secret => ENV[ 'FITBIT_TEST_SECRET' ],
                              :user_id => ENV[ 'FITBIT_TEST_USER_ID' ]
                            ).user_info

          user_info[ 'errors' ] ? user_info.inspect : nil
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
status_cat-0.1.1 lib/status_cat/checkers/fitbit.rb