Module: Lessonly::Defaults

Included in:
Client
Defined in:
lib/lessonly/defaults.rb

Instance Method Summary collapse

Instance Method Details

#api_endpointObject



9
10
11
# File 'lib/lessonly/defaults.rb', line 9

def api_endpoint
  Lessonly.configuration.root_url
end

#api_keyObject



5
6
7
# File 'lib/lessonly/defaults.rb', line 5

def api_key
  Lessonly.configuration.api_key
end

#connection_optionsObject



25
26
27
28
29
30
31
32
# File 'lib/lessonly/defaults.rb', line 25

def connection_options
  {
    headers: {
      accept: media_type,
      user_agent: user_agent
    }
  }
end

#domainObject



13
14
15
# File 'lib/lessonly/defaults.rb', line 13

def domain
  Lessonly.configuration.domain
end

#media_typeObject



21
22
23
# File 'lib/lessonly/defaults.rb', line 21

def media_type
  'application/json'
end

#user_agentObject



17
18
19
# File 'lib/lessonly/defaults.rb', line 17

def user_agent
  "Lessonly Ruby Gem #{Lessonly::VERSION} made by Aptible"
end