Class: Buildkite::Agent
- Defined in:
- lib/buildkite/models/agent.rb
Class Method Summary collapse
- .list(org: Buildkite.config.org) ⇒ Object
- .retrieve(org: Buildkite.config.org, id:) ⇒ Object
- .stop(org: Buildkite.config.org, id:, **args) ⇒ Object
Methods inherited from Object
Constructor Details
This class inherits a constructor from Buildkite::Object
Class Method Details
.list(org: Buildkite.config.org) ⇒ Object
6 7 8 9 |
# File 'lib/buildkite/models/agent.rb', line 6 def list(org: Buildkite.config.org) response = Client.get_request("organizations/#{org}/agents") Collection.from_response(response, type: Agent) end |
.retrieve(org: Buildkite.config.org, id:) ⇒ Object
11 12 13 14 |
# File 'lib/buildkite/models/agent.rb', line 11 def retrieve(org: Buildkite.config.org, id:) response = Client.get_request("organizations/#{org}/agents/#{id}") Agent.new response.body end |
.stop(org: Buildkite.config.org, id:, **args) ⇒ Object
16 17 18 |
# File 'lib/buildkite/models/agent.rb', line 16 def stop(org: Buildkite.config.org, id:, **args) Client.put_request("organizations/#{org}/agents/#{id}/stop", body: args) end |