WebhookClient

class WebhookClient(val webhookId: String, client: RestClient) : RestClient(source)

A REST client for a specific webhook

Parameters

webhookId

The id of the webhook

client

The REST client implementation

Constructors

Link copied to clipboard
constructor(webhookId: String, client: RestClient)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun DELETE(majorPath: String, minorPath: String, rateKey: String, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
suspend fun deleteWebhook()

Delete this webhook.

suspend fun deleteWebhook(webhookToken: String)

Delete this webhook using the secure token.

Link copied to clipboard
suspend fun deleteWebhookMessage(webhookToken: String, messageId: String)

Deletes a message created by this webhook.

Link copied to clipboard
suspend fun execute(webhookToken: String, message: CreateWebhookMessage, waitForValidation: Boolean = true): Message

Execute the webhook.

Link copied to clipboard
open suspend override fun GET(majorPath: String, minorPath: String, rateKey: String, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
suspend fun getWebhook(): Webhook

Get this webhook.

suspend fun getWebhook(webhookToken: String): Webhook

Get this webhook using the secure token.

Link copied to clipboard
open suspend override fun PATCH(majorPath: String, minorPath: String, rateKey: String, omitNulls: Boolean, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
open suspend override fun POST(majorPath: String, minorPath: String, rateKey: String, omitNulls: Boolean, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
open suspend override fun PUT(majorPath: String, minorPath: String, rateKey: String, omitNulls: Boolean, block: HttpRequestBuilder.() -> Unit): HttpResponse
Link copied to clipboard
suspend fun update(webhook: PatchWebhook): Webhook

Update this webhook.

suspend fun update(webhook: PatchWebhook, webhookToken: String): Webhook

Update this webhook using the secure token.

Link copied to clipboard
suspend fun updateWebhookMessage(webhookToken: String, messageId: String, messageEdit: MessageEdit): Message
suspend fun updateWebhookMessage(webhookToken: String, messageId: String, messageEdit: PatchWebhookMessage): Message

Edit a message created by this webhook.