app/adapters/withings_adapter.rb
# The pre-configured Faraday HTTP client. This cannot be memoized since the token might change throughout the
# lifespan of this object.
#
# @return [#get] an HTTP client that can be used to fetch a payload from the Withings API, pre-loaded with
#   authentication headers and everything else needed to authenticate with the API
The pre-configured Faraday HTTP client. This cannot be memoized since the token might change throughout the
lifespan of this object.
The pre - configured Faraday HTTP client . This cannot be memoized since the token might change throughout the lifespan of this object .
def http_client
    Faraday.new(url: API_URL, request: { timeout: 5, open_timeout: 5 }) do |conn|
      conn.request :oauth2, token, token_type: :bearer
      conn.response :json
      conn.adapter Faraday.default_adapter
    end
  end
def http_client Faraday . new ( url : API_URL , request : { timeout : 5 , open_timeout : 5 } ) do | conn | conn . request :oauth2 , token , token_type : :bearer conn . response :json conn . adapter Faraday . default_adapter end end
The pre-configured Faraday HTTP client.
The pre - configured Faraday HTTP client .
an HTTP client that can be used to fetch a payload from the Withings API, pre-loaded with authentication headers and everything else needed to authenticate with the API
an HTTP client that can be used to fetch a payload from the Withings API pre - loaded with authentication headers and everything else needed to authenticate with the API
#get