Module: CrunchApi::Default

Defined in:
lib/crunch-api/default.rb

Constant Summary collapse

ENDPOINT =
'https://crunch.co.uk'

Class Method Summary collapse

Class Method Details

.consumer_keyObject



10
11
12
# File 'lib/crunch-api/default.rb', line 10

def consumer_key
  ENV['CRUNCH_CONSUMER_KEY']
end

.consumer_secretObject



14
15
16
# File 'lib/crunch-api/default.rb', line 14

def consumer_secret
  ENV['CRUNCH_CONSUMER_SECRET']
end

.endpointObject



26
27
28
# File 'lib/crunch-api/default.rb', line 26

def endpoint
  ENDPOINT
end

.oauth_tokenObject



18
19
20
# File 'lib/crunch-api/default.rb', line 18

def oauth_token
  ENV['CRUNCH_OAUTH_TOKEN']
end

.oauth_token_secretObject



22
23
24
# File 'lib/crunch-api/default.rb', line 22

def oauth_token_secret
  ENV['CRUNCH_OAUTH_TOKEN_SECRET']
end

.optionsObject



6
7
8
# File 'lib/crunch-api/default.rb', line 6

def options
  Hash[CrunchApi.keys.map { |key| [key, send(key)] }]
end