Module: Strava::Webhooks::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/strava/webhooks/config.rb

Overview

Configuration module for the Webhooks client.

This module manages webhook-specific configuration settings including the API endpoint URL and application credentials (client ID and secret) required for managing webhook subscriptions.

Webhooks allow your application to receive real-time notifications when athletes create new activities or update their profile information.

Examples:

Configure Webhooks client

Strava::Webhooks.configure do |config|
  config.client_id = ENV['STRAVA_CLIENT_ID']
  config.client_secret = ENV['STRAVA_CLIENT_SECRET']
end

See Also:

Constant Summary collapse

ATTRIBUTES =

Returns List of configurable webhook attributes.

Returns:

  • (Array<Symbol>)

    List of configurable webhook attributes

%i[
  endpoint
  client_id
  client_secret
].freeze

Instance Method Summary collapse

Instance Method Details

#resetvoid

This method returns an undefined value.

Reset configuration to default values.

Sets the endpoint to the default Strava API v3 URL and clears the client credentials.



43
44
45
46
47
# File 'lib/strava/webhooks/config.rb', line 43

def reset
  self.endpoint = 'https://www.strava.com/api/v3'
  self.client_id = nil
  self.client_secret = nil
end