Skip to main content

하위 모듈

모듈 내용

이 모듈은 X API의 activity 엔드포인트에 대한 액세스를 제공합니다. 모든 activity-related 기능의 주요 진입점 역할을 합니다.

class xdk.activity.ActivityClient

Streaming Client for activity operations

매개변수

Client

__init__

매개변수

Client

create_subscription

Create X activity subscription Creates a subscription for an X activity event body: 요청 본문 :returns: 응답 데이터 :rtype: CreateSubscriptionResponse

매개변수

CreateSubscriptionRequest

delete_subscription

Deletes X activity subscription Deletes a subscription for an X activity event

매개변수

Any
The ID of the subscription to delete.

반환값

DeleteSubscriptionResponse - 응답 데이터

get_subscriptions

Get X activity subscriptions Get a list of active subscriptions for XAA :returns: 응답 데이터 :rtype: GetSubscriptionsResponse

반환값

GetSubscriptionsResponse

stream

Activity Stream (Streaming) Stream of X Activities This is a streaming endpoint that yields data in real-time as it becomes available. Each yielded item represents a single data point from the stream. The connection is automatically managed with exponential backoff retry logic. If the stream disconnects, the SDK will automatically reconnect without client intervention.

매개변수

int or None
default:"None"
The number of minutes of backfill requested.
str or None
default:"None"
YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided.
str or None
default:"None"
YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided.
StreamConfig
Optional StreamConfig for customizing retry behavior, timeouts, and callbacks.

update_subscription

Update X activity subscription Updates a subscription for an X activity event

매개변수

Any
The ID of the subscription to update.
UpdateSubscriptionRequest
요청 본문