lib/fitgem/notifications.rb
def make_headers(opts)
      headers = {}
      if opts[:subscriber_id]
        headers['X-Fitbit-Subscriber-Id'] = opts[:subscriber_id]
      end
      headers
    end
# Create the headers hash for subscription management calls
#
# This method both adds approriate headers given what is in the
# options hash, as well as removes extraneous hash entries that are
# not needed in the headers of the request sent to the API.
#
# @param [Hash] opts The options for header creation
# @option opts [String] :subscriber_id The subscriber id of the client
#   application, created via {http://dev.fitbit.com}
# @return [Hash] The headers has to pass to the get/post/put/delete
#   methods
Create the headers hash for subscription management calls
This method both adds approriate headers given what is in the
options hash, as well as removes extraneous hash entries that are
not needed in the headers of the request sent to the API.
Create the headers hash for subscription management calls This method both adds approriate headers given what is in the options hash as well as removes extraneous hash entries that are not needed in the headers of the request sent to the API .
def make_headers(opts)
      headers = {}
      if opts[:subscriber_id]
        headers['X-Fitbit-Subscriber-Id'] = opts[:subscriber_id]
      end
      headers
    end
def make_headers ( opts ) headers = { } if opts [ :subscriber_id ] headers [ 'X-Fitbit-Subscriber-Id' ] = opts [ :subscriber_id ] end headers end
Create the headers hash for subscription management calls
This method both adds approriate headers given what is in the
options hash, as well as removes extraneous hash entries that are
not needed in the headers of the request sent to the API.
Create the headers hash for subscription management calls This method both adds approriate headers given what is in the options hash as well as removes extraneous hash entries that are not needed in the headers of the request sent to the API .
The headers has to pass to the get/post/put/delete methods
The headers has to pass to the get / post / put / delete methods
Hash
opts
None
opts The options for header creation
opts The options for header creation