WebhookClient
public class WebhookClient
An iOS client wrapper of the Cisco Webex Webhooks REST API .
Since
1.2.0-
Lists all webhooks of the authenticated user.
Since
1.2.0Declaration
Parameters
maxThe maximum number of webhooks in the response.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Posts a webhook for the authenticated user.
Since
1.2.0Declaration
Parameters
nameA user-friendly name for this webhook.
targetUrlThe URL that receives POST requests for each event.
resourceThe resource type for the webhook.
eventThe event type for the webhook.
filterThe filter that defines the webhook scope.
secretSecret use to generate payload signature
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Retrieves the details for a webhook by id.
Since
1.2.0Declaration
Parameters
webhookIdThe identifier of the webhook. (Derived parameter: Use
WebhookClient.list(...)to get a list of webhooks. Then useWebhook.idto get the webhookId of the webhook)queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Updates a webhook by id.
Since
1.4.0Declaration
Parameters
webhookIdThe identifier of the webhook. (Derived parameter: Use
WebhookClient.list(...)to get a list of webhooks. Then useWebhook.idto get the webhookId of the webhook)nameA user-friendly name for this webhook.
targetUrlThe URL that receives POST requests for each event.
secretThe secret used to generate payload signature.
statusThe status of the webhook. Use “active” to reactivate a disabled webhook.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Deletes a webhook by id.
Since
1.2.0Declaration
Swift
public func delete(webhookId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<Void>) -> Void)Parameters
webhookIdThe identifier of the webhook.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
webhookIdThe identifier of the webhook.
Return Value
Void
View on GitHub