Class: GitFit::Auth::GarminToken

Inherits:
Object
  • Object
show all
Defined in:
lib/git_fit/auth/garmin_token.rb

Overview

Garmin token facade. Ported from workouts-cli (lib/workouts/auth/garmin_token.rb).

Builds the appropriate sync adapter, authenticates, and returns the access token + domain for programmatic use (e.g. future migrate commands, CI token checks).

Class Method Summary collapse

Class Method Details

.for_cn(config) ⇒ Object



16
17
18
# File 'lib/git_fit/auth/garmin_token.rb', line 16

def self.for_cn(config)
  authenticate_with(GitFit::Sync::GarminCN, config, 'garmin.cn')
end

.for_intl(config) ⇒ Object



12
13
14
# File 'lib/git_fit/auth/garmin_token.rb', line 12

def self.for_intl(config)
  authenticate_with(GitFit::Sync::GarminCom, config, 'garmin.com')
end