Class: Trello::Api::Integration

Inherits:
Base
  • Object
show all
Extended by:
TrelloConfig
Defined in:
lib/trello/api/integration.rb

Class Method Summary collapse

Methods included from TrelloConfig

__config_dir__, config, param_check, save_config

Class Method Details

.default_headersObject



6
7
8
# File 'lib/trello/api/integration.rb', line 6

def default_headers
  {'Authorization' => "token #{config.api_key}"}
end

.make_call(method, endpoint, body = {}, headers = {}) ⇒ Object



10
11
12
13
# File 'lib/trello/api/integration.rb', line 10

def make_call(method, endpoint, body = {}, headers = {})
  param_check 'url', "You need to specify where your API backend is hosted with 'trello config --url <API URL>'."
  super(method, "#{config['url']}#{endpoint}", body, headers.merge(default_headers))
end