Method: FitbitAPI::Client#create_subscription

Defined in:
lib/fitbit_api/subscriptions.rb

#create_subscription(collection_path = nil, subscription_id) ⇒ Object

Creates a subscription to notify the application when a user has new data available.

Parameters:

  • collection_path (String) (defaults to: nil)

    Collection of data to retrieve notifications

  • subscription_id (Integer)

    The unique ID of the subscription created by the API client application



18
19
20
# File 'lib/fitbit_api/subscriptions.rb', line 18

def create_subscription(collection_path=nil, subscription_id)
  post("#{subscriptions_path(collection_path)}/#{subscription_id}.json")
end