Class: Infrawrench::OnCallNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs

Overview

client.on_call

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ OnCallNamespace

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of OnCallNamespace.

Parameters:



10813
10814
10815
10816
10817
# File 'lib/infrawrench/client.rb', line 10813

def initialize(transport)
  @transport = transport
  @overrides = OnCallOverridesNamespace.new(@transport)
  @schedules = OnCallSchedulesNamespace.new(@transport)
end

Instance Attribute Details

#overridesOnCallOverridesNamespace (readonly)

Returns client.on_call.overrides.

Returns:



10807
10808
10809
# File 'lib/infrawrench/client.rb', line 10807

def overrides
  @overrides
end

#schedulesOnCallSchedulesNamespace (readonly)

Returns client.on_call.schedules.

Returns:



10809
10810
10811
# File 'lib/infrawrench/client.rb', line 10809

def schedules
  @schedules
end

Instance Method Details

#now(org_id: nil, request_options: nil) ⇒ Hash

Who is on call right now

One entry per rotation: the shift in effect, and the next person in the rotation. Takes team:read — knowing who is on call is something every member needs and nobody should have to ask an admin for.

GET /api/org/orgId/on-call/now

Parameters:

  • org_id (String, nil) (defaults to: nil)

    Organization id. Defaults to the org_id the client was constructed with.

  • request_options (Hash, nil) (defaults to: nil)

    Per-call :headers, :timeout and :open_timeout.

  • org_id: (String, nil) (defaults to: nil)
  • request_options: (Hash[Symbol, untyped], nil) (defaults to: nil)

Returns:

  • (Hash)

    Parsed JSON, shaped as OnCallNowResponse — see sig/infrawrench/sdk.rbs.

Raises:



10832
10833
10834
10835
10836
10837
10838
10839
# File 'lib/infrawrench/client.rb', line 10832

def now(org_id: nil, request_options: nil)
  @transport.request(
    http_method: "GET",
    path: "/api/org/{orgId}/on-call/now",
    path_params: { "orgId" => org_id },
    request_options: request_options
  )
end