Class: Jiminy::Reporting::CIProviders::CircleCI::APIRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/jiminy/reporting/ci_providers/circle_ci/api_request.rb

Constant Summary collapse

API_BASE =
"https://circleci.com/api/v2/"
CIRCLE_TOKEN_HEADER =
"Circle-Token"

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ APIRequest

Returns a new instance of APIRequest.



12
13
14
# File 'lib/jiminy/reporting/ci_providers/circle_ci/api_request.rb', line 12

def initialize(path)
  @url = URI.join(API_BASE, path)
end

Instance Method Details

#perform!Object



16
17
18
19
# File 'lib/jiminy/reporting/ci_providers/circle_ci/api_request.rb', line 16

def perform!
  Jiminy.logger.debug { "API request: #@url" }
  response
end