Class: Infrawrench::CalendarSubscriptionsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::CalendarSubscriptionsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.calendar.subscriptions
Instance Method Summary collapse
-
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Mint an iCalendar subscription URL.
-
#delete(subscription_id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke an iCalendar subscription.
-
#get(org_id: nil, request_options: nil) ⇒ Hash
List the organization's iCalendar subscriptions.
-
#initialize(transport) ⇒ CalendarSubscriptionsNamespace
constructor
private
A new instance of CalendarSubscriptionsNamespace.
Constructor Details
#initialize(transport) ⇒ CalendarSubscriptionsNamespace
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 CalendarSubscriptionsNamespace.
2850 2851 2852 |
# File 'lib/infrawrench/client.rb', line 2850 def initialize(transport) @transport = transport end |
Instance Method Details
#create(org_id: nil, body: nil, request_options: nil) ⇒ Hash
Mint an iCalendar subscription URL
Returns the only copy of the feed URL. The token in it is 32 random bytes, stored as a SHA-256 hash, and is the sole credential on a route that runs outside every auth layer — treat the URL as a secret. The URL deliberately contains no organization id.
An organization may hold 25 live subscriptions; revoking makes room.
POST /api/org/orgId/calendar/subscriptions
Raises on 400: Bad request
2874 2875 2876 2877 2878 2879 2880 2881 2882 |
# File 'lib/infrawrench/client.rb', line 2874 def create(org_id: nil, body: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/calendar/subscriptions", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(subscription_id:, org_id: nil, request_options: nil) ⇒ Hash
Revoke an iCalendar subscription
The URL stops working immediately. The row is kept, and revoking twice is not an error.
DELETE /api/org/orgId/calendar/subscriptions/subscriptionId
Raises on 404: Not found
2900 2901 2902 2903 2904 2905 2906 2907 |
# File 'lib/infrawrench/client.rb', line 2900 def delete(subscription_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/calendar/subscriptions/{subscriptionId}", path_params: { "orgId" => org_id, "subscriptionId" => subscription_id }, request_options: ) end |
#get(org_id: nil, request_options: nil) ⇒ Hash
List the organization's iCalendar subscriptions
Feed URLs that have been minted, including revoked ones — a revoked row is kept so the audit trail still resolves. The token itself is never returned.
GET /api/org/orgId/calendar/subscriptions
2923 2924 2925 2926 2927 2928 2929 2930 |
# File 'lib/infrawrench/client.rb', line 2923 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/calendar/subscriptions", path_params: { "orgId" => org_id }, request_options: ) end |