Class: Datadog::CI::Transport::Api::Agentless
- Defined in:
- lib/datadog/ci/transport/api/agentless.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #api_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
- #citestcycle_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
-
#initialize(api_key:, citestcycle_url:, api_url:) ⇒ Agentless
constructor
A new instance of Agentless.
Methods inherited from Base
Constructor Details
#initialize(api_key:, citestcycle_url:, api_url:) ⇒ Agentless
Returns a new instance of Agentless.
13 14 15 16 17 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 13 def initialize(api_key:, citestcycle_url:, api_url:) @api_key = api_key @citestcycle_http = build_http_client(citestcycle_url, compress: true) @api_http = build_http_client(api_url, compress: false) end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
11 12 13 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 11 def api_key @api_key end |
Instance Method Details
#api_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
25 26 27 28 29 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 25 def api_request(path:, payload:, headers: {}, verb: "post") super perform_request(@api_http, path: path, payload: payload, headers: headers, verb: verb) end |
#citestcycle_request(path:, payload:, headers: {}, verb: "post") ⇒ Object
19 20 21 22 23 |
# File 'lib/datadog/ci/transport/api/agentless.rb', line 19 def citestcycle_request(path:, payload:, headers: {}, verb: "post") super perform_request(@citestcycle_http, path: path, payload: payload, headers: headers, verb: verb) end |