Skip to main content

Submodules

Module contents

This module provides access to the account activity endpoints of the X API and serves as the main entry point for all account activity-related functionality.

class xdk.account_activity.AccountActivityClient

Client for account activity operations

Parameters

path.client
Client

__init__

Parameters

path.client
Client

create_replay_job

Create replay job Creates a replay job to retrieve activities from up to the past 5 days for all subscriptions associated with a given webhook.

Parameters

path.webhook_id
Any
The unique identifier for the webhook configuration.
path.from_date
str
The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in yyyymmddhhmm format.
path.to_date
str
The latest (ending) UTC timestamp (exclusive) up to which events will be provided, in yyyymmddhhmm format.

Returns

CreateReplayJobResponse - Response data

create_subscription

Create subscription Creates an Account Activity subscription for the user and the given webhook.

Parameters

path.webhook_id
Any
The webhook ID to check subscription against.
body.body
CreateSubscriptionRequest
Request body

delete_subscription

Delete subscription Deletes an Account Activity subscription for the given webhook and user ID.

Parameters

path.webhook_id
Any
The webhook ID to check subscription against.
path.user_id
Any
User ID to unsubscribe from.

Returns

DeleteSubscriptionResponse - Response data

get_subscription_count

Get subscription count Retrieves a count of currently active Account Activity subscriptions. :returns: Response data :rtype: GetSubscriptionCountResponse

Returns

GetSubscriptionCountResponse

get_subscriptions

Get subscriptions Retrieves a list of all active subscriptions for a given webhook.

Parameters

path.webhook_id
Any
The webhook ID to pull subscriptions for.

Returns

GetSubscriptionsResponse - Response data

validate_subscription

Validate subscription Checks a user’s Account Activity subscription for a given webhook.

Parameters

path.webhook_id
Any
The webhook ID to check subscription against.

Returns

ValidateSubscriptionResponse - Response data