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:162Methods
createStreamLink
▸ createStreamLink(webhookId, options): Promise<Response>
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 & { requestOptions: { raw: true } } | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:207 ▸ createStreamLink(webhookId, options?): Promise<WebhookLinksCreateResponse>
Parameters
| Name | Type |
|---|---|
webhookId | string |
options? | CreateStreamLinkOptions |
Returns
Promise<WebhookLinksCreateResponse>
Defined in
webhooks/client.ts:220deleteStreamLink
▸ deleteStreamLink(webhookId, options): Promise<Response>
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. |
options | Object | - |
options.requestOptions | Object | - |
options.requestOptions.raw | true | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:433 ▸ deleteStreamLink(webhookId): Promise<WebhookLinksDeleteResponse>
Parameters
| Name | Type |
|---|---|
webhookId | string |
Returns
Promise<WebhookLinksDeleteResponse>
Defined in
webhooks/client.ts:446getStreamLinks
▸ getStreamLinks(options): Promise<Response>
Get stream links
Get a list of webhook links associated with a filtered stream ruleset.
Parameters
| Name | Type |
|---|---|
options | Object |
options.requestOptions | Object |
options.requestOptions.raw | true |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:527 ▸ getStreamLinks():Promise<WebhookLinksGetResponse>
Returns
Promise<WebhookLinksGetResponse>
Defined in
webhooks/client.ts:536createWebhookReplayJob
▸ createWebhookReplayJob(options): Promise<Response>
Create replay job for webhook
Creates a replay job to retrieve events from up to the past 24 hours for all events delivered or attempted to be delivered to the webhook.
Parameters
| Name | Type |
|---|---|
options | CreateWebhookReplayJobOptions & { requestOptions: { raw: true } } |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:605 ▸ createWebhookReplayJob(options?): Promise<ReplayJobCreateResponse>
Parameters
| Name | Type |
|---|---|
options? | CreateWebhookReplayJobOptions |
Returns
Promise<ReplayJobCreateResponse>
Defined in
webhooks/client.ts:614validate
▸ validate(webhookId, options): Promise<Response>
Validate webhook
Triggers a CRC check for a given webhook.
Parameters
| Name | Type | Description |
|---|---|---|
webhookId | string | The ID of the webhook to check. |
options | Object | - |
options.requestOptions | Object | - |
options.requestOptions.raw | true | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:704 ▸ validate(webhookId): Promise<WebhookConfigPutResponse>
Parameters
| Name | Type |
|---|---|
webhookId | string |
Returns
Promise<WebhookConfigPutResponse>
Defined in
webhooks/client.ts:717delete
▸ delete(webhookId, options): Promise<Response>
Delete webhook
Deletes an existing webhook configuration.
Parameters
| Name | Type | Description |
|---|---|---|
webhookId | string | The ID of the webhook to delete. |
options | Object | - |
options.requestOptions | Object | - |
options.requestOptions.raw | true | - |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:808 ▸ delete(webhookId): Promise<WebhookConfigDeleteResponse>
Parameters
| Name | Type |
|---|---|
webhookId | string |
Returns
Promise<WebhookConfigDeleteResponse>
Defined in
webhooks/client.ts:821get
▸ get(options): Promise<Response>
Get webhook
Get a list of webhook configs associated with a client app.
Parameters
| Name | Type |
|---|---|
options | GetOptions & { requestOptions: { raw: true } } |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:908 ▸ get(options?): Promise<Get2WebhooksResponse>
Parameters
| Name | Type |
|---|---|
options? | GetOptions |
Returns
Promise<Get2WebhooksResponse>
Defined in
webhooks/client.ts:917create
▸ create(options): Promise<Response>
Create webhook
Creates a new webhook configuration.
Parameters
| Name | Type |
|---|---|
options | CreateOptions & { requestOptions: { raw: true } } |
Returns
Promise<Response>
Promise resolving to the API response, or raw Response if requestOptions.raw is true
Defined in
webhooks/client.ts:1023 ▸ create(options?): Promise<WebhookConfigCreateResponse>
Parameters
| Name | Type |
|---|---|
options? | CreateOptions |
Returns
Promise<WebhookConfigCreateResponse>