Class: Infrawrench::DigestNamespace
- Inherits:
-
Object
- Object
- Infrawrench::DigestNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.digest
Instance Method Summary collapse
-
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's weekly digest settings.
-
#initialize(transport) ⇒ DigestNamespace
constructor
private
A new instance of DigestNamespace.
-
#post_org_org_id_digest_send(org_id: nil, request_options: nil) ⇒ Hash
Compose and send last week's digest now.
-
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Enable or disable the weekly digest.
Constructor Details
#initialize(transport) ⇒ DigestNamespace
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 DigestNamespace.
2389 2390 2391 |
# File 'lib/infrawrench/client.rb', line 2389 def initialize(transport) @transport = transport end |
Instance Method Details
#get(org_id: nil, request_options: nil) ⇒ Hash
Get the organization's weekly digest settings
The weekly digest is a Monday-morning summary of last week's spend (with week-over-week movers), sync incidents, and resource churn, delivered to the Slack channels and Teams webhooks opted into the weeklyDigest trigger.
GET /api/org/orgId/digest
2406 2407 2408 2409 2410 2411 2412 2413 |
# File 'lib/infrawrench/client.rb', line 2406 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/digest", path_params: { "orgId" => org_id }, request_options: ) end |
#post_org_org_id_digest_send(org_id: nil, request_options: nil) ⇒ Hash
Compose and send last week's digest now
Ignores the schedule and the enabled flag — composes the digest for the last complete week and posts it to every opted-in channel. Fails when no Slack channel or Teams webhook has the weeklyDigest trigger on.
POST /api/org/orgId/digest/send
Raises on 400: Bad request
2430 2431 2432 2433 2434 2435 2436 2437 |
# File 'lib/infrawrench/client.rb', line 2430 def post_org_org_id_digest_send(org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/digest/send", path_params: { "orgId" => org_id }, request_options: ) end |
#update(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Enable or disable the weekly digest
Enabling schedules the first digest for next Monday morning (07:00 UTC) rather than sending immediately — use POST /digest/send for an immediate one.
PUT /api/org/orgId/digest
Raises on 400: Bad request
2455 2456 2457 2458 2459 2460 2461 2462 2463 |
# File 'lib/infrawrench/client.rb', line 2455 def update(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/digest", path_params: { "orgId" => org_id }, body: body, request_options: ) end |