Class: Productive::Base

Inherits:
JsonApiClient::Resource
  • Object
show all
Defined in:
lib/productive/resources/base.rb

Class Method Summary collapse

Class Method Details

.connection_options_setup(config) ⇒ Object



13
14
15
# File 'lib/productive/resources/base.rb', line 13

def self.connection_options_setup(config)
  self.connection_options = { headers: { 'X-Auth-Token' => config.api_key } }
end

.paginator_setup(config) ⇒ Object



17
18
19
# File 'lib/productive/resources/base.rb', line 17

def self.paginator_setup(config)
  self.paginator = config.paginator
end

.setup(config) ⇒ Object



3
4
5
6
7
# File 'lib/productive/resources/base.rb', line 3

def self.setup(config)
  site_setup config
  connection_options_setup config
  paginator_setup config
end

.site_setup(config) ⇒ Object



9
10
11
# File 'lib/productive/resources/base.rb', line 9

def self.site_setup(config)
  self.site = File.join config.base_url, '/'
end