Class: CIRunner::Client::CircleCI

Inherits:
Base
  • Object
show all
Defined in:
lib/ci_runner/client/circle_ci.rb

Constant Summary collapse

API_ENDPOINT =
"circleci.com"

Instance Method Summary collapse

Methods inherited from Base

default_client, #initialize

Constructor Details

This class inherits a constructor from CIRunner::Client::Base

Instance Method Details

#job(repository, build_number) ⇒ Object

Parameters:

  • repository (String)

    The full repository name including the owner (rails/rails).

  • build_number (Integer)

    The CircleCI build number.

See Also:



24
25
26
27
28
# File 'lib/ci_runner/client/circle_ci.rb', line 24

def job(repository, build_number)
  get("/api/v1.1/project/github/#{repository}/#{build_number}")
rescue Error => e
  reraise_with_reason(e)
end

#meHash

Make an API request to get the authenticated user. Used to verify if the access token the user has stored in its config is valid.

Returns:

  • (Hash)

    See Circle CI documentation.

See Also:



16
17
18
# File 'lib/ci_runner/client/circle_ci.rb', line 16

def me
  get("/api/v1.1/me")
end