Constructors
constructor
• new WebhooksClient(client): WebhooksClient
Creates a new webhooks client instance
Parameters
| Name | Type | Description | 
|---|---|---|
client | Client | The main X API client instance | 
Returns
WebhooksClient
Defined in
webhooks/client.ts:96Methods
getStreamLinks
▸ getStreamLinks():Promise<WebhookLinksGetResponse>
Get stream links
Get a list of webhook links associated with a filtered stream ruleset.
Returns
Promise<WebhookLinksGetResponse>
Promise resolving to the API response
Defined in
webhooks/client.ts:109createStreamLink
▸ createStreamLink(webhookId, options?): Promise<WebhookLinksCreateResponse>
Create stream link
Creates a link to deliver FilteredStream events to the given webhook.
Parameters
| Name | Type | Description | 
|---|---|---|
webhookId | string | The webhook ID to link to your FilteredStream ruleset. | 
options | CreateStreamLinkOptions | - | 
Returns
Promise<WebhookLinksCreateResponse>
Promise resolving to the API response
Defined in
webhooks/client.ts:145deleteStreamLink
▸ deleteStreamLink(webhookId): Promise<WebhookLinksDeleteResponse>
Delete stream link
Deletes a link from FilteredStream events to the given webhook.
Parameters
| Name | Type | Description | 
|---|---|---|
webhookId | string | The webhook ID to link to your FilteredStream ruleset. | 
Returns
Promise<WebhookLinksDeleteResponse>
Promise resolving to the API response
Defined in
webhooks/client.ts:225validate
▸ validate(webhookId): Promise<WebhookConfigPutResponse>
Validate webhook
Triggers a CRC check for a given webhook.
Parameters
| Name | Type | Description | 
|---|---|---|
webhookId | string | The ID of the webhook to check. | 
Returns
Promise<WebhookConfigPutResponse>
Promise resolving to the API response
Defined in
webhooks/client.ts:263delete
▸ delete(webhookId): Promise<WebhookConfigDeleteResponse>
Delete webhook
Deletes an existing webhook configuration.
Parameters
| Name | Type | Description | 
|---|---|---|
webhookId | string | The ID of the webhook to delete. | 
Returns
Promise<WebhookConfigDeleteResponse>
Promise resolving to the API response
Defined in
webhooks/client.ts:301get
▸ get(options?): Promise<Get2WebhooksResponse>
Get webhook
Get a list of webhook configs associated with a client app.
Parameters
| Name | Type | 
|---|---|
options | GetOptions | 
Returns
Promise<Get2WebhooksResponse>
Promise resolving to the API response
Defined in
webhooks/client.ts:335create
▸ create(options?): Promise<WebhookConfigCreateResponse>
Create webhook
Creates a new webhook configuration.
Parameters
| Name | Type | 
|---|---|
options | CreateOptions | 
Returns
Promise<WebhookConfigCreateResponse>
Promise resolving to the API response