Module: ActiveProject::Adapters::Trello::Connection

Includes:
Connections::Rest
Included in:
ActiveProject::Adapters::TrelloAdapter
Defined in:
lib/active_project/adapters/trello/connection.rb

Constant Summary collapse

BASE_URL =
"https://api.trello.com/1/"

Constants included from Connections::HttpClient

Connections::HttpClient::DEFAULT_HEADERS, Connections::HttpClient::DEFAULT_RETRY_OPTS

Instance Attribute Summary

Attributes included from Connections::HttpClient

#connection, #last_response

Instance Method Summary collapse

Methods included from Connections::Rest

#init_rest, #request_rest

Methods included from Connections::Pagination

#each_edge, #each_page

Methods included from Connections::HttpClient

#build_connection, #request

Methods included from Connections::Base

#parse_link_header

Instance Method Details

#initialize(config:) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/active_project/adapters/trello/connection.rb', line 11

def initialize(config:)
  super(config: config)
  init_rest(
    base_url: BASE_URL,
    auth_middleware: ->(_c) { }, # Trello uses query-string auth
    extra_headers: { "Accept" => "application/json" }
  )
end