Module: Strava::Api::Config

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

Overview

Configuration module for the Strava API client.

This module manages configuration settings for the API client, including the API endpoint URL and access token for authentication.

Examples:

Configure the API client

Strava::Api.configure do |config|
  config.access_token = 'your_access_token_here'
end

Access current configuration

Strava::Api.config.endpoint
# => 'https://www.strava.com/api/v3'

Constant Summary collapse

ATTRIBUTES =

Returns List of configurable attributes.

Returns:

  • (Array<Symbol>)

    List of configurable attributes

%i[
  endpoint
  access_token
].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 access token.



39
40
41
42
# File 'lib/strava/api/config.rb', line 39

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