From ba789f2b96fb8de48c908fd3cc50d8a9d49e9ca2 Mon Sep 17 00:00:00 2001 From: Taylor Caldwell <169854908+tcaldwell-x@users.noreply.github.com> Date: Tue, 24 Nov 2026 16:12:51 -0800 Subject: [PATCH] feat(xdks): revamp SDK docs for Python, TypeScript, Java & C# with OpenAPI code samples overlay --- .github/workflows/update-docs.yml | 96 +- .github/workflows/validate-docs.yml | 27 + .well-known/llms.txt | 4 +- AGENT.md | 6 +- AGENTS.md | 6 +- docs.json | 1583 ++- .../getting-started/important-resources.mdx | 6 +- .../make-your-first-request.mdx | 6 +- enterprise-api/introduction.mdx | 17 +- .../oauth-2-0/oauth-1-0a-token-exchange.mdx | 16 +- important-resources.mdx | 6 +- llms.txt | 4 +- make-your-first-request.mdx | 6 +- overlays/xdk-code-samples.json | 8746 +++++++++++++++++ overview.mdx | 4 +- tools-and-libraries.mdx | 103 +- tools/csharp-xdk.mdx | 146 + tools/java-xdk.mdx | 152 + tools/llms-txt.mdx | 2 +- tools/python-xdk.mdx | 74 +- tools/typescript-xdk.mdx | 103 +- x-api/introduction.mdx | 17 +- xchat/getting-started.mdx | 2 +- xchat/introduction.mdx | 2 +- xchat/xchat-xdk.mdx | 2 +- xdks/csharp/authentication.mdx | 97 + xdks/csharp/install.mdx | 62 + xdks/csharp/llms.txt | 40 + xdks/csharp/overview.mdx | 70 + xdks/csharp/pagination.mdx | 61 + xdks/csharp/quickstart.mdx | 58 + .../reference/clients/account-activity.mdx | 176 + xdks/csharp/reference/clients/account.mdx | 72 + xdks/csharp/reference/clients/activity.mdx | 199 + xdks/csharp/reference/clients/articles.mdx | 78 + xdks/csharp/reference/clients/bots.mdx | 232 + xdks/csharp/reference/clients/broadcasts.mdx | 1554 +++ xdks/csharp/reference/clients/calls.mdx | 438 + xdks/csharp/reference/clients/chat.mdx | 1844 ++++ xdks/csharp/reference/clients/communities.mdx | 107 + .../reference/clients/community-notes.mdx | 239 + xdks/csharp/reference/clients/compliance.mdx | 270 + xdks/csharp/reference/clients/connections.mdx | 161 + .../reference/clients/direct-messages.mdx | 467 + xdks/csharp/reference/clients/general.mdx | 39 + xdks/csharp/reference/clients/lists.mdx | 425 + xdks/csharp/reference/clients/media.mdx | 706 ++ xdks/csharp/reference/clients/news.mdx | 101 + xdks/csharp/reference/clients/posts.mdx | 996 ++ xdks/csharp/reference/clients/spaces.mdx | 359 + xdks/csharp/reference/clients/stream.mdx | 1109 +++ xdks/csharp/reference/clients/trends.mdx | 129 + xdks/csharp/reference/clients/usage.mdx | 79 + xdks/csharp/reference/clients/users.mdx | 2291 +++++ xdks/csharp/reference/clients/webhooks.mdx | 271 + xdks/csharp/reference/overview.mdx | 79 + xdks/csharp/streaming.mdx | 59 + xdks/java/authentication.mdx | 92 + xdks/java/install.mdx | 52 + xdks/java/llms.txt | 40 + xdks/java/overview.mdx | 71 + xdks/java/pagination.mdx | 60 + xdks/java/quickstart.mdx | 61 + .../reference/clients/account-activity.mdx | 166 + xdks/java/reference/clients/account.mdx | 68 + xdks/java/reference/clients/activity.mdx | 188 + xdks/java/reference/clients/articles.mdx | 74 + xdks/java/reference/clients/bots.mdx | 223 + xdks/java/reference/clients/broadcasts.mdx | 1470 +++ xdks/java/reference/clients/calls.mdx | 420 + xdks/java/reference/clients/chat.mdx | 1758 ++++ xdks/java/reference/clients/communities.mdx | 102 + .../reference/clients/community-notes.mdx | 227 + xdks/java/reference/clients/compliance.mdx | 258 + xdks/java/reference/clients/connections.mdx | 152 + .../reference/clients/direct-messages.mdx | 446 + xdks/java/reference/clients/general.mdx | 37 + xdks/java/reference/clients/lists.mdx | 407 + xdks/java/reference/clients/media.mdx | 672 ++ xdks/java/reference/clients/news.mdx | 97 + xdks/java/reference/clients/posts.mdx | 956 ++ xdks/java/reference/clients/spaces.mdx | 345 + xdks/java/reference/clients/stream.mdx | 1072 ++ xdks/java/reference/clients/trends.mdx | 123 + xdks/java/reference/clients/usage.mdx | 75 + xdks/java/reference/clients/users.mdx | 2189 +++++ xdks/java/reference/clients/webhooks.mdx | 257 + xdks/java/reference/overview.mdx | 77 + xdks/java/streaming.mdx | 57 + xdks/llms.txt | 48 +- xdks/overview.mdx | 147 + xdks/python/install.mdx | 82 +- xdks/python/llms.txt | 110 +- xdks/python/overview.mdx | 66 +- .../reference/clients/account-activity.mdx | 161 + xdks/python/reference/clients/account.mdx | 66 + xdks/python/reference/clients/activity.mdx | 181 + xdks/python/reference/clients/articles.mdx | 74 + xdks/python/reference/clients/bots.mdx | 213 + xdks/python/reference/clients/broadcasts.mdx | 1421 +++ xdks/python/reference/clients/calls.mdx | 411 + xdks/python/reference/clients/chat.mdx | 1719 ++++ xdks/python/reference/clients/communities.mdx | 99 + .../reference/clients/community-notes.mdx | 220 + xdks/python/reference/clients/compliance.mdx | 252 + xdks/python/reference/clients/connections.mdx | 144 + .../reference/clients/direct-messages.mdx | 433 + xdks/python/reference/clients/general.mdx | 36 + xdks/python/reference/clients/lists.mdx | 392 + xdks/python/reference/clients/media.mdx | 646 ++ xdks/python/reference/clients/news.mdx | 95 + xdks/python/reference/clients/posts.mdx | 925 ++ xdks/python/reference/clients/spaces.mdx | 335 + xdks/python/reference/clients/stream.mdx | 1008 ++ xdks/python/reference/clients/trends.mdx | 120 + xdks/python/reference/clients/usage.mdx | 73 + xdks/python/reference/clients/users.mdx | 2106 ++++ xdks/python/reference/clients/webhooks.mdx | 247 + xdks/python/reference/index.mdx | 14 - xdks/python/reference/modules.mdx | 117 - xdks/python/reference/overview.mdx | 79 + .../reference/xdk.account_activity.client.mdx | 120 - .../python/reference/xdk.account_activity.mdx | 150 - .../reference/xdk.account_activity.models.mdx | 44 - xdks/python/reference/xdk.activity.client.mdx | 105 - xdks/python/reference/xdk.activity.mdx | 131 - xdks/python/reference/xdk.activity.models.mdx | 50 - xdks/python/reference/xdk.client.mdx | 132 - .../reference/xdk.communities.client.mdx | 72 - xdks/python/reference/xdk.communities.mdx | 88 - .../reference/xdk.communities.models.mdx | 28 - .../reference/xdk.community_notes.client.mdx | 139 - xdks/python/reference/xdk.community_notes.mdx | 168 - .../reference/xdk.community_notes.models.mdx | 50 - .../reference/xdk.compliance.client.mdx | 76 - xdks/python/reference/xdk.compliance.mdx | 97 - .../reference/xdk.compliance.models.mdx | 42 - .../reference/xdk.connections.client.mdx | 33 - xdks/python/reference/xdk.connections.mdx | 46 - .../reference/xdk.connections.models.mdx | 24 - .../reference/xdk.direct_messages.client.mdx | 251 - xdks/python/reference/xdk.direct_messages.mdx | 291 - .../reference/xdk.direct_messages.models.mdx | 62 - xdks/python/reference/xdk.general.client.mdx | 33 - xdks/python/reference/xdk.general.mdx | 46 - xdks/python/reference/xdk.general.models.mdx | 24 - xdks/python/reference/xdk.lists.client.mdx | 242 - xdks/python/reference/xdk.lists.mdx | 285 - xdks/python/reference/xdk.lists.models.mdx | 66 - xdks/python/reference/xdk.mdx | 853 -- xdks/python/reference/xdk.media.client.mdx | 200 - xdks/python/reference/xdk.media.mdx | 255 - xdks/python/reference/xdk.media.models.mdx | 74 - xdks/python/reference/xdk.news.client.mdx | 68 - xdks/python/reference/xdk.news.mdx | 84 - xdks/python/reference/xdk.news.models.mdx | 28 - xdks/python/reference/xdk.oauth1_auth.mdx | 174 - xdks/python/reference/xdk.oauth2_auth.mdx | 164 - xdks/python/reference/xdk.paginator.mdx | 77 - xdks/python/reference/xdk.posts.client.mdx | 639 -- xdks/python/reference/xdk.posts.mdx | 701 -- xdks/python/reference/xdk.posts.models.mdx | 94 - xdks/python/reference/xdk.spaces.client.mdx | 232 - xdks/python/reference/xdk.spaces.mdx | 260 - xdks/python/reference/xdk.spaces.models.mdx | 44 - xdks/python/reference/xdk.stream.client.mdx | 708 -- xdks/python/reference/xdk.stream.mdx | 768 -- xdks/python/reference/xdk.stream.models.mdx | 88 - xdks/python/reference/xdk.streaming.mdx | 154 - xdks/python/reference/xdk.trends.client.mdx | 79 - xdks/python/reference/xdk.trends.mdx | 98 - xdks/python/reference/xdk.trends.models.mdx | 32 - xdks/python/reference/xdk.usage.client.mdx | 41 - xdks/python/reference/xdk.usage.mdx | 54 - xdks/python/reference/xdk.usage.models.mdx | 24 - xdks/python/reference/xdk.users.client.mdx | 1104 --- xdks/python/reference/xdk.users.mdx | 1242 --- xdks/python/reference/xdk.users.models.mdx | 172 - xdks/python/reference/xdk.webhooks.client.mdx | 156 - xdks/python/reference/xdk.webhooks.mdx | 194 - xdks/python/reference/xdk.webhooks.models.mdx | 62 - xdks/python/streaming.mdx | 7 +- xdks/typescript/install.mdx | 54 +- xdks/typescript/llms.txt | 147 +- xdks/typescript/overview.mdx | 99 +- xdks/typescript/quickstart.mdx | 51 + .../classes/AccountActivityClient.mdx | 295 - .../reference/classes/ActivityClient.mdx | 239 - .../typescript/reference/classes/ApiError.mdx | 55 - xdks/typescript/reference/classes/Client.mdx | 252 - .../reference/classes/CommunitiesClient.mdx | 119 - .../classes/CommunityNotesClient.mdx | 245 - .../reference/classes/ComplianceClient.mdx | 163 - .../reference/classes/ConnectionsClient.mdx | 111 - .../classes/DirectMessagesClient.mdx | 374 - .../reference/classes/EventPaginator.mdx | 377 - .../reference/classes/GeneralClient.mdx | 70 - .../reference/classes/HttpClient.mdx | 184 - .../reference/classes/ListsClient.mdx | 422 - .../reference/classes/MediaClient.mdx | 508 - .../reference/classes/NewsClient.mdx | 119 - .../reference/classes/Paginator.mdx | 355 - .../reference/classes/PostPaginator.mdx | 377 - .../reference/classes/PostsClient.mdx | 741 -- .../reference/classes/SpacesClient.mdx | 291 - .../reference/classes/StreamClient.mdx | 517 - .../reference/classes/TrendsClient.mdx | 119 - .../reference/classes/UsageClient.mdx | 74 - .../reference/classes/UserPaginator.mdx | 377 - .../reference/classes/UsersClient.mdx | 1695 ---- .../reference/classes/WebhooksClient.mdx | 368 - .../reference/clients/account-activity.mdx | 155 + xdks/typescript/reference/clients/account.mdx | 63 + .../typescript/reference/clients/activity.mdx | 171 + .../typescript/reference/clients/articles.mdx | 71 + xdks/typescript/reference/clients/bots.mdx | 201 + .../reference/clients/broadcasts.mdx | 1342 +++ xdks/typescript/reference/clients/calls.mdx | 387 + xdks/typescript/reference/clients/chat.mdx | 1611 +++ .../reference/clients/communities.mdx | 97 + .../reference/clients/community-notes.mdx | 211 + .../reference/clients/compliance.mdx | 245 + .../reference/clients/connections.mdx | 139 + .../reference/clients/direct-messages.mdx | 415 + xdks/typescript/reference/clients/general.mdx | 35 + xdks/typescript/reference/clients/lists.mdx | 377 + xdks/typescript/reference/clients/media.mdx | 611 ++ xdks/typescript/reference/clients/news.mdx | 93 + xdks/typescript/reference/clients/posts.mdx | 905 ++ xdks/typescript/reference/clients/spaces.mdx | 329 + xdks/typescript/reference/clients/stream.mdx | 1019 ++ xdks/typescript/reference/clients/trends.mdx | 117 + xdks/typescript/reference/clients/usage.mdx | 71 + xdks/typescript/reference/clients/users.mdx | 2039 ++++ .../typescript/reference/clients/webhooks.mdx | 237 + .../reference/interfaces/ApiResponse.mdx | 40 - .../reference/interfaces/ClientConfig.mdx | 49 - .../interfaces/HttpClientRequestOptions.mdx | 22 - .../reference/interfaces/HttpResponse.mdx | 31 - .../interfaces/PaginatedResponse.mdx | 50 - .../reference/interfaces/PaginationMeta.mdx | 29 - .../reference/interfaces/RequestOptions.mdx | 39 - .../Schemas.ActivityStreamingResponse.mdx | 15 - .../Schemas.ActivitySubscription.mdx | 30 - ...emas.ActivitySubscriptionCreateRequest.mdx | 21 - ...mas.ActivitySubscriptionCreateResponse.mdx | 18 - ...mas.ActivitySubscriptionDeleteResponse.mdx | 18 - .../Schemas.ActivitySubscriptionFilter.mdx | 15 - ...chemas.ActivitySubscriptionGetResponse.mdx | 18 - ...emas.ActivitySubscriptionUpdateRequest.mdx | 15 - ...mas.ActivitySubscriptionUpdateResponse.mdx | 12 - .../Schemas.AddOrDeleteRulesResponse.mdx | 18 - .../interfaces/Schemas.AddRulesRequest.mdx | 12 - .../Schemas.AllowDownloadStatus.mdx | 12 - .../reference/interfaces/Schemas.AltText.mdx | 12 - .../interfaces/Schemas.Analytics.mdx | 15 - .../interfaces/Schemas.AppRulesCount.mdx | 15 - .../interfaces/Schemas.AudiencePolicy.mdx | 15 - .../interfaces/Schemas.BookmarkAddRequest.mdx | 12 - .../Schemas.BookmarkFolderPostsResponse.mdx | 18 - .../Schemas.BookmarkFoldersResponse.mdx | 18 - .../Schemas.BookmarkMutationResponse.mdx | 15 - .../interfaces/Schemas.CashtagFields.mdx | 12 - .../interfaces/Schemas.ClientAppUsage.mdx | 18 - .../interfaces/Schemas.Community.mdx | 18 - .../interfaces/Schemas.ComplianceJob.mdx | 36 - .../interfaces/Schemas.Connection.mdx | 24 - .../interfaces/Schemas.ContentExpiration.mdx | 12 - .../interfaces/Schemas.ContextAnnotation.mdx | 15 - .../Schemas.ContextAnnotationDomainFields.mdx | 18 - .../Schemas.ContextAnnotationEntityFields.mdx | 18 - ...chemas.CreateAttachmentsMessageRequest.mdx | 15 - .../Schemas.CreateComplianceJobRequest.mdx | 18 - .../Schemas.CreateComplianceJobResponse.mdx | 15 - .../Schemas.CreateDmConversationRequest.mdx | 18 - .../Schemas.CreateDmEventResponse.mdx | 15 - .../interfaces/Schemas.CreateNoteRequest.mdx | 18 - .../interfaces/Schemas.CreateNoteResponse.mdx | 15 - .../Schemas.CreateTextMessageRequest.mdx | 15 - .../interfaces/Schemas.DeleteDmResponse.mdx | 15 - .../interfaces/Schemas.DeleteNoteResponse.mdx | 15 - .../interfaces/Schemas.DeleteRulesRequest.mdx | 12 - .../reference/interfaces/Schemas.DmEvent.mdx | 48 - .../interfaces/Schemas.DmMediaAttachment.mdx | 12 - .../interfaces/Schemas.DomainRestrictions.mdx | 12 - .../interfaces/Schemas.Engagement.mdx | 15 - ...chemas.EntityIndicesInclusiveExclusive.mdx | 15 - ...chemas.EntityIndicesInclusiveInclusive.mdx | 15 - .../reference/interfaces/Schemas.Error.mdx | 15 - .../Schemas.EvaluateNoteRequest.mdx | 15 - .../Schemas.EvaluateNoteResponse.mdx | 15 - .../interfaces/Schemas.Expansions.mdx | 27 - ...Schemas.FilteredStreamingTweetResponse.mdx | 21 - .../Schemas.FollowActivityResponsePayload.mdx | 15 - .../interfaces/Schemas.FoundMediaOrigin.mdx | 15 - .../interfaces/Schemas.FullTextEntities.mdx | 24 - .../reference/interfaces/Schemas.Geo.mdx | 21 - .../Schemas.Get2CommunitiesIdResponse.mdx | 15 - .../Schemas.Get2CommunitiesSearchResponse.mdx | 18 - .../Schemas.Get2ComplianceJobsIdResponse.mdx | 15 - .../Schemas.Get2ComplianceJobsResponse.mdx | 18 - .../Schemas.Get2ConnectionsResponse.mdx | 18 - ....Get2DmConversationsIdDmEventsResponse.mdx | 21 - ...tionsWithParticipantIdDmEventsResponse.mdx | 21 - .../Schemas.Get2DmEventsEventIdResponse.mdx | 18 - .../Schemas.Get2DmEventsResponse.mdx | 21 - ...et2FdxAccountsAccountidContactResponse.mdx | 15 - ...ountsAccountidPayment_networksResponse.mdx | 15 - ...hemas.Get2FdxAccountsAccountidResponse.mdx | 15 - ...xAccountsAccountidTransactionsResponse.mdx | 15 - ...chemas.Get2FdxCustomersCurrentResponse.mdx | 15 - .../Schemas.Get2Insights28hrResponse.mdx | 15 - ...Schemas.Get2InsightsHistoricalResponse.mdx | 15 - ...chemas.Get2LikesFirehoseStreamResponse.mdx | 18 - ...chemas.Get2LikesSample10StreamResponse.mdx | 18 - .../Schemas.Get2ListsIdFollowersResponse.mdx | 21 - .../Schemas.Get2ListsIdMembersResponse.mdx | 21 - .../Schemas.Get2ListsIdResponse.mdx | 18 - .../Schemas.Get2ListsIdTweetsResponse.mdx | 21 - .../Schemas.Get2MediaAnalyticsResponse.mdx | 15 - .../Schemas.Get2MediaMediaKeyResponse.mdx | 15 - .../interfaces/Schemas.Get2MediaResponse.mdx | 15 - .../interfaces/Schemas.Get2NewsIdResponse.mdx | 15 - .../Schemas.Get2NewsSearchResponse.mdx | 18 - ...as.Get2NotesSearchNotesWrittenResponse.mdx | 18 - ...tesSearchPostsEligibleForNotesResponse.mdx | 21 - ...Schemas.Get2SpacesByCreatorIdsResponse.mdx | 21 - .../Schemas.Get2SpacesIdBuyersResponse.mdx | 21 - .../Schemas.Get2SpacesIdResponse.mdx | 18 - .../Schemas.Get2SpacesIdTweetsResponse.mdx | 21 - .../interfaces/Schemas.Get2SpacesResponse.mdx | 18 - .../Schemas.Get2SpacesSearchResponse.mdx | 21 - ...Schemas.Get2TrendsByWoeidWoeidResponse.mdx | 15 - .../Schemas.Get2TweetsAnalyticsResponse.mdx | 15 - .../Schemas.Get2TweetsCountsAllResponse.mdx | 18 - ...Schemas.Get2TweetsCountsRecentResponse.mdx | 18 - ...Get2TweetsFirehoseStreamLangEnResponse.mdx | 18 - ...Get2TweetsFirehoseStreamLangJaResponse.mdx | 18 - ...Get2TweetsFirehoseStreamLangKoResponse.mdx | 18 - ...Get2TweetsFirehoseStreamLangPtResponse.mdx | 18 - ...hemas.Get2TweetsFirehoseStreamResponse.mdx | 18 - ...chemas.Get2TweetsIdLikingUsersResponse.mdx | 21 - ...chemas.Get2TweetsIdQuoteTweetsResponse.mdx | 21 - .../Schemas.Get2TweetsIdResponse.mdx | 18 - ...chemas.Get2TweetsIdRetweetedByResponse.mdx | 21 - .../Schemas.Get2TweetsIdRetweetsResponse.mdx | 21 - .../interfaces/Schemas.Get2TweetsResponse.mdx | 18 - ...hemas.Get2TweetsSample10StreamResponse.mdx | 18 - ...Schemas.Get2TweetsSampleStreamResponse.mdx | 18 - .../Schemas.Get2TweetsSearchAllResponse.mdx | 21 - ...Schemas.Get2TweetsSearchRecentResponse.mdx | 21 - ...Schemas.Get2TweetsSearchStreamResponse.mdx | 18 - ...2TweetsSearchStreamRulesCountsResponse.mdx | 15 - .../Schemas.Get2UsageTweetsResponse.mdx | 15 - .../Schemas.Get2UsersByResponse.mdx | 18 - ...as.Get2UsersByUsernameUsernameResponse.mdx | 18 - .../Schemas.Get2UsersIdBlockingResponse.mdx | 21 - .../Schemas.Get2UsersIdBookmarksResponse.mdx | 21 - ...hemas.Get2UsersIdFollowedListsResponse.mdx | 21 - .../Schemas.Get2UsersIdFollowersResponse.mdx | 21 - .../Schemas.Get2UsersIdFollowingResponse.mdx | 21 - ...Schemas.Get2UsersIdLikedTweetsResponse.mdx | 21 - ...mas.Get2UsersIdListMembershipsResponse.mdx | 21 - .../Schemas.Get2UsersIdMentionsResponse.mdx | 21 - .../Schemas.Get2UsersIdMutingResponse.mdx | 21 - .../Schemas.Get2UsersIdOwnedListsResponse.mdx | 21 - ...Schemas.Get2UsersIdPinnedListsResponse.mdx | 21 - .../Schemas.Get2UsersIdResponse.mdx | 18 - ...dTimelinesReverseChronologicalResponse.mdx | 21 - .../Schemas.Get2UsersIdTweetsResponse.mdx | 21 - .../Schemas.Get2UsersMeResponse.mdx | 18 - ...as.Get2UsersPersonalizedTrendsResponse.mdx | 18 - .../Schemas.Get2UsersRepostsOfMeResponse.mdx | 21 - .../interfaces/Schemas.Get2UsersResponse.mdx | 18 - .../Schemas.Get2UsersSearchResponse.mdx | 21 - .../Schemas.Get2WebhooksResponse.mdx | 18 - .../interfaces/Schemas.HashtagFields.mdx | 12 - .../Schemas.KillAllConnectionsResponse.mdx | 15 - .../Schemas.LikeComplianceSchema.mdx | 12 - .../Schemas.LikeWithTweetAuthor.mdx | 24 - .../reference/interfaces/Schemas.List.mdx | 33 - .../interfaces/Schemas.ListAddUserRequest.mdx | 12 - .../interfaces/Schemas.ListCreateRequest.mdx | 18 - .../interfaces/Schemas.ListCreateResponse.mdx | 15 - .../interfaces/Schemas.ListDeleteResponse.mdx | 15 - .../Schemas.ListFollowedRequest.mdx | 12 - .../Schemas.ListFollowedResponse.mdx | 15 - .../interfaces/Schemas.ListMutateResponse.mdx | 15 - .../interfaces/Schemas.ListPinnedRequest.mdx | 12 - .../interfaces/Schemas.ListPinnedResponse.mdx | 15 - .../interfaces/Schemas.ListUnpinResponse.mdx | 15 - .../interfaces/Schemas.ListUpdateRequest.mdx | 18 - .../interfaces/Schemas.ListUpdateResponse.mdx | 15 - .../interfaces/Schemas.ManagementInfo.mdx | 12 - .../reference/interfaces/Schemas.Media.mdx | 21 - .../interfaces/Schemas.MediaAnalytics.mdx | 15 - .../interfaces/Schemas.MediaMetrics.mdx | 39 - .../Schemas.MediaTimestampedMetrics.mdx | 15 - .../Schemas.MediaUploadAppendResponse.mdx | 15 - .../Schemas.MediaUploadConfigRequest.mdx | 24 - .../Schemas.MediaUploadRequestOneShot.mdx | 24 - .../Schemas.MediaUploadResponse.mdx | 15 - .../interfaces/Schemas.MentionFields.mdx | 15 - .../Schemas.MetadataCreateRequest.mdx | 15 - .../Schemas.MetadataCreateResponse.mdx | 15 - .../reference/interfaces/Schemas.Metrics.mdx | 66 - .../Schemas.MuteUserMutationResponse.mdx | 15 - .../interfaces/Schemas.MuteUserRequest.mdx | 12 - .../reference/interfaces/Schemas.News.mdx | 39 - .../Schemas.NewsActivityResponsePayload.mdx | 21 - .../reference/interfaces/Schemas.Note.mdx | 24 - .../reference/interfaces/Schemas.NoteInfo.mdx | 21 - .../interfaces/Schemas.NoteTestResult.mdx | 15 - .../interfaces/Schemas.PersonalizedTrend.mdx | 26 - .../reference/interfaces/Schemas.Place.mdx | 33 - .../interfaces/Schemas.PlaidAccount.mdx | 39 - .../Schemas.PlaidAccountContact.mdx | 24 - .../Schemas.PlaidAccountPaymentNetwork.mdx | 24 - .../Schemas.PlaidAccountTransaction.mdx | 33 - .../interfaces/Schemas.PlaidAddress.mdx | 27 - .../interfaces/Schemas.PlaidCurrency.mdx | 12 - .../interfaces/Schemas.PlaidCustomer.mdx | 12 - .../interfaces/Schemas.PlaidName.mdx | 15 - .../interfaces/Schemas.PlaidTelephone.mdx | 18 - .../reference/interfaces/Schemas.Point.mdx | 15 - .../reference/interfaces/Schemas.Poll.mdx | 24 - .../interfaces/Schemas.PollOption.mdx | 18 - .../interfaces/Schemas.PreviewImage.mdx | 12 - .../reference/interfaces/Schemas.Problem.mdx | 21 - .../interfaces/Schemas.ProcessingInfo.mdx | 18 - ...s.ProfileUpdateActivityResponsePayload.mdx | 15 - .../Schemas.ReplayJobCreateResponse.mdx | 15 - .../reference/interfaces/Schemas.Rule.mdx | 18 - .../reference/interfaces/Schemas.RuleNoId.mdx | 15 - .../interfaces/Schemas.RulesCount.mdx | 24 - .../Schemas.RulesLookupResponse.mdx | 15 - .../Schemas.RulesResponseMetadata.mdx | 21 - .../interfaces/Schemas.SearchCount.mdx | 18 - .../Schemas.SensitiveMediaWarning.mdx | 18 - .../interfaces/Schemas.SharedInfo.mdx | 12 - .../reference/interfaces/Schemas.Space.mdx | 60 - .../reference/interfaces/Schemas.Sticker.mdx | 39 - .../interfaces/Schemas.StickerInfo.mdx | 12 - .../Schemas.StreamingLikeResponseV2.mdx | 18 - .../Schemas.StreamingTweetResponse.mdx | 18 - .../Schemas.SubscriptionsCountGetResponse.mdx | 15 - .../Schemas.SubscriptionsCreateResponse.mdx | 15 - .../Schemas.SubscriptionsDeleteResponse.mdx | 15 - .../Schemas.SubscriptionsGetResponse.mdx | 15 - .../Schemas.SubscriptionsListGetResponse.mdx | 15 - .../interfaces/Schemas.Subtitles.mdx | 18 - .../Schemas.SubtitlesCreateRequest.mdx | 18 - .../Schemas.SubtitlesCreateResponse.mdx | 15 - .../Schemas.SubtitlesDeleteRequest.mdx | 18 - .../Schemas.SubtitlesDeleteResponse.mdx | 15 - .../interfaces/Schemas.TimestampedMetrics.mdx | 15 - .../reference/interfaces/Schemas.Topic.mdx | 18 - .../reference/interfaces/Schemas.Trend.mdx | 15 - .../reference/interfaces/Schemas.Tweet.mdx | 96 - .../Schemas.TweetComplianceSchema.mdx | 18 - .../interfaces/Schemas.TweetCreateRequest.mdx | 55 - .../Schemas.TweetCreateResponse.mdx | 15 - .../Schemas.TweetDeleteComplianceSchema.mdx | 12 - .../Schemas.TweetDeleteResponse.mdx | 15 - .../Schemas.TweetDropComplianceSchema.mdx | 12 - ...chemas.TweetEditComplianceObjectSchema.mdx | 21 - .../Schemas.TweetEditComplianceSchema.mdx | 12 - .../interfaces/Schemas.TweetHideRequest.mdx | 12 - .../interfaces/Schemas.TweetHideResponse.mdx | 12 - .../interfaces/Schemas.TweetNotice.mdx | 30 - .../interfaces/Schemas.TweetNoticeSchema.mdx | 12 - .../Schemas.TweetTakedownComplianceSchema.mdx | 21 - .../Schemas.TweetUndropComplianceSchema.mdx | 12 - .../interfaces/Schemas.TweetUnviewable.mdx | 18 - .../Schemas.TweetUnviewableSchema.mdx | 12 - .../interfaces/Schemas.TweetWithheld.mdx | 18 - .../Schemas.TweetWithheldComplianceSchema.mdx | 12 - .../Schemas.UnlikeComplianceSchema.mdx | 15 - .../interfaces/Schemas.UploadSource.mdx | 12 - .../interfaces/Schemas.UrlFields.mdx | 36 - .../reference/interfaces/Schemas.UrlImage.mdx | 18 - .../reference/interfaces/Schemas.Usage.mdx | 27 - .../interfaces/Schemas.UsageFields.mdx | 15 - .../reference/interfaces/Schemas.User.mdx | 72 - .../Schemas.UserComplianceSchema.mdx | 15 - .../Schemas.UserDeleteComplianceSchema.mdx | 12 - ...serProfileModificationComplianceSchema.mdx | 12 - ...as.UserProfileModificationObjectSchema.mdx | 21 - .../Schemas.UserProtectComplianceSchema.mdx | 12 - .../Schemas.UserScrubGeoObjectSchema.mdx | 18 - .../interfaces/Schemas.UserScrubGeoSchema.mdx | 12 - .../Schemas.UserSuspendComplianceSchema.mdx | 12 - .../Schemas.UserTakedownComplianceSchema.mdx | 18 - .../Schemas.UserUndeleteComplianceSchema.mdx | 12 - .../Schemas.UserUnprotectComplianceSchema.mdx | 12 - .../Schemas.UserUnsuspendComplianceSchema.mdx | 12 - .../interfaces/Schemas.UserWithheld.mdx | 15 - .../Schemas.UserWithheldComplianceSchema.mdx | 12 - .../Schemas.UsersDMBlockCreateResponse.mdx | 15 - .../Schemas.UsersDMUnBlockCreateResponse.mdx | 15 - .../Schemas.UsersFollowingCreateRequest.mdx | 12 - .../Schemas.UsersFollowingCreateResponse.mdx | 15 - .../Schemas.UsersFollowingDeleteResponse.mdx | 15 - .../Schemas.UsersLikesCreateRequest.mdx | 12 - .../Schemas.UsersLikesCreateResponse.mdx | 15 - .../Schemas.UsersLikesDeleteResponse.mdx | 15 - .../Schemas.UsersRetweetsCreateRequest.mdx | 12 - .../Schemas.UsersRetweetsCreateResponse.mdx | 15 - .../Schemas.UsersRetweetsDeleteResponse.mdx | 15 - .../reference/interfaces/Schemas.Variant.mdx | 18 - .../interfaces/Schemas.WebhookConfig.mdx | 21 - .../Schemas.WebhookConfigCreateRequest.mdx | 12 - .../Schemas.WebhookConfigCreateResponse.mdx | 21 - .../Schemas.WebhookConfigDeleteResponse.mdx | 15 - .../Schemas.WebhookConfigPutResponse.mdx | 15 - .../Schemas.WebhookLinksCreateResponse.mdx | 15 - .../Schemas.WebhookLinksDeleteResponse.mdx | 15 - .../Schemas.WebhookLinksGetResponse.mdx | 15 - .../Schemas.WebhookReplayCreateRequest.mdx | 18 - xdks/typescript/reference/modules.mdx | 404 - .../reference/modules/AccountActivity.mdx | 89 - .../typescript/reference/modules/Activity.mdx | 89 - .../reference/modules/Communities.mdx | 29 - .../reference/modules/CommunityNotes.mdx | 89 - .../reference/modules/Compliance.mdx | 53 - .../reference/modules/Connections.mdx | 29 - .../reference/modules/DirectMessages.mdx | 137 - xdks/typescript/reference/modules/General.mdx | 17 - xdks/typescript/reference/modules/Lists.mdx | 149 - xdks/typescript/reference/modules/Media.mdx | 217 - xdks/typescript/reference/modules/News.mdx | 29 - xdks/typescript/reference/modules/Posts.mdx | 221 - xdks/typescript/reference/modules/Schemas.mdx | 1601 --- xdks/typescript/reference/modules/Spaces.mdx | 77 - xdks/typescript/reference/modules/Stream.mdx | 221 - xdks/typescript/reference/modules/Trends.mdx | 31 - xdks/typescript/reference/modules/Usage.mdx | 17 - xdks/typescript/reference/modules/Users.mdx | 539 - .../typescript/reference/modules/Webhooks.mdx | 125 - xdks/typescript/reference/overview.mdx | 75 + 540 files changed, 58174 insertions(+), 31375 deletions(-) create mode 100644 .github/workflows/validate-docs.yml create mode 100644 overlays/xdk-code-samples.json create mode 100644 tools/csharp-xdk.mdx create mode 100644 tools/java-xdk.mdx create mode 100644 xdks/csharp/authentication.mdx create mode 100644 xdks/csharp/install.mdx create mode 100644 xdks/csharp/llms.txt create mode 100644 xdks/csharp/overview.mdx create mode 100644 xdks/csharp/pagination.mdx create mode 100644 xdks/csharp/quickstart.mdx create mode 100644 xdks/csharp/reference/clients/account-activity.mdx create mode 100644 xdks/csharp/reference/clients/account.mdx create mode 100644 xdks/csharp/reference/clients/activity.mdx create mode 100644 xdks/csharp/reference/clients/articles.mdx create mode 100644 xdks/csharp/reference/clients/bots.mdx create mode 100644 xdks/csharp/reference/clients/broadcasts.mdx create mode 100644 xdks/csharp/reference/clients/calls.mdx create mode 100644 xdks/csharp/reference/clients/chat.mdx create mode 100644 xdks/csharp/reference/clients/communities.mdx create mode 100644 xdks/csharp/reference/clients/community-notes.mdx create mode 100644 xdks/csharp/reference/clients/compliance.mdx create mode 100644 xdks/csharp/reference/clients/connections.mdx create mode 100644 xdks/csharp/reference/clients/direct-messages.mdx create mode 100644 xdks/csharp/reference/clients/general.mdx create mode 100644 xdks/csharp/reference/clients/lists.mdx create mode 100644 xdks/csharp/reference/clients/media.mdx create mode 100644 xdks/csharp/reference/clients/news.mdx create mode 100644 xdks/csharp/reference/clients/posts.mdx create mode 100644 xdks/csharp/reference/clients/spaces.mdx create mode 100644 xdks/csharp/reference/clients/stream.mdx create mode 100644 xdks/csharp/reference/clients/trends.mdx create mode 100644 xdks/csharp/reference/clients/usage.mdx create mode 100644 xdks/csharp/reference/clients/users.mdx create mode 100644 xdks/csharp/reference/clients/webhooks.mdx create mode 100644 xdks/csharp/reference/overview.mdx create mode 100644 xdks/csharp/streaming.mdx create mode 100644 xdks/java/authentication.mdx create mode 100644 xdks/java/install.mdx create mode 100644 xdks/java/llms.txt create mode 100644 xdks/java/overview.mdx create mode 100644 xdks/java/pagination.mdx create mode 100644 xdks/java/quickstart.mdx create mode 100644 xdks/java/reference/clients/account-activity.mdx create mode 100644 xdks/java/reference/clients/account.mdx create mode 100644 xdks/java/reference/clients/activity.mdx create mode 100644 xdks/java/reference/clients/articles.mdx create mode 100644 xdks/java/reference/clients/bots.mdx create mode 100644 xdks/java/reference/clients/broadcasts.mdx create mode 100644 xdks/java/reference/clients/calls.mdx create mode 100644 xdks/java/reference/clients/chat.mdx create mode 100644 xdks/java/reference/clients/communities.mdx create mode 100644 xdks/java/reference/clients/community-notes.mdx create mode 100644 xdks/java/reference/clients/compliance.mdx create mode 100644 xdks/java/reference/clients/connections.mdx create mode 100644 xdks/java/reference/clients/direct-messages.mdx create mode 100644 xdks/java/reference/clients/general.mdx create mode 100644 xdks/java/reference/clients/lists.mdx create mode 100644 xdks/java/reference/clients/media.mdx create mode 100644 xdks/java/reference/clients/news.mdx create mode 100644 xdks/java/reference/clients/posts.mdx create mode 100644 xdks/java/reference/clients/spaces.mdx create mode 100644 xdks/java/reference/clients/stream.mdx create mode 100644 xdks/java/reference/clients/trends.mdx create mode 100644 xdks/java/reference/clients/usage.mdx create mode 100644 xdks/java/reference/clients/users.mdx create mode 100644 xdks/java/reference/clients/webhooks.mdx create mode 100644 xdks/java/reference/overview.mdx create mode 100644 xdks/java/streaming.mdx create mode 100644 xdks/overview.mdx create mode 100644 xdks/python/reference/clients/account-activity.mdx create mode 100644 xdks/python/reference/clients/account.mdx create mode 100644 xdks/python/reference/clients/activity.mdx create mode 100644 xdks/python/reference/clients/articles.mdx create mode 100644 xdks/python/reference/clients/bots.mdx create mode 100644 xdks/python/reference/clients/broadcasts.mdx create mode 100644 xdks/python/reference/clients/calls.mdx create mode 100644 xdks/python/reference/clients/chat.mdx create mode 100644 xdks/python/reference/clients/communities.mdx create mode 100644 xdks/python/reference/clients/community-notes.mdx create mode 100644 xdks/python/reference/clients/compliance.mdx create mode 100644 xdks/python/reference/clients/connections.mdx create mode 100644 xdks/python/reference/clients/direct-messages.mdx create mode 100644 xdks/python/reference/clients/general.mdx create mode 100644 xdks/python/reference/clients/lists.mdx create mode 100644 xdks/python/reference/clients/media.mdx create mode 100644 xdks/python/reference/clients/news.mdx create mode 100644 xdks/python/reference/clients/posts.mdx create mode 100644 xdks/python/reference/clients/spaces.mdx create mode 100644 xdks/python/reference/clients/stream.mdx create mode 100644 xdks/python/reference/clients/trends.mdx create mode 100644 xdks/python/reference/clients/usage.mdx create mode 100644 xdks/python/reference/clients/users.mdx create mode 100644 xdks/python/reference/clients/webhooks.mdx delete mode 100644 xdks/python/reference/index.mdx delete mode 100644 xdks/python/reference/modules.mdx create mode 100644 xdks/python/reference/overview.mdx delete mode 100644 xdks/python/reference/xdk.account_activity.client.mdx delete mode 100644 xdks/python/reference/xdk.account_activity.mdx delete mode 100644 xdks/python/reference/xdk.account_activity.models.mdx delete mode 100644 xdks/python/reference/xdk.activity.client.mdx delete mode 100644 xdks/python/reference/xdk.activity.mdx delete mode 100644 xdks/python/reference/xdk.activity.models.mdx delete mode 100644 xdks/python/reference/xdk.client.mdx delete mode 100644 xdks/python/reference/xdk.communities.client.mdx delete mode 100644 xdks/python/reference/xdk.communities.mdx delete mode 100644 xdks/python/reference/xdk.communities.models.mdx delete mode 100644 xdks/python/reference/xdk.community_notes.client.mdx delete mode 100644 xdks/python/reference/xdk.community_notes.mdx delete mode 100644 xdks/python/reference/xdk.community_notes.models.mdx delete mode 100644 xdks/python/reference/xdk.compliance.client.mdx delete mode 100644 xdks/python/reference/xdk.compliance.mdx delete mode 100644 xdks/python/reference/xdk.compliance.models.mdx delete mode 100644 xdks/python/reference/xdk.connections.client.mdx delete mode 100644 xdks/python/reference/xdk.connections.mdx delete mode 100644 xdks/python/reference/xdk.connections.models.mdx delete mode 100644 xdks/python/reference/xdk.direct_messages.client.mdx delete mode 100644 xdks/python/reference/xdk.direct_messages.mdx delete mode 100644 xdks/python/reference/xdk.direct_messages.models.mdx delete mode 100644 xdks/python/reference/xdk.general.client.mdx delete mode 100644 xdks/python/reference/xdk.general.mdx delete mode 100644 xdks/python/reference/xdk.general.models.mdx delete mode 100644 xdks/python/reference/xdk.lists.client.mdx delete mode 100644 xdks/python/reference/xdk.lists.mdx delete mode 100644 xdks/python/reference/xdk.lists.models.mdx delete mode 100644 xdks/python/reference/xdk.mdx delete mode 100644 xdks/python/reference/xdk.media.client.mdx delete mode 100644 xdks/python/reference/xdk.media.mdx delete mode 100644 xdks/python/reference/xdk.media.models.mdx delete mode 100644 xdks/python/reference/xdk.news.client.mdx delete mode 100644 xdks/python/reference/xdk.news.mdx delete mode 100644 xdks/python/reference/xdk.news.models.mdx delete mode 100644 xdks/python/reference/xdk.oauth1_auth.mdx delete mode 100644 xdks/python/reference/xdk.oauth2_auth.mdx delete mode 100644 xdks/python/reference/xdk.paginator.mdx delete mode 100644 xdks/python/reference/xdk.posts.client.mdx delete mode 100644 xdks/python/reference/xdk.posts.mdx delete mode 100644 xdks/python/reference/xdk.posts.models.mdx delete mode 100644 xdks/python/reference/xdk.spaces.client.mdx delete mode 100644 xdks/python/reference/xdk.spaces.mdx delete mode 100644 xdks/python/reference/xdk.spaces.models.mdx delete mode 100644 xdks/python/reference/xdk.stream.client.mdx delete mode 100644 xdks/python/reference/xdk.stream.mdx delete mode 100644 xdks/python/reference/xdk.stream.models.mdx delete mode 100644 xdks/python/reference/xdk.streaming.mdx delete mode 100644 xdks/python/reference/xdk.trends.client.mdx delete mode 100644 xdks/python/reference/xdk.trends.mdx delete mode 100644 xdks/python/reference/xdk.trends.models.mdx delete mode 100644 xdks/python/reference/xdk.usage.client.mdx delete mode 100644 xdks/python/reference/xdk.usage.mdx delete mode 100644 xdks/python/reference/xdk.usage.models.mdx delete mode 100644 xdks/python/reference/xdk.users.client.mdx delete mode 100644 xdks/python/reference/xdk.users.mdx delete mode 100644 xdks/python/reference/xdk.users.models.mdx delete mode 100644 xdks/python/reference/xdk.webhooks.client.mdx delete mode 100644 xdks/python/reference/xdk.webhooks.mdx delete mode 100644 xdks/python/reference/xdk.webhooks.models.mdx create mode 100644 xdks/typescript/quickstart.mdx delete mode 100644 xdks/typescript/reference/classes/AccountActivityClient.mdx delete mode 100644 xdks/typescript/reference/classes/ActivityClient.mdx delete mode 100644 xdks/typescript/reference/classes/ApiError.mdx delete mode 100644 xdks/typescript/reference/classes/Client.mdx delete mode 100644 xdks/typescript/reference/classes/CommunitiesClient.mdx delete mode 100644 xdks/typescript/reference/classes/CommunityNotesClient.mdx delete mode 100644 xdks/typescript/reference/classes/ComplianceClient.mdx delete mode 100644 xdks/typescript/reference/classes/ConnectionsClient.mdx delete mode 100644 xdks/typescript/reference/classes/DirectMessagesClient.mdx delete mode 100644 xdks/typescript/reference/classes/EventPaginator.mdx delete mode 100644 xdks/typescript/reference/classes/GeneralClient.mdx delete mode 100644 xdks/typescript/reference/classes/HttpClient.mdx delete mode 100644 xdks/typescript/reference/classes/ListsClient.mdx delete mode 100644 xdks/typescript/reference/classes/MediaClient.mdx delete mode 100644 xdks/typescript/reference/classes/NewsClient.mdx delete mode 100644 xdks/typescript/reference/classes/Paginator.mdx delete mode 100644 xdks/typescript/reference/classes/PostPaginator.mdx delete mode 100644 xdks/typescript/reference/classes/PostsClient.mdx delete mode 100644 xdks/typescript/reference/classes/SpacesClient.mdx delete mode 100644 xdks/typescript/reference/classes/StreamClient.mdx delete mode 100644 xdks/typescript/reference/classes/TrendsClient.mdx delete mode 100644 xdks/typescript/reference/classes/UsageClient.mdx delete mode 100644 xdks/typescript/reference/classes/UserPaginator.mdx delete mode 100644 xdks/typescript/reference/classes/UsersClient.mdx delete mode 100644 xdks/typescript/reference/classes/WebhooksClient.mdx create mode 100644 xdks/typescript/reference/clients/account-activity.mdx create mode 100644 xdks/typescript/reference/clients/account.mdx create mode 100644 xdks/typescript/reference/clients/activity.mdx create mode 100644 xdks/typescript/reference/clients/articles.mdx create mode 100644 xdks/typescript/reference/clients/bots.mdx create mode 100644 xdks/typescript/reference/clients/broadcasts.mdx create mode 100644 xdks/typescript/reference/clients/calls.mdx create mode 100644 xdks/typescript/reference/clients/chat.mdx create mode 100644 xdks/typescript/reference/clients/communities.mdx create mode 100644 xdks/typescript/reference/clients/community-notes.mdx create mode 100644 xdks/typescript/reference/clients/compliance.mdx create mode 100644 xdks/typescript/reference/clients/connections.mdx create mode 100644 xdks/typescript/reference/clients/direct-messages.mdx create mode 100644 xdks/typescript/reference/clients/general.mdx create mode 100644 xdks/typescript/reference/clients/lists.mdx create mode 100644 xdks/typescript/reference/clients/media.mdx create mode 100644 xdks/typescript/reference/clients/news.mdx create mode 100644 xdks/typescript/reference/clients/posts.mdx create mode 100644 xdks/typescript/reference/clients/spaces.mdx create mode 100644 xdks/typescript/reference/clients/stream.mdx create mode 100644 xdks/typescript/reference/clients/trends.mdx create mode 100644 xdks/typescript/reference/clients/usage.mdx create mode 100644 xdks/typescript/reference/clients/users.mdx create mode 100644 xdks/typescript/reference/clients/webhooks.mdx delete mode 100644 xdks/typescript/reference/interfaces/ApiResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/ClientConfig.mdx delete mode 100644 xdks/typescript/reference/interfaces/HttpClientRequestOptions.mdx delete mode 100644 xdks/typescript/reference/interfaces/HttpResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/PaginatedResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/PaginationMeta.mdx delete mode 100644 xdks/typescript/reference/interfaces/RequestOptions.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscription.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionFilter.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.AddRulesRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.AllowDownloadStatus.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.AltText.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Analytics.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.AppRulesCount.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.AudiencePolicy.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CashtagFields.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ClientAppUsage.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Community.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ComplianceJob.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Connection.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ContentExpiration.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ContextAnnotation.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ContextAnnotationDomainFields.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ContextAnnotationEntityFields.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateAttachmentsMessageRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.CreateTextMessageRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.DeleteRulesRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.DmEvent.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.DomainRestrictions.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Engagement.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveExclusive.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveInclusive.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Error.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Expansions.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.FilteredStreamingTweetResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.FollowActivityResponsePayload.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.FoundMediaOrigin.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.FullTextEntities.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Geo.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidContactResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidPayment_networksResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidTransactionsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2FdxCustomersCurrentResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2LikesFirehoseStreamResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2LikesSample10StreamResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2MediaAnalyticsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsAnalyticsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangEnResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangJaResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangKoResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangPtResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsSample10StreamResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsSampleStreamResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.HashtagFields.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.LikeComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.LikeWithTweetAuthor.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.List.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListMutateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ManagementInfo.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Media.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MediaAnalytics.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MediaMetrics.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MediaTimestampedMetrics.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MentionFields.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Metrics.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.MuteUserRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.News.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.NewsActivityResponsePayload.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Note.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.NoteInfo.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.NoteTestResult.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Place.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidAccount.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidAccountContact.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidAccountPaymentNetwork.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidAccountTransaction.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidAddress.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidCurrency.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidCustomer.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidName.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PlaidTelephone.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Point.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Poll.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PollOption.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.PreviewImage.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Problem.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ProcessingInfo.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ProfileUpdateActivityResponsePayload.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Rule.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.RuleNoId.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.RulesCount.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.RulesResponseMetadata.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SearchCount.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SensitiveMediaWarning.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SharedInfo.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Space.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Sticker.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.StickerInfo.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Subtitles.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TimestampedMetrics.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Topic.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Trend.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Tweet.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetDeleteComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetDropComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceObjectSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetHideRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetHideResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetNotice.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetNoticeSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetTakedownComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetUndropComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetUnviewable.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetUnviewableSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetWithheld.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.TweetWithheldComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UnlikeComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UploadSource.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UrlFields.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UrlImage.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Usage.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsageFields.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.User.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserDeleteComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserProfileModificationComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserProfileModificationObjectSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserProtectComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserScrubGeoObjectSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserScrubGeoSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserSuspendComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserTakedownComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserUndeleteComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserUnprotectComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserUnsuspendComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserWithheld.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UserWithheldComplianceSchema.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.Variant.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookConfig.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse.mdx delete mode 100644 xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest.mdx delete mode 100644 xdks/typescript/reference/modules.mdx delete mode 100644 xdks/typescript/reference/modules/AccountActivity.mdx delete mode 100644 xdks/typescript/reference/modules/Activity.mdx delete mode 100644 xdks/typescript/reference/modules/Communities.mdx delete mode 100644 xdks/typescript/reference/modules/CommunityNotes.mdx delete mode 100644 xdks/typescript/reference/modules/Compliance.mdx delete mode 100644 xdks/typescript/reference/modules/Connections.mdx delete mode 100644 xdks/typescript/reference/modules/DirectMessages.mdx delete mode 100644 xdks/typescript/reference/modules/General.mdx delete mode 100644 xdks/typescript/reference/modules/Lists.mdx delete mode 100644 xdks/typescript/reference/modules/Media.mdx delete mode 100644 xdks/typescript/reference/modules/News.mdx delete mode 100644 xdks/typescript/reference/modules/Posts.mdx delete mode 100644 xdks/typescript/reference/modules/Schemas.mdx delete mode 100644 xdks/typescript/reference/modules/Spaces.mdx delete mode 100644 xdks/typescript/reference/modules/Stream.mdx delete mode 100644 xdks/typescript/reference/modules/Trends.mdx delete mode 100644 xdks/typescript/reference/modules/Usage.mdx delete mode 100644 xdks/typescript/reference/modules/Users.mdx delete mode 100644 xdks/typescript/reference/modules/Webhooks.mdx create mode 100644 xdks/typescript/reference/overview.mdx diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 0f8eedf15..280f1a604 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -2,6 +2,8 @@ name: Update Documentation on: workflow_dispatch: + repository_dispatch: + types: [xdk-released] schedule: - cron: '0 17 * * *' # 9am PT - cron: '0 20 * * *' # 12pm PT @@ -14,83 +16,57 @@ jobs: permissions: contents: write steps: - - name: Checkout Repository - uses: actions/checkout@v3 + - name: Checkout Docs Repository + uses: actions/checkout@v4 + + - name: Checkout XDK Generator + uses: actions/checkout@v4 + with: + repository: xdevplatform/xdk + ref: main + path: .xdk-gen - name: Set Up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '20' + - name: Set Up Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache XDK Rust Build + uses: Swatinem/rust-cache@v2 + with: + workspaces: .xdk-gen + - name: Fetch Latest OpenAPI Specification run: | curl --fail --silent --show-error --location \ --retry 3 --retry-delay 5 --max-time 120 \ -o openapi.json \ https://api.x.com/2/openapi.json - # Fail early if the response is not valid JSON (e.g. an error page) jq -e .openapi openapi.json > /dev/null - - name: Remove Existing api-reference Directory - run: rm -rf api-reference - - - name: Generate MDX Files - run: npx @mintlify/scraping@latest openapi-file ./openapi.json -o api-reference - - - name: Rename Subdirectories + - name: Sync XDK Reference, OpenAPI Code Samples Overlay, and Endpoint Stubs run: | - if [ -d "api-reference/tweets" ]; then - mv api-reference/tweets api-reference/posts - fi - # Add more rename commands here if needed, e.g.: - # if [ -d "api-reference/other" ]; then - # mv api-reference/other api-reference/newname - # fi - - name: Rename Files Containing '%' - run: | - find api-reference -type f -name '*%*.mdx' -exec bash -c ' - new_name="${0//%/}" - if [ ! -f "$new_name" ]; then - mv "$0" "$new_name" - else - echo "Cannot rename $0 to $new_name: file already exists" - fi - ' {} \; - - name: Move Files to x-api - run: | - # Function to move files from api-reference to x-api - move_files() { - local src_dir=$1 - local dest_dir=$2 - for item in "$src_dir"/*; do - if [ -d "$item" ]; then - # Handle subdirectories - local base_name=$(basename "$item") - local new_dest="$dest_dir/$base_name" - mkdir -p "$new_dest" # Create subdirectory in x-api if it doesn’t exist - move_files "$item" "$new_dest" # Recursively move contents - elif [ -f "$item" ]; then - # Move individual files - local file_name=$(basename "$item") - local dest_file="$dest_dir/$file_name" - mv "$item" "$dest_file" # Move file to x-api subdirectory - fi - done - } - - # Start moving files from api-reference to x-api - move_files "api-reference" "x-api" + cargo run --manifest-path .xdk-gen/Cargo.toml --bin xdk-build -- \ + docs --spec ./openapi.json --output . --sync-endpoint-stubs + rm -rf .xdk-gen - - name: Remove api-reference Directory - run: rm -rf api-reference + - name: Validate Mintlify Build & XDK Docs + run: | + npx --yes mint@latest validate --no-build --files "xdks/**" "tools/**" "tools-and-libraries.mdx" + npx --yes mint@latest validate --no-build --disable unknown-component + npx --yes mint@latest broken-links --files "xdks/**" "tools/**" "tools-and-libraries.mdx" - name: Commit and Push Changes run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add openapi.json x-api - if git commit -m "Update documentation with latest OpenAPI spec"; then - git push + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add openapi.json overlays/xdk-code-samples.json docs.json xdks tools tools-and-libraries.mdx x-api + if git diff --cached --quiet; then + echo "No documentation changes to commit." else - echo "No changes to commit" + git commit -m "chore: sync OpenAPI spec, XDK reference, and code samples overlay" + git push fi diff --git a/.github/workflows/validate-docs.yml b/.github/workflows/validate-docs.yml new file mode 100644 index 000000000..5e6580c19 --- /dev/null +++ b/.github/workflows/validate-docs.yml @@ -0,0 +1,27 @@ +name: Validate Docs + +on: + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + validate: + name: Mintlify Validation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set Up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Validate XDK & Tools Pages + run: npx --yes mint@latest validate --no-build --files "xdks/**" "tools/**" "tools-and-libraries.mdx" + + - name: Validate OpenAPI Spec, Overlay, and Navigation + run: npx --yes mint@latest validate --no-build --disable unknown-component + + - name: Check XDK & Tools Internal Links + run: npx --yes mint@latest broken-links --files "xdks/**" "tools/**" "tools-and-libraries.mdx" diff --git a/.well-known/llms.txt b/.well-known/llms.txt index f560f75ae..969ddc8eb 100644 --- a/.well-known/llms.txt +++ b/.well-known/llms.txt @@ -15,8 +15,8 @@ - [X API v2 — Full Index](https://docs.x.com/x-api/llms.txt): 370+ reference pages (Posts, Users, DMs, Lists, Spaces, Streams, Compliance, Webhooks, Media, etc.) - [Enterprise APIs — Full Index](https://docs.x.com/enterprise-api/llms.txt): Account Activity, X Activity (XAA), Compliance, Chat, Communities, Direct Messages, News, Trends, Webhooks, and historical GNIP/PowerTrack - [Ads API — Full Index](https://docs.x.com/x-ads-api/llms.txt): Campaign management, creatives, audiences, analytics, lead generation, measurement, and conversions -- [Python SDK (XDK) — Full Index](https://docs.x.com/xdks/python/llms.txt): Complete Python client, models, paginators, and streaming reference -- [TypeScript SDK (XDK) — Full Index](https://docs.x.com/xdks/typescript/llms.txt): Full TypeScript/JavaScript client and 300+ model/interface references +- [SDKs (XDKs) — Full Index](https://docs.x.com/xdks/llms.txt): Official Python, TypeScript, Java, and C# (.NET) SDK clients, guides, and references +- [Python XDK](https://docs.x.com/xdks/python/llms.txt) · [TypeScript XDK](https://docs.x.com/xdks/typescript/llms.txt) · [Java XDK](https://docs.x.com/xdks/java/llms.txt) · [C# XDK](https://docs.x.com/xdks/csharp/llms.txt) ## Key Fundamentals & Tools diff --git a/AGENT.md b/AGENT.md index 223d9e94a..af03861ee 100644 --- a/AGENT.md +++ b/AGENT.md @@ -12,7 +12,7 @@ This document provides guidance for AI agents, coding assistants, and LLM-based - https://docs.x.com/x-api/llms.txt (X API v2 — 370+ pages) - https://docs.x.com/enterprise-api/llms.txt - https://docs.x.com/x-ads-api/llms.txt - - https://docs.x.com/xdks/llms.txt (Python + TypeScript XDKs) + - https://docs.x.com/xdks/llms.txt (Official Python, TypeScript, Java, and C# XDKs) 2. **llms-full.txt** — Complete documentation as a single Markdown file for maximum context: - https://docs.x.com/llms-full.txt @@ -33,7 +33,7 @@ This document provides guidance for AI agents, coding assistants, and LLM-based - **X API v2** (`/x-api/...`): Posts, Users, Direct Messages, Lists, Spaces, Media, Streams (filtered + volume), Compliance, Webhooks, Account Activity, Trends, News, Usage, Connections. - **Enterprise APIs** (`/enterprise-api/...`): Account Activity (webhooks), X Activity (XAA), GNIP/PowerTrack historical & real-time, Compliance. - **Ads API** (`/x-ads-api/...`): Campaign Management, Creatives, Audiences, Analytics, Measurement, Catalog, Lead Generation. -- **SDKs (XDKs)** (`/xdks/python/...` and `/xdks/typescript/...`): Official client libraries with full type coverage, pagination, and streaming helpers. +- **SDKs (XDKs)** (`/xdks/overview`, `/xdks/{python,typescript,java,csharp}/...`): Official client libraries in Python, TypeScript, Java, and C# with full type coverage, pagination, and streaming helpers. - **Fundamentals**: Authentication, rate limits, data dictionary, expansions, fields, pagination, versioning, consistency. - **AI & Agent Tools** (`/tools/ai`, `/tools/llms-txt`, `/tools/skill-md`, `/tools/mcp`). @@ -54,7 +54,7 @@ All pages are available in the navigation tree defined in `docs.json`. - For deep context on the entire platform, load `llms-full.txt`. - For structured capabilities (what actions are possible), load `skill.md`. - For live tool calling against the X API, use the MCP server. -- When writing code, prefer the official Python or TypeScript XDKs (full references available in their `llms.txt` files). +- When writing code, prefer the official Python, TypeScript, Java, or C# XDKs (full references available in `/xdks/llms.txt` and per-language `llms.txt` files). ## Do Not diff --git a/AGENTS.md b/AGENTS.md index 223d9e94a..af03861ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ This document provides guidance for AI agents, coding assistants, and LLM-based - https://docs.x.com/x-api/llms.txt (X API v2 — 370+ pages) - https://docs.x.com/enterprise-api/llms.txt - https://docs.x.com/x-ads-api/llms.txt - - https://docs.x.com/xdks/llms.txt (Python + TypeScript XDKs) + - https://docs.x.com/xdks/llms.txt (Official Python, TypeScript, Java, and C# XDKs) 2. **llms-full.txt** — Complete documentation as a single Markdown file for maximum context: - https://docs.x.com/llms-full.txt @@ -33,7 +33,7 @@ This document provides guidance for AI agents, coding assistants, and LLM-based - **X API v2** (`/x-api/...`): Posts, Users, Direct Messages, Lists, Spaces, Media, Streams (filtered + volume), Compliance, Webhooks, Account Activity, Trends, News, Usage, Connections. - **Enterprise APIs** (`/enterprise-api/...`): Account Activity (webhooks), X Activity (XAA), GNIP/PowerTrack historical & real-time, Compliance. - **Ads API** (`/x-ads-api/...`): Campaign Management, Creatives, Audiences, Analytics, Measurement, Catalog, Lead Generation. -- **SDKs (XDKs)** (`/xdks/python/...` and `/xdks/typescript/...`): Official client libraries with full type coverage, pagination, and streaming helpers. +- **SDKs (XDKs)** (`/xdks/overview`, `/xdks/{python,typescript,java,csharp}/...`): Official client libraries in Python, TypeScript, Java, and C# with full type coverage, pagination, and streaming helpers. - **Fundamentals**: Authentication, rate limits, data dictionary, expansions, fields, pagination, versioning, consistency. - **AI & Agent Tools** (`/tools/ai`, `/tools/llms-txt`, `/tools/skill-md`, `/tools/mcp`). @@ -54,7 +54,7 @@ All pages are available in the navigation tree defined in `docs.json`. - For deep context on the entire platform, load `llms-full.txt`. - For structured capabilities (what actions are possible), load `skill.md`. - For live tool calling against the X API, use the MCP server. -- When writing code, prefer the official Python or TypeScript XDKs (full references available in their `llms.txt` files). +- When writing code, prefer the official Python, TypeScript, Java, or C# XDKs (full references available in `/xdks/llms.txt` and per-language `llms.txt` files). ## Do Not diff --git a/docs.json b/docs.json index 7f529a2d9..3f9d02630 100644 --- a/docs.json +++ b/docs.json @@ -51,7 +51,9 @@ "group": "SDKs (XDKs)", "pages": [ "tools/python-xdk", - "tools/typescript-xdk" + "tools/typescript-xdk", + "tools/java-xdk", + "tools/csharp-xdk" ] } ] @@ -1041,6 +1043,203 @@ } ] }, + { + "product": "XDKs", + "description": "Official Python, TypeScript, Java, and C# SDKs", + "icon": "cubes", + "tabs": [ + { + "tab": "Overview", + "pages": [ + "xdks/overview" + ] + }, + { + "tab": "Python", + "groups": [ + { + "group": "Guides", + "pages": [ + "xdks/python/overview", + "xdks/python/install", + "xdks/python/quickstart", + "xdks/python/authentication", + "xdks/python/pagination", + "xdks/python/streaming" + ] + }, + { + "group": "Client Reference", + "pages": [ + "xdks/python/reference/overview", + "xdks/python/reference/clients/account", + "xdks/python/reference/clients/account-activity", + "xdks/python/reference/clients/activity", + "xdks/python/reference/clients/articles", + "xdks/python/reference/clients/bots", + "xdks/python/reference/clients/broadcasts", + "xdks/python/reference/clients/calls", + "xdks/python/reference/clients/chat", + "xdks/python/reference/clients/communities", + "xdks/python/reference/clients/community-notes", + "xdks/python/reference/clients/compliance", + "xdks/python/reference/clients/connections", + "xdks/python/reference/clients/direct-messages", + "xdks/python/reference/clients/general", + "xdks/python/reference/clients/lists", + "xdks/python/reference/clients/media", + "xdks/python/reference/clients/news", + "xdks/python/reference/clients/posts", + "xdks/python/reference/clients/spaces", + "xdks/python/reference/clients/stream", + "xdks/python/reference/clients/trends", + "xdks/python/reference/clients/usage", + "xdks/python/reference/clients/users", + "xdks/python/reference/clients/webhooks" + ] + } + ] + }, + { + "tab": "TypeScript", + "groups": [ + { + "group": "Guides", + "pages": [ + "xdks/typescript/overview", + "xdks/typescript/install", + "xdks/typescript/quickstart", + "xdks/typescript/authentication", + "xdks/typescript/pagination", + "xdks/typescript/streaming" + ] + }, + { + "group": "Client Reference", + "pages": [ + "xdks/typescript/reference/overview", + "xdks/typescript/reference/clients/account", + "xdks/typescript/reference/clients/account-activity", + "xdks/typescript/reference/clients/activity", + "xdks/typescript/reference/clients/articles", + "xdks/typescript/reference/clients/bots", + "xdks/typescript/reference/clients/broadcasts", + "xdks/typescript/reference/clients/calls", + "xdks/typescript/reference/clients/chat", + "xdks/typescript/reference/clients/communities", + "xdks/typescript/reference/clients/community-notes", + "xdks/typescript/reference/clients/compliance", + "xdks/typescript/reference/clients/connections", + "xdks/typescript/reference/clients/direct-messages", + "xdks/typescript/reference/clients/general", + "xdks/typescript/reference/clients/lists", + "xdks/typescript/reference/clients/media", + "xdks/typescript/reference/clients/news", + "xdks/typescript/reference/clients/posts", + "xdks/typescript/reference/clients/spaces", + "xdks/typescript/reference/clients/stream", + "xdks/typescript/reference/clients/trends", + "xdks/typescript/reference/clients/usage", + "xdks/typescript/reference/clients/users", + "xdks/typescript/reference/clients/webhooks" + ] + } + ] + }, + { + "tab": "Java", + "groups": [ + { + "group": "Guides", + "pages": [ + "xdks/java/overview", + "xdks/java/install", + "xdks/java/quickstart", + "xdks/java/authentication", + "xdks/java/pagination", + "xdks/java/streaming" + ] + }, + { + "group": "Client Reference", + "pages": [ + "xdks/java/reference/overview", + "xdks/java/reference/clients/account", + "xdks/java/reference/clients/account-activity", + "xdks/java/reference/clients/activity", + "xdks/java/reference/clients/articles", + "xdks/java/reference/clients/bots", + "xdks/java/reference/clients/broadcasts", + "xdks/java/reference/clients/calls", + "xdks/java/reference/clients/chat", + "xdks/java/reference/clients/communities", + "xdks/java/reference/clients/community-notes", + "xdks/java/reference/clients/compliance", + "xdks/java/reference/clients/connections", + "xdks/java/reference/clients/direct-messages", + "xdks/java/reference/clients/general", + "xdks/java/reference/clients/lists", + "xdks/java/reference/clients/media", + "xdks/java/reference/clients/news", + "xdks/java/reference/clients/posts", + "xdks/java/reference/clients/spaces", + "xdks/java/reference/clients/stream", + "xdks/java/reference/clients/trends", + "xdks/java/reference/clients/usage", + "xdks/java/reference/clients/users", + "xdks/java/reference/clients/webhooks" + ] + } + ] + }, + { + "tab": "C#", + "groups": [ + { + "group": "Guides", + "pages": [ + "xdks/csharp/overview", + "xdks/csharp/install", + "xdks/csharp/quickstart", + "xdks/csharp/authentication", + "xdks/csharp/pagination", + "xdks/csharp/streaming" + ] + }, + { + "group": "Client Reference", + "pages": [ + "xdks/csharp/reference/overview", + "xdks/csharp/reference/clients/account", + "xdks/csharp/reference/clients/account-activity", + "xdks/csharp/reference/clients/activity", + "xdks/csharp/reference/clients/articles", + "xdks/csharp/reference/clients/bots", + "xdks/csharp/reference/clients/broadcasts", + "xdks/csharp/reference/clients/calls", + "xdks/csharp/reference/clients/chat", + "xdks/csharp/reference/clients/communities", + "xdks/csharp/reference/clients/community-notes", + "xdks/csharp/reference/clients/compliance", + "xdks/csharp/reference/clients/connections", + "xdks/csharp/reference/clients/direct-messages", + "xdks/csharp/reference/clients/general", + "xdks/csharp/reference/clients/lists", + "xdks/csharp/reference/clients/media", + "xdks/csharp/reference/clients/news", + "xdks/csharp/reference/clients/posts", + "xdks/csharp/reference/clients/spaces", + "xdks/csharp/reference/clients/stream", + "xdks/csharp/reference/clients/trends", + "xdks/csharp/reference/clients/usage", + "xdks/csharp/reference/clients/users", + "xdks/csharp/reference/clients/webhooks" + ] + } + ] + } + ] + }, { "product": "Chat API", "tabs": [ @@ -1378,892 +1577,33 @@ "pages": [ "livestream-api/chat/accessing-live-chat", "livestream-api/chat/get-chat-history", - "livestream-api/chat/send-chat-message", - "livestream-api/chat/mute-user", - "livestream-api/chat/unmute-user", - "livestream-api/chat/list-muted-chat-users", - "livestream-api/chat/mute-chat-user", - "livestream-api/chat/unmute-chat-user", - "livestream-api/chat/delete-chat-message", - "livestream-api/chat/list-moderators", - "livestream-api/chat/add-moderator", - "livestream-api/chat/remove-moderator" - ] - } - ] - } - ] - }, - { - "product": "Enterprise", - "hidden": true, - "groups": [ - { - "group": "Overview", - "pages": [ - "enterprise-api/introduction" - ] - } - ] - }, - { - "product": "Python XDK", - "hidden": true, - "pages": [ - "xdks/python/overview", - "xdks/python/install", - "xdks/python/quickstart", - "xdks/python/authentication", - "xdks/python/pagination", - "xdks/python/streaming", - { - "group": "API Reference", - "pages": [ - "xdks/python/reference/modules", - { - "group": "Clients", - "pages": [ - { - "group": "Account Activity", - "pages": [ - "xdks/python/reference/xdk.account_activity.client" - ] - }, - { - "group": "Activity", - "pages": [ - "xdks/python/reference/xdk.activity.client" - ] - }, - { - "group": "Client", - "pages": [ - "xdks/python/reference/xdk.client" - ] - }, - { - "group": "Communities", - "pages": [ - "xdks/python/reference/xdk.communities.client" - ] - }, - { - "group": "Community Notes", - "pages": [ - "xdks/python/reference/xdk.community_notes.client" - ] - }, - { - "group": "Compliance", - "pages": [ - "xdks/python/reference/xdk.compliance.client" - ] - }, - { - "group": "Connections", - "pages": [ - "xdks/python/reference/xdk.connections.client" - ] - }, - { - "group": "Direct Messages", - "pages": [ - "xdks/python/reference/xdk.direct_messages.client" - ] - }, - { - "group": "General", - "pages": [ - "xdks/python/reference/xdk.general.client" - ] - }, - { - "group": "Lists", - "pages": [ - "xdks/python/reference/xdk.lists.client" - ] - }, - { - "group": "Media", - "pages": [ - "xdks/python/reference/xdk.media.client" - ] - }, - { - "group": "News", - "pages": [ - "xdks/python/reference/xdk.news.client" - ] - }, - { - "group": "Posts", - "pages": [ - "xdks/python/reference/xdk.posts.client" - ] - }, - { - "group": "Spaces", - "pages": [ - "xdks/python/reference/xdk.spaces.client" - ] - }, - { - "group": "Stream", - "pages": [ - "xdks/python/reference/xdk.stream.client" - ] - }, - { - "group": "Trends", - "pages": [ - "xdks/python/reference/xdk.trends.client" - ] - }, - { - "group": "Usage", - "pages": [ - "xdks/python/reference/xdk.usage.client" - ] - }, - { - "group": "Users", - "pages": [ - "xdks/python/reference/xdk.users.client" - ] - }, - { - "group": "Webhooks", - "pages": [ - "xdks/python/reference/xdk.webhooks.client" - ] - } - ] - }, - { - "group": "Models", - "pages": [ - { - "group": "Account Activity", - "pages": [ - "xdks/python/reference/xdk.account_activity.models" - ] - }, - { - "group": "Activity", - "pages": [ - "xdks/python/reference/xdk.activity.models" - ] - }, - { - "group": "Communities", - "pages": [ - "xdks/python/reference/xdk.communities.models" - ] - }, - { - "group": "Community Notes", - "pages": [ - "xdks/python/reference/xdk.community_notes.models" - ] - }, - { - "group": "Compliance", - "pages": [ - "xdks/python/reference/xdk.compliance.models" - ] - }, - { - "group": "Connections", - "pages": [ - "xdks/python/reference/xdk.connections.models" - ] - }, - { - "group": "Direct Messages", - "pages": [ - "xdks/python/reference/xdk.direct_messages.models" - ] - }, - { - "group": "General", - "pages": [ - "xdks/python/reference/xdk.general.models" - ] - }, - { - "group": "Lists", - "pages": [ - "xdks/python/reference/xdk.lists.models" - ] - }, - { - "group": "Media", - "pages": [ - "xdks/python/reference/xdk.media.models" - ] - }, - { - "group": "News", - "pages": [ - "xdks/python/reference/xdk.news.models" - ] - }, - { - "group": "Posts", - "pages": [ - "xdks/python/reference/xdk.posts.models" - ] - }, - { - "group": "Spaces", - "pages": [ - "xdks/python/reference/xdk.spaces.models" - ] - }, - { - "group": "Stream", - "pages": [ - "xdks/python/reference/xdk.stream.models" - ] - }, - { - "group": "Trends", - "pages": [ - "xdks/python/reference/xdk.trends.models" - ] - }, - { - "group": "Usage", - "pages": [ - "xdks/python/reference/xdk.usage.models" - ] - }, - { - "group": "Users", - "pages": [ - "xdks/python/reference/xdk.users.models" - ] - }, - { - "group": "Webhooks", - "pages": [ - "xdks/python/reference/xdk.webhooks.models" - ] - } - ] - }, - { - "group": "Core", - "pages": [ - { - "group": "Account Activity", - "pages": [ - "xdks/python/reference/xdk.account_activity" - ] - }, - { - "group": "Activity", - "pages": [ - "xdks/python/reference/xdk.activity" - ] - }, - { - "group": "Communities", - "pages": [ - "xdks/python/reference/xdk.communities" - ] - }, - { - "group": "Community Notes", - "pages": [ - "xdks/python/reference/xdk.community_notes" - ] - }, - { - "group": "Compliance", - "pages": [ - "xdks/python/reference/xdk.compliance" - ] - }, - { - "group": "Connections", - "pages": [ - "xdks/python/reference/xdk.connections" - ] - }, - { - "group": "Direct Messages", - "pages": [ - "xdks/python/reference/xdk.direct_messages" - ] - }, - { - "group": "General", - "pages": [ - "xdks/python/reference/xdk.general" - ] - }, - { - "group": "Lists", - "pages": [ - "xdks/python/reference/xdk.lists" - ] - }, - { - "group": "Media", - "pages": [ - "xdks/python/reference/xdk.media" - ] - }, - { - "group": "News", - "pages": [ - "xdks/python/reference/xdk.news" - ] - }, - { - "group": "Oauth1 Auth", - "pages": [ - "xdks/python/reference/xdk.oauth1_auth" - ] - }, - { - "group": "Oauth2 Auth", - "pages": [ - "xdks/python/reference/xdk.oauth2_auth" - ] - }, - { - "group": "Paginator", - "pages": [ - "xdks/python/reference/xdk.paginator" - ] - }, - { - "group": "Posts", - "pages": [ - "xdks/python/reference/xdk.posts" - ] - }, - { - "group": "Spaces", - "pages": [ - "xdks/python/reference/xdk.spaces" - ] - }, - { - "group": "Stream", - "pages": [ - "xdks/python/reference/xdk.stream" - ] - }, - { - "group": "Streaming", - "pages": [ - "xdks/python/reference/xdk.streaming" - ] - }, - { - "group": "Trends", - "pages": [ - "xdks/python/reference/xdk.trends" - ] - }, - { - "group": "Usage", - "pages": [ - "xdks/python/reference/xdk.usage" - ] - }, - { - "group": "Users", - "pages": [ - "xdks/python/reference/xdk.users" - ] - }, - { - "group": "Webhooks", - "pages": [ - "xdks/python/reference/xdk.webhooks" - ] - }, - { - "group": "Xdk", - "pages": [ - "xdks/python/reference/xdk" - ] - } - ] - } - ] - } - ] - }, - { - "product": "TypeScript XDK", - "hidden": true, - "pages": [ - "xdks/typescript/overview", - "xdks/typescript/install", - "xdks/typescript/authentication", - "xdks/typescript/pagination", - "xdks/typescript/streaming", - { - "group": "API Reference", - "pages": [ - "xdks/typescript/reference/modules", - { - "group": "Interfaces", - "pages": [ - { - "group": "Client", - "pages": [ - "xdks/typescript/reference/interfaces/ClientConfig" - ] - }, - { - "group": "Http", - "pages": [ - "xdks/typescript/reference/interfaces/HttpClientRequestOptions", - "xdks/typescript/reference/interfaces/HttpResponse" - ] - }, - { - "group": "Misc", - "pages": [ - "xdks/typescript/reference/interfaces/ApiResponse", - "xdks/typescript/reference/interfaces/PaginatedResponse", - "xdks/typescript/reference/interfaces/PaginationMeta", - "xdks/typescript/reference/interfaces/RequestOptions", - "xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscription", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionFilter", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest", - "xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse", - "xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse", - "xdks/typescript/reference/interfaces/Schemas.AddRulesRequest", - "xdks/typescript/reference/interfaces/Schemas.AllowDownloadStatus", - "xdks/typescript/reference/interfaces/Schemas.AltText", - "xdks/typescript/reference/interfaces/Schemas.Analytics", - "xdks/typescript/reference/interfaces/Schemas.AppRulesCount", - "xdks/typescript/reference/interfaces/Schemas.AudiencePolicy", - "xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest", - "xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse", - "xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse", - "xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse", - "xdks/typescript/reference/interfaces/Schemas.CashtagFields", - "xdks/typescript/reference/interfaces/Schemas.ClientAppUsage", - "xdks/typescript/reference/interfaces/Schemas.Community", - "xdks/typescript/reference/interfaces/Schemas.ComplianceJob", - "xdks/typescript/reference/interfaces/Schemas.Connection", - "xdks/typescript/reference/interfaces/Schemas.ContentExpiration", - "xdks/typescript/reference/interfaces/Schemas.ContextAnnotation", - "xdks/typescript/reference/interfaces/Schemas.ContextAnnotationDomainFields", - "xdks/typescript/reference/interfaces/Schemas.ContextAnnotationEntityFields", - "xdks/typescript/reference/interfaces/Schemas.CreateAttachmentsMessageRequest", - "xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest", - "xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse", - "xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest", - "xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse", - "xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest", - "xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse", - "xdks/typescript/reference/interfaces/Schemas.CreateTextMessageRequest", - "xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse", - "xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse", - "xdks/typescript/reference/interfaces/Schemas.DeleteRulesRequest", - "xdks/typescript/reference/interfaces/Schemas.DmEvent", - "xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment", - "xdks/typescript/reference/interfaces/Schemas.DomainRestrictions", - "xdks/typescript/reference/interfaces/Schemas.Engagement", - "xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveExclusive", - "xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveInclusive", - "xdks/typescript/reference/interfaces/Schemas.Error", - "xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest", - "xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse", - "xdks/typescript/reference/interfaces/Schemas.Expansions", - "xdks/typescript/reference/interfaces/Schemas.FilteredStreamingTweetResponse", - "xdks/typescript/reference/interfaces/Schemas.FollowActivityResponsePayload", - "xdks/typescript/reference/interfaces/Schemas.FoundMediaOrigin", - "xdks/typescript/reference/interfaces/Schemas.FullTextEntities", - "xdks/typescript/reference/interfaces/Schemas.Geo", - "xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidContactResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidPayment_networksResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidTransactionsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2FdxCustomersCurrentResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2LikesFirehoseStreamResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2LikesSample10StreamResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2MediaAnalyticsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsAnalyticsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangEnResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangJaResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangKoResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangPtResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsSample10StreamResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsSampleStreamResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse", - "xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse", - "xdks/typescript/reference/interfaces/Schemas.HashtagFields", - "xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse", - "xdks/typescript/reference/interfaces/Schemas.LikeComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.LikeWithTweetAuthor", - "xdks/typescript/reference/interfaces/Schemas.List", - "xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest", - "xdks/typescript/reference/interfaces/Schemas.ListCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.ListCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest", - "xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse", - "xdks/typescript/reference/interfaces/Schemas.ListMutateResponse", - "xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest", - "xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse", - "xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse", - "xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest", - "xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse", - "xdks/typescript/reference/interfaces/Schemas.ManagementInfo", - "xdks/typescript/reference/interfaces/Schemas.Media", - "xdks/typescript/reference/interfaces/Schemas.MediaAnalytics", - "xdks/typescript/reference/interfaces/Schemas.MediaMetrics", - "xdks/typescript/reference/interfaces/Schemas.MediaTimestampedMetrics", - "xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse", - "xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest", - "xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot", - "xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse", - "xdks/typescript/reference/interfaces/Schemas.MentionFields", - "xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.Metrics", - "xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse", - "xdks/typescript/reference/interfaces/Schemas.MuteUserRequest", - "xdks/typescript/reference/interfaces/Schemas.News", - "xdks/typescript/reference/interfaces/Schemas.NewsActivityResponsePayload", - "xdks/typescript/reference/interfaces/Schemas.Note", - "xdks/typescript/reference/interfaces/Schemas.NoteInfo", - "xdks/typescript/reference/interfaces/Schemas.NoteTestResult", - "xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend", - "xdks/typescript/reference/interfaces/Schemas.Place", - "xdks/typescript/reference/interfaces/Schemas.PlaidAccount", - "xdks/typescript/reference/interfaces/Schemas.PlaidAccountContact", - "xdks/typescript/reference/interfaces/Schemas.PlaidAccountPaymentNetwork", - "xdks/typescript/reference/interfaces/Schemas.PlaidAccountTransaction", - "xdks/typescript/reference/interfaces/Schemas.PlaidAddress", - "xdks/typescript/reference/interfaces/Schemas.PlaidCurrency", - "xdks/typescript/reference/interfaces/Schemas.PlaidCustomer", - "xdks/typescript/reference/interfaces/Schemas.PlaidName", - "xdks/typescript/reference/interfaces/Schemas.PlaidTelephone", - "xdks/typescript/reference/interfaces/Schemas.Point", - "xdks/typescript/reference/interfaces/Schemas.Poll", - "xdks/typescript/reference/interfaces/Schemas.PollOption", - "xdks/typescript/reference/interfaces/Schemas.PreviewImage", - "xdks/typescript/reference/interfaces/Schemas.Problem", - "xdks/typescript/reference/interfaces/Schemas.ProcessingInfo", - "xdks/typescript/reference/interfaces/Schemas.ProfileUpdateActivityResponsePayload", - "xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.Rule", - "xdks/typescript/reference/interfaces/Schemas.RuleNoId", - "xdks/typescript/reference/interfaces/Schemas.RulesCount", - "xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse", - "xdks/typescript/reference/interfaces/Schemas.RulesResponseMetadata", - "xdks/typescript/reference/interfaces/Schemas.SearchCount", - "xdks/typescript/reference/interfaces/Schemas.SensitiveMediaWarning", - "xdks/typescript/reference/interfaces/Schemas.SharedInfo", - "xdks/typescript/reference/interfaces/Schemas.Space", - "xdks/typescript/reference/interfaces/Schemas.Sticker", - "xdks/typescript/reference/interfaces/Schemas.StickerInfo", - "xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2", - "xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse", - "xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse", - "xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse", - "xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse", - "xdks/typescript/reference/interfaces/Schemas.Subtitles", - "xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest", - "xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.TimestampedMetrics", - "xdks/typescript/reference/interfaces/Schemas.Topic", - "xdks/typescript/reference/interfaces/Schemas.Trend", - "xdks/typescript/reference/interfaces/Schemas.Tweet", - "xdks/typescript/reference/interfaces/Schemas.TweetComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.TweetDeleteComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.TweetDropComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceObjectSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetHideRequest", - "xdks/typescript/reference/interfaces/Schemas.TweetHideResponse", - "xdks/typescript/reference/interfaces/Schemas.TweetNotice", - "xdks/typescript/reference/interfaces/Schemas.TweetNoticeSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetTakedownComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetUndropComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetUnviewable", - "xdks/typescript/reference/interfaces/Schemas.TweetUnviewableSchema", - "xdks/typescript/reference/interfaces/Schemas.TweetWithheld", - "xdks/typescript/reference/interfaces/Schemas.TweetWithheldComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UnlikeComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UploadSource", - "xdks/typescript/reference/interfaces/Schemas.UrlFields", - "xdks/typescript/reference/interfaces/Schemas.UrlImage", - "xdks/typescript/reference/interfaces/Schemas.Usage", - "xdks/typescript/reference/interfaces/Schemas.UsageFields", - "xdks/typescript/reference/interfaces/Schemas.User", - "xdks/typescript/reference/interfaces/Schemas.UserComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserDeleteComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserProfileModificationComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserProfileModificationObjectSchema", - "xdks/typescript/reference/interfaces/Schemas.UserProtectComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserScrubGeoObjectSchema", - "xdks/typescript/reference/interfaces/Schemas.UserScrubGeoSchema", - "xdks/typescript/reference/interfaces/Schemas.UserSuspendComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserTakedownComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserUndeleteComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserUnprotectComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserUnsuspendComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UserWithheld", - "xdks/typescript/reference/interfaces/Schemas.UserWithheldComplianceSchema", - "xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.Variant", - "xdks/typescript/reference/interfaces/Schemas.WebhookConfig", - "xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest", - "xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse", - "xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse", - "xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse", - "xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse", - "xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest" - ] - } - ] - }, - { - "group": "Classes", - "pages": [ - { - "group": "AccountActivity", - "pages": [ - "xdks/typescript/reference/classes/AccountActivityClient" - ] - }, - { - "group": "Activity", - "pages": [ - "xdks/typescript/reference/classes/ActivityClient" - ] - }, - { - "group": "Client", - "pages": [ - "xdks/typescript/reference/classes/Client" - ] - }, - { - "group": "Clients", - "pages": [ - "xdks/typescript/reference/classes/NewsClient" - ] - }, - { - "group": "Communities", - "pages": [ - "xdks/typescript/reference/classes/CommunitiesClient" - ] - }, - { - "group": "CommunityNotes", - "pages": [ - "xdks/typescript/reference/classes/CommunityNotesClient" - ] - }, - { - "group": "Compliance", - "pages": [ - "xdks/typescript/reference/classes/ComplianceClient" - ] - }, - { - "group": "Connections", - "pages": [ - "xdks/typescript/reference/classes/ConnectionsClient" - ] - }, - { - "group": "Core", - "pages": [ - "xdks/typescript/reference/classes/ApiError" - ] - }, - { - "group": "DirectMessages", - "pages": [ - "xdks/typescript/reference/classes/DirectMessagesClient" - ] - }, - { - "group": "General", - "pages": [ - "xdks/typescript/reference/classes/GeneralClient" - ] - }, - { - "group": "Http", - "pages": [ - "xdks/typescript/reference/classes/HttpClient" - ] - }, - { - "group": "Lists", - "pages": [ - "xdks/typescript/reference/classes/ListsClient" - ] - }, - { - "group": "Media", - "pages": [ - "xdks/typescript/reference/classes/MediaClient" - ] - }, - { - "group": "Pagination", - "pages": [ - "xdks/typescript/reference/classes/EventPaginator", - "xdks/typescript/reference/classes/PostPaginator", - "xdks/typescript/reference/classes/UserPaginator" - ] - }, - { - "group": "Paginator", - "pages": [ - "xdks/typescript/reference/classes/Paginator" - ] - }, - { - "group": "Posts", - "pages": [ - "xdks/typescript/reference/classes/PostsClient" - ] - }, - { - "group": "Spaces", - "pages": [ - "xdks/typescript/reference/classes/SpacesClient" - ] - }, - { - "group": "Stream", - "pages": [ - "xdks/typescript/reference/classes/StreamClient" - ] - }, - { - "group": "Trends", - "pages": [ - "xdks/typescript/reference/classes/TrendsClient" - ] - }, - { - "group": "Usage", - "pages": [ - "xdks/typescript/reference/classes/UsageClient" - ] - }, - { - "group": "Users", - "pages": [ - "xdks/typescript/reference/classes/UsersClient" - ] - }, - { - "group": "Webhooks", - "pages": [ - "xdks/typescript/reference/classes/WebhooksClient" - ] - } + "livestream-api/chat/send-chat-message", + "livestream-api/chat/mute-user", + "livestream-api/chat/unmute-user", + "livestream-api/chat/list-muted-chat-users", + "livestream-api/chat/mute-chat-user", + "livestream-api/chat/unmute-chat-user", + "livestream-api/chat/delete-chat-message", + "livestream-api/chat/list-moderators", + "livestream-api/chat/add-moderator", + "livestream-api/chat/remove-moderator" ] } ] } ] + }, + { + "product": "Enterprise", + "hidden": true, + "groups": [ + { + "group": "Overview", + "pages": [ + "enterprise-api/introduction" + ] + } + ] } ], "global": { @@ -3220,6 +2560,466 @@ "source": "/forms/livestream-api-access", "destination": "/livestream-api/getting-started", "permanent": true + }, + { + "source": "/xdks/python/reference/index", + "destination": "/xdks/python/reference/overview" + }, + { + "source": "/xdks/python/reference/modules", + "destination": "/xdks/python/reference/overview" + }, + { + "source": "/xdks/python/reference/xdk", + "destination": "/xdks/python/reference/overview" + }, + { + "source": "/xdks/python/reference/xdk.client", + "destination": "/xdks/python/reference/overview" + }, + { + "source": "/xdks/python/reference/xdk.schemas", + "destination": "/xdks/python/reference/overview" + }, + { + "source": "/xdks/python/reference/xdk.paginator", + "destination": "/xdks/python/pagination" + }, + { + "source": "/xdks/python/reference/xdk.streaming", + "destination": "/xdks/python/streaming" + }, + { + "source": "/xdks/python/reference/xdk.oauth1_auth", + "destination": "/xdks/python/authentication" + }, + { + "source": "/xdks/python/reference/xdk.oauth2_auth", + "destination": "/xdks/python/authentication" + }, + { + "source": "/xdks/typescript/reference/index", + "destination": "/xdks/typescript/reference/overview" + }, + { + "source": "/xdks/typescript/reference/modules", + "destination": "/xdks/typescript/reference/overview" + }, + { + "source": "/xdks/typescript/reference/classes/Client", + "destination": "/xdks/typescript/reference/overview" + }, + { + "source": "/xdks/typescript/reference/classes/Paginator", + "destination": "/xdks/typescript/pagination" + }, + { + "source": "/xdks/typescript/reference/classes/EventDrivenStream", + "destination": "/xdks/typescript/streaming" + }, + { + "source": "/xdks/typescript/reference/classes/OAuth1", + "destination": "/xdks/typescript/authentication" + }, + { + "source": "/xdks/typescript/reference/classes/OAuth2", + "destination": "/xdks/typescript/authentication" + }, + { + "source": "/xdks/python/reference/xdk.account", + "destination": "/xdks/python/reference/clients/account" + }, + { + "source": "/xdks/python/reference/xdk.account.client", + "destination": "/xdks/python/reference/clients/account" + }, + { + "source": "/xdks/python/reference/xdk.account.models", + "destination": "/xdks/python/reference/clients/account" + }, + { + "source": "/xdks/typescript/reference/classes/AccountClient", + "destination": "/xdks/typescript/reference/clients/account" + }, + { + "source": "/xdks/python/reference/xdk.account_activity", + "destination": "/xdks/python/reference/clients/account-activity" + }, + { + "source": "/xdks/python/reference/xdk.account_activity.client", + "destination": "/xdks/python/reference/clients/account-activity" + }, + { + "source": "/xdks/python/reference/xdk.account_activity.models", + "destination": "/xdks/python/reference/clients/account-activity" + }, + { + "source": "/xdks/typescript/reference/classes/AccountActivityClient", + "destination": "/xdks/typescript/reference/clients/account-activity" + }, + { + "source": "/xdks/python/reference/xdk.activity", + "destination": "/xdks/python/reference/clients/activity" + }, + { + "source": "/xdks/python/reference/xdk.activity.client", + "destination": "/xdks/python/reference/clients/activity" + }, + { + "source": "/xdks/python/reference/xdk.activity.models", + "destination": "/xdks/python/reference/clients/activity" + }, + { + "source": "/xdks/typescript/reference/classes/ActivityClient", + "destination": "/xdks/typescript/reference/clients/activity" + }, + { + "source": "/xdks/python/reference/xdk.articles", + "destination": "/xdks/python/reference/clients/articles" + }, + { + "source": "/xdks/python/reference/xdk.articles.client", + "destination": "/xdks/python/reference/clients/articles" + }, + { + "source": "/xdks/python/reference/xdk.articles.models", + "destination": "/xdks/python/reference/clients/articles" + }, + { + "source": "/xdks/typescript/reference/classes/ArticlesClient", + "destination": "/xdks/typescript/reference/clients/articles" + }, + { + "source": "/xdks/python/reference/xdk.bots", + "destination": "/xdks/python/reference/clients/bots" + }, + { + "source": "/xdks/python/reference/xdk.bots.client", + "destination": "/xdks/python/reference/clients/bots" + }, + { + "source": "/xdks/python/reference/xdk.bots.models", + "destination": "/xdks/python/reference/clients/bots" + }, + { + "source": "/xdks/typescript/reference/classes/BotsClient", + "destination": "/xdks/typescript/reference/clients/bots" + }, + { + "source": "/xdks/python/reference/xdk.broadcasts", + "destination": "/xdks/python/reference/clients/broadcasts" + }, + { + "source": "/xdks/python/reference/xdk.broadcasts.client", + "destination": "/xdks/python/reference/clients/broadcasts" + }, + { + "source": "/xdks/python/reference/xdk.broadcasts.models", + "destination": "/xdks/python/reference/clients/broadcasts" + }, + { + "source": "/xdks/typescript/reference/classes/BroadcastsClient", + "destination": "/xdks/typescript/reference/clients/broadcasts" + }, + { + "source": "/xdks/python/reference/xdk.calls", + "destination": "/xdks/python/reference/clients/calls" + }, + { + "source": "/xdks/python/reference/xdk.calls.client", + "destination": "/xdks/python/reference/clients/calls" + }, + { + "source": "/xdks/python/reference/xdk.calls.models", + "destination": "/xdks/python/reference/clients/calls" + }, + { + "source": "/xdks/typescript/reference/classes/CallsClient", + "destination": "/xdks/typescript/reference/clients/calls" + }, + { + "source": "/xdks/python/reference/xdk.chat", + "destination": "/xdks/python/reference/clients/chat" + }, + { + "source": "/xdks/python/reference/xdk.chat.client", + "destination": "/xdks/python/reference/clients/chat" + }, + { + "source": "/xdks/python/reference/xdk.chat.models", + "destination": "/xdks/python/reference/clients/chat" + }, + { + "source": "/xdks/typescript/reference/classes/ChatClient", + "destination": "/xdks/typescript/reference/clients/chat" + }, + { + "source": "/xdks/python/reference/xdk.communities", + "destination": "/xdks/python/reference/clients/communities" + }, + { + "source": "/xdks/python/reference/xdk.communities.client", + "destination": "/xdks/python/reference/clients/communities" + }, + { + "source": "/xdks/python/reference/xdk.communities.models", + "destination": "/xdks/python/reference/clients/communities" + }, + { + "source": "/xdks/typescript/reference/classes/CommunitiesClient", + "destination": "/xdks/typescript/reference/clients/communities" + }, + { + "source": "/xdks/python/reference/xdk.community_notes", + "destination": "/xdks/python/reference/clients/community-notes" + }, + { + "source": "/xdks/python/reference/xdk.community_notes.client", + "destination": "/xdks/python/reference/clients/community-notes" + }, + { + "source": "/xdks/python/reference/xdk.community_notes.models", + "destination": "/xdks/python/reference/clients/community-notes" + }, + { + "source": "/xdks/typescript/reference/classes/CommunityNotesClient", + "destination": "/xdks/typescript/reference/clients/community-notes" + }, + { + "source": "/xdks/python/reference/xdk.compliance", + "destination": "/xdks/python/reference/clients/compliance" + }, + { + "source": "/xdks/python/reference/xdk.compliance.client", + "destination": "/xdks/python/reference/clients/compliance" + }, + { + "source": "/xdks/python/reference/xdk.compliance.models", + "destination": "/xdks/python/reference/clients/compliance" + }, + { + "source": "/xdks/typescript/reference/classes/ComplianceClient", + "destination": "/xdks/typescript/reference/clients/compliance" + }, + { + "source": "/xdks/python/reference/xdk.connections", + "destination": "/xdks/python/reference/clients/connections" + }, + { + "source": "/xdks/python/reference/xdk.connections.client", + "destination": "/xdks/python/reference/clients/connections" + }, + { + "source": "/xdks/python/reference/xdk.connections.models", + "destination": "/xdks/python/reference/clients/connections" + }, + { + "source": "/xdks/typescript/reference/classes/ConnectionsClient", + "destination": "/xdks/typescript/reference/clients/connections" + }, + { + "source": "/xdks/python/reference/xdk.direct_messages", + "destination": "/xdks/python/reference/clients/direct-messages" + }, + { + "source": "/xdks/python/reference/xdk.direct_messages.client", + "destination": "/xdks/python/reference/clients/direct-messages" + }, + { + "source": "/xdks/python/reference/xdk.direct_messages.models", + "destination": "/xdks/python/reference/clients/direct-messages" + }, + { + "source": "/xdks/typescript/reference/classes/DirectMessagesClient", + "destination": "/xdks/typescript/reference/clients/direct-messages" + }, + { + "source": "/xdks/python/reference/xdk.general", + "destination": "/xdks/python/reference/clients/general" + }, + { + "source": "/xdks/python/reference/xdk.general.client", + "destination": "/xdks/python/reference/clients/general" + }, + { + "source": "/xdks/python/reference/xdk.general.models", + "destination": "/xdks/python/reference/clients/general" + }, + { + "source": "/xdks/typescript/reference/classes/GeneralClient", + "destination": "/xdks/typescript/reference/clients/general" + }, + { + "source": "/xdks/python/reference/xdk.lists", + "destination": "/xdks/python/reference/clients/lists" + }, + { + "source": "/xdks/python/reference/xdk.lists.client", + "destination": "/xdks/python/reference/clients/lists" + }, + { + "source": "/xdks/python/reference/xdk.lists.models", + "destination": "/xdks/python/reference/clients/lists" + }, + { + "source": "/xdks/typescript/reference/classes/ListsClient", + "destination": "/xdks/typescript/reference/clients/lists" + }, + { + "source": "/xdks/python/reference/xdk.media", + "destination": "/xdks/python/reference/clients/media" + }, + { + "source": "/xdks/python/reference/xdk.media.client", + "destination": "/xdks/python/reference/clients/media" + }, + { + "source": "/xdks/python/reference/xdk.media.models", + "destination": "/xdks/python/reference/clients/media" + }, + { + "source": "/xdks/typescript/reference/classes/MediaClient", + "destination": "/xdks/typescript/reference/clients/media" + }, + { + "source": "/xdks/python/reference/xdk.news", + "destination": "/xdks/python/reference/clients/news" + }, + { + "source": "/xdks/python/reference/xdk.news.client", + "destination": "/xdks/python/reference/clients/news" + }, + { + "source": "/xdks/python/reference/xdk.news.models", + "destination": "/xdks/python/reference/clients/news" + }, + { + "source": "/xdks/typescript/reference/classes/NewsClient", + "destination": "/xdks/typescript/reference/clients/news" + }, + { + "source": "/xdks/python/reference/xdk.posts", + "destination": "/xdks/python/reference/clients/posts" + }, + { + "source": "/xdks/python/reference/xdk.posts.client", + "destination": "/xdks/python/reference/clients/posts" + }, + { + "source": "/xdks/python/reference/xdk.posts.models", + "destination": "/xdks/python/reference/clients/posts" + }, + { + "source": "/xdks/typescript/reference/classes/PostsClient", + "destination": "/xdks/typescript/reference/clients/posts" + }, + { + "source": "/xdks/python/reference/xdk.spaces", + "destination": "/xdks/python/reference/clients/spaces" + }, + { + "source": "/xdks/python/reference/xdk.spaces.client", + "destination": "/xdks/python/reference/clients/spaces" + }, + { + "source": "/xdks/python/reference/xdk.spaces.models", + "destination": "/xdks/python/reference/clients/spaces" + }, + { + "source": "/xdks/typescript/reference/classes/SpacesClient", + "destination": "/xdks/typescript/reference/clients/spaces" + }, + { + "source": "/xdks/python/reference/xdk.stream", + "destination": "/xdks/python/reference/clients/stream" + }, + { + "source": "/xdks/python/reference/xdk.stream.client", + "destination": "/xdks/python/reference/clients/stream" + }, + { + "source": "/xdks/python/reference/xdk.stream.models", + "destination": "/xdks/python/reference/clients/stream" + }, + { + "source": "/xdks/typescript/reference/classes/StreamClient", + "destination": "/xdks/typescript/reference/clients/stream" + }, + { + "source": "/xdks/python/reference/xdk.trends", + "destination": "/xdks/python/reference/clients/trends" + }, + { + "source": "/xdks/python/reference/xdk.trends.client", + "destination": "/xdks/python/reference/clients/trends" + }, + { + "source": "/xdks/python/reference/xdk.trends.models", + "destination": "/xdks/python/reference/clients/trends" + }, + { + "source": "/xdks/typescript/reference/classes/TrendsClient", + "destination": "/xdks/typescript/reference/clients/trends" + }, + { + "source": "/xdks/python/reference/xdk.usage", + "destination": "/xdks/python/reference/clients/usage" + }, + { + "source": "/xdks/python/reference/xdk.usage.client", + "destination": "/xdks/python/reference/clients/usage" + }, + { + "source": "/xdks/python/reference/xdk.usage.models", + "destination": "/xdks/python/reference/clients/usage" + }, + { + "source": "/xdks/typescript/reference/classes/UsageClient", + "destination": "/xdks/typescript/reference/clients/usage" + }, + { + "source": "/xdks/python/reference/xdk.users", + "destination": "/xdks/python/reference/clients/users" + }, + { + "source": "/xdks/python/reference/xdk.users.client", + "destination": "/xdks/python/reference/clients/users" + }, + { + "source": "/xdks/python/reference/xdk.users.models", + "destination": "/xdks/python/reference/clients/users" + }, + { + "source": "/xdks/typescript/reference/classes/UsersClient", + "destination": "/xdks/typescript/reference/clients/users" + }, + { + "source": "/xdks/python/reference/xdk.webhooks", + "destination": "/xdks/python/reference/clients/webhooks" + }, + { + "source": "/xdks/python/reference/xdk.webhooks.client", + "destination": "/xdks/python/reference/clients/webhooks" + }, + { + "source": "/xdks/python/reference/xdk.webhooks.models", + "destination": "/xdks/python/reference/clients/webhooks" + }, + { + "source": "/xdks/typescript/reference/classes/WebhooksClient", + "destination": "/xdks/typescript/reference/clients/webhooks" + }, + { + "source": "/xdks/typescript/reference/interfaces/:slug*", + "destination": "/xdks/typescript/reference/overview" + }, + { + "source": "/xdks/typescript/reference/functions/:slug*", + "destination": "/xdks/typescript/reference/overview" + }, + { + "source": "/xdks/typescript/reference/variables/:slug*", + "destination": "/xdks/typescript/reference/overview" } ], "seo": { @@ -3261,5 +3061,24 @@ } } ] + }, + "api": { + "openapi": { + "source": "openapi.json", + "overlays": [ + "overlays/xdk-code-samples.json" + ] + }, + "examples": { + "languages": [ + "curl", + "python", + "typescript", + "java", + "csharp", + "bash" + ], + "defaults": "required" + } } } diff --git a/enterprise-api/getting-started/important-resources.mdx b/enterprise-api/getting-started/important-resources.mdx index b3b51ea6a..55955c48a 100644 --- a/enterprise-api/getting-started/important-resources.mdx +++ b/enterprise-api/getting-started/important-resources.mdx @@ -34,8 +34,10 @@ Bookmark these essential resources for X API development. |:-----|:------------| | [Developer Console](https://console.x.com) | Manage apps, credentials, and billing | | [Postman Collection](https://www.postman.com/xapidevelopers/x-api-public-workspace/collection/34902927-2efc5689-99c6-4ab6-8091-996f35c2fd80) | Interactive API testing | -| [Python SDK](/xdks/python/overview) | Official Python library | -| [TypeScript SDK](/xdks/typescript/overview) | Official TypeScript library | +| [Python SDK](/xdks/python/overview) | Official Python library (`xdk`) | +| [TypeScript SDK](/xdks/typescript/overview) | Official TypeScript/JavaScript library (`@xdevplatform/xdk`) | +| [Java SDK](/xdks/java/overview) | Official Java 17+ library (`com.x:xdk`) | +| [C# SDK](/xdks/csharp/overview) | Official .NET 8+ library (`XDevPlatform.Xdk`) | | [OpenAPI Spec](https://api.x.com/2/openapi.json) | Machine-readable API specification | --- diff --git a/enterprise-api/getting-started/make-your-first-request.mdx b/enterprise-api/getting-started/make-your-first-request.mdx index 69f2a7596..2929c6bc3 100644 --- a/enterprise-api/getting-started/make-your-first-request.mdx +++ b/enterprise-api/getting-started/make-your-first-request.mdx @@ -164,8 +164,10 @@ fetch(url, { For production use, we recommend the official SDKs: -- [Python SDK](/xdks/python/overview) -- [TypeScript SDK](/xdks/typescript/overview) +- [Python SDK](/xdks/python/overview) (`pip install xdk`) +- [TypeScript SDK](/xdks/typescript/overview) (`npm install @xdevplatform/xdk`) +- [Java SDK](/xdks/java/overview) (`com.x:xdk` on Maven Central) +- [C# / .NET SDK](/xdks/csharp/overview) (`dotnet add package XDevPlatform.Xdk`) They handle authentication, pagination, and rate limiting automatically. diff --git a/enterprise-api/introduction.mdx b/enterprise-api/introduction.mdx index c2992e3f1..950880eeb 100644 --- a/enterprise-api/introduction.mdx +++ b/enterprise-api/introduction.mdx @@ -17,8 +17,8 @@ The X API Enterprise plan provides the highest level of access to X data. Get co Explore all available endpoints, including Enterprise-exclusive ones. - - Official Python and TypeScript libraries. + + Official Python, TypeScript, Java, and C# libraries. @@ -219,15 +219,18 @@ Enterprise access powers the most demanding use cases on X. ## Tools & libraries - + - Official Python library with async support. + Official Python library (`xdk`). - Official TypeScript/JavaScript library. + Official TypeScript/JavaScript library (`@xdevplatform/xdk`). + + + Official Java 17+ library (`com.x:xdk`). - - Interactive API explorer. + + Official .NET 8+ library (`XDevPlatform.Xdk`). diff --git a/fundamentals/authentication/oauth-2-0/oauth-1-0a-token-exchange.mdx b/fundamentals/authentication/oauth-2-0/oauth-1-0a-token-exchange.mdx index e71a51440..9b6fdc386 100644 --- a/fundamentals/authentication/oauth-2-0/oauth-1-0a-token-exchange.mdx +++ b/fundamentals/authentication/oauth-2-0/oauth-1-0a-token-exchange.mdx @@ -214,7 +214,7 @@ Authorization: Bearer -With the [Python](/xdks/python/overview) or [TypeScript](/xdks/typescript/overview) XDK, pass the user's access token instead of an `OAuth1` object: +With the [Python](/xdks/python/overview), [TypeScript](/xdks/typescript/overview), [Java](/xdks/java/overview), or [C#](/xdks/csharp/overview) XDK, pass the user's access token instead of an `OAuth1` object: @@ -232,6 +232,20 @@ const client = new Client({ accessToken }); const me = await client.users.getMe(); ``` +```java Java +import com.x.xdk.XClient; + +XClient client = XClient.builder().accessToken(accessToken).build(); +var me = client.users().getMe(); +``` + +```csharp C# +using Xdk; + +using var client = new XClient(new XClientOptions { AccessToken = accessToken }); +var me = await client.Users.GetMeAsync(); +``` + ```bash cURL curl "https://api.x.com/2/users/me" \ --header "Authorization: Bearer $ACCESS_TOKEN" diff --git a/important-resources.mdx b/important-resources.mdx index 1064eadbd..740402781 100644 --- a/important-resources.mdx +++ b/important-resources.mdx @@ -35,8 +35,10 @@ Bookmark these essential resources for X API development. |:-----|:------------| | [Developer Console](https://console.x.com) | Manage apps, credentials, and billing | | [Postman Collection](https://www.postman.com/xapidevelopers/x-api-public-workspace/collection/34902927-2efc5689-99c6-4ab6-8091-996f35c2fd80) | Interactive API testing | -| [Python SDK](/xdks/python/overview) | Official Python library | -| [TypeScript SDK](/xdks/typescript/overview) | Official TypeScript library | +| [Python SDK](/xdks/python/overview) | Official Python library (`xdk`) | +| [TypeScript SDK](/xdks/typescript/overview) | Official TypeScript/JavaScript library (`@xdevplatform/xdk`) | +| [Java SDK](/xdks/java/overview) | Official Java 17+ library (`com.x:xdk`) | +| [C# SDK](/xdks/csharp/overview) | Official .NET 8+ library (`XDevPlatform.Xdk`) | | [OpenAPI Spec](https://api.x.com/2/openapi.json) | Machine-readable API specification | --- diff --git a/llms.txt b/llms.txt index 335cde567..52303d130 100644 --- a/llms.txt +++ b/llms.txt @@ -15,8 +15,8 @@ - [X API v2 — Full Index](https://docs.x.com/x-api/llms.txt): 370+ reference pages (Posts, Users, DMs, Lists, Spaces, Streams, Compliance, Webhooks, Media, etc.) - [Enterprise APIs — Full Index](https://docs.x.com/enterprise-api/llms.txt): Account Activity, X Activity (XAA), Compliance, Chat, Communities, Direct Messages, News, Trends, Webhooks, and historical GNIP/PowerTrack - [Ads API — Full Index](https://docs.x.com/x-ads-api/llms.txt): Campaign management, creatives, audiences, analytics, lead generation, measurement, and conversions -- [SDKs (XDKs) — Full Index](https://docs.x.com/xdks/llms.txt): Python + TypeScript/JavaScript SDK clients, models, and references -- [Python XDK Detail](https://docs.x.com/xdks/python/llms.txt) · [TypeScript XDK Detail](https://docs.x.com/xdks/typescript/llms.txt) +- [SDKs (XDKs) — Full Index](https://docs.x.com/xdks/llms.txt): Official Python, TypeScript, Java, and C# (.NET) SDK clients, guides, and references +- [Python XDK](https://docs.x.com/xdks/python/llms.txt) · [TypeScript XDK](https://docs.x.com/xdks/typescript/llms.txt) · [Java XDK](https://docs.x.com/xdks/java/llms.txt) · [C# XDK](https://docs.x.com/xdks/csharp/llms.txt) ## Key Fundamentals & Tools diff --git a/make-your-first-request.mdx b/make-your-first-request.mdx index 9809e96f0..cce227eb6 100644 --- a/make-your-first-request.mdx +++ b/make-your-first-request.mdx @@ -165,8 +165,10 @@ fetch(url, { For production use, we recommend the official SDKs: -- [Python SDK](/xdks/python/overview) -- [TypeScript SDK](/xdks/typescript/overview) +- [Python SDK](/xdks/python/overview) (`pip install xdk`) +- [TypeScript SDK](/xdks/typescript/overview) (`npm install @xdevplatform/xdk`) +- [Java SDK](/xdks/java/overview) (`com.x:xdk` on Maven Central) +- [C# / .NET SDK](/xdks/csharp/overview) (`dotnet add package XDevPlatform.Xdk`) They handle authentication, pagination, and rate limiting automatically. diff --git a/overlays/xdk-code-samples.json b/overlays/xdk-code-samples.json new file mode 100644 index 000000000..f659984bd --- /dev/null +++ b/overlays/xdk-code-samples.json @@ -0,0 +1,8746 @@ +{ + "overlay": "1.1.0", + "info": { + "title": "X API Official XDK & xurl Code Samples", + "version": "py-0.11.2_ts-0.7.2_java-0.1.2_cs-0.1.2" + }, + "extends": "../openapi.json", + "actions": [ + { + "target": "$.paths['/2/account'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.account.get_developer()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.account.getDeveloper();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.account().getDeveloper();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Account.GetDeveloperAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/account" + } + ] + } + }, + { + "target": "$.paths['/2/account'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.account.models import EnsureRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.account.ensure(body=EnsureRequest(metadata=\"example\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.account.ensure({ metadata: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.account().ensure(new Schemas.EnsureAccountRequest().metadata(\"example\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Account.EnsureAsync(new EnsureAccountRequest { Metadata = \"example\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/account \\\n -d '{\"metadata\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/account_activity/subscriptions/count'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.account_activity.get_subscription_count()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.accountActivity.getSubscriptionCount();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.accountActivity().getSubscriptionCount();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.AccountActivity.GetSubscriptionCountAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/account_activity/subscriptions/count" + } + ] + } + }, + { + "target": "$.paths['/2/account_activity/webhooks/{webhook_id}/subscriptions/all'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.account_activity.validate_subscription(webhook_id=\"1234567890\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.accountActivity.validateSubscription(\"1234567890\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.accountActivity().validateSubscription(\"1234567890\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.AccountActivity.ValidateSubscriptionAsync(\"1234567890\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/account_activity/webhooks/1234567890/subscriptions/all" + } + ] + } + }, + { + "target": "$.paths['/2/account_activity/webhooks/{webhook_id}/subscriptions/all'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.account_activity.models import CreateSubscriptionRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.account_activity.create_subscription(webhook_id=\"1234567890\", body=CreateSubscriptionRequest())\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.accountActivity.createSubscription(\"1234567890\", {});\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.accountActivity().createSubscription(\"1234567890\", new Schemas.CreateAccountActivitySubscriptionRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.AccountActivity.CreateSubscriptionAsync(\"1234567890\", new CreateAccountActivitySubscriptionRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/account_activity/webhooks/1234567890/subscriptions/all \\\n -d '{}'" + } + ] + } + }, + { + "target": "$.paths['/2/account_activity/webhooks/{webhook_id}/subscriptions/all/list'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.account_activity.get_subscriptions(webhook_id=\"1234567890\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.accountActivity.getSubscriptions(\"1234567890\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.accountActivity().getSubscriptions(\"1234567890\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.AccountActivity.GetSubscriptionsAsync(\"1234567890\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/account_activity/webhooks/1234567890/subscriptions/all/list" + } + ] + } + }, + { + "target": "$.paths['/2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.account_activity.delete_subscription(webhook_id=\"1234567890\", user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.accountActivity.deleteSubscription(\"1234567890\", \"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.accountActivity().deleteSubscription(\"1234567890\", \"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.AccountActivity.DeleteSubscriptionAsync(\"1234567890\", \"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/account_activity/webhooks/1234567890/subscriptions/2244994945/all" + } + ] + } + }, + { + "target": "$.paths['/2/activity/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.activity():\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.activity();\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().activity()) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.ActivityStream();\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s /2/activity/stream" + } + ] + } + }, + { + "target": "$.paths['/2/activity/subscriptions'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.activity.delete_subscriptions_by_ids(ids=[\"1895000000000000000\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.activity.deleteSubscriptionsByIds([\"1895000000000000000\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.activity().deleteSubscriptionsByIds(List.of(\"1895000000000000000\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Activity.DeleteSubscriptionsByIdsAsync(new List { \"1895000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE \"/2/activity/subscriptions?ids=1895000000000000000\"" + } + ] + } + }, + { + "target": "$.paths['/2/activity/subscriptions'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.activity.get_subscriptions():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.activity.getSubscriptions();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.activity().getSubscriptionsPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Activity.GetSubscriptionsPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/activity/subscriptions" + } + ] + } + }, + { + "target": "$.paths['/2/activity/subscriptions'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.activity.models import CreateSubscriptionRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.activity.create_subscription(\n body=CreateSubscriptionRequest(event_type=\"profile.update.bio\", filter={\"user_id\": \"2244994945\"})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.activity.createSubscription(\n { \"event_type\": \"profile.update.bio\", filter: { \"user_id\": \"2244994945\" } }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.activity().createSubscription(\n new Schemas.CreateActivitySubscriptionRequest().eventType(\"profile.update.bio\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Activity.CreateSubscriptionAsync(\n new CreateActivitySubscriptionRequest { EventType = \"profile.update.bio\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/activity/subscriptions \\\n -d '{\"event_type\":\"profile.update.bio\",\"filter\":{\"user_id\":\"2244994945\"}}'" + } + ] + } + }, + { + "target": "$.paths['/2/activity/subscriptions/{subscription_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.activity.delete_subscription(subscription_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.activity.deleteSubscription(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.activity().deleteSubscription(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Activity.DeleteSubscriptionAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/activity/subscriptions/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/activity/subscriptions/{subscription_id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.activity.models import UpdateSubscriptionRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.activity.update_subscription(\n subscription_id=\"1895000000000000000\",\n body=UpdateSubscriptionRequest(tag=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.activity.updateSubscription(\"1895000000000000000\", { tag: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.activity().updateSubscription(\n \"1895000000000000000\",\n new Schemas.UpdateActivitySubscriptionRequest().tag(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Activity.UpdateSubscriptionAsync(\n \"1895000000000000000\",\n new UpdateActivitySubscriptionRequest { Tag = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/activity/subscriptions/1895000000000000000 \\\n -d '{\"tag\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/articles/draft'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.articles.models import ArticleCreateDraftRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.articles.article_create_draft(\n body=ArticleCreateDraftRequest(title=\"example\", content_state={\"blocks\": [{}], \"entities\": [{}]})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.articles.articleCreateDraft(\n { title: \"example\", \"content_state\": { blocks: [{}], entities: [{}] } }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.articles().articleCreateDraft(new Schemas.ArticleCreateDraftRequest().title(\"example\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Articles.ArticleCreateDraftAsync(new ArticleCreateDraftRequest { Title = \"example\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/articles/draft \\\n -d '{\"title\":\"example\",\"content_state\":{\"blocks\":[{}],\"entities\":[{}]}}'" + } + ] + } + }, + { + "target": "$.paths['/2/articles/{article_id}/publish'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.articles.article_publish(article_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.articles.articlePublish(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.articles().articlePublish(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Articles.ArticlePublishAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/articles/1895000000000000000/publish" + } + ] + } + }, + { + "target": "$.paths['/2/bots'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.bots.get()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.bots.get();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.bots().get();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Bots.GetAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/bots" + } + ] + } + }, + { + "target": "$.paths['/2/bots'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.bots.models import CreateBotRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.bots.create_bot(body=CreateBotRequest(handle=\"example\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.bots.createBot({ handle: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.bots().createBot(new Schemas.CreateBotRequest().handle(\"example\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Bots.CreateBotAsync(new CreateBotRequest { Handle = \"example\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/bots \\\n -d '{\"handle\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/bots/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.bots.delete_bot(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.bots.deleteBot(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.bots().deleteBot(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Bots.DeleteBotAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/bots/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/bots/{id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.bots.models import UpdateBotRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.bots.update_bot(id=\"1895000000000000000\", body=UpdateBotRequest(handle=\"example\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.bots.updateBot(\"1895000000000000000\", { handle: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.bots().updateBot(\n \"1895000000000000000\",\n new Schemas.UpdateBotRequest().handle(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Bots.UpdateBotAsync(\"1895000000000000000\", new UpdateBotRequest { Handle = \"example\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/bots/1895000000000000000 \\\n -d '{\"handle\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/bots/{id}/token'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.bots.revoke_bot_token(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.bots.revokeBotToken(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.bots().revokeBotToken(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Bots.RevokeBotTokenAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/bots/1895000000000000000/token" + } + ] + } + }, + { + "target": "$.paths['/2/bots/{id}/token'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.bots.models import RotateBotTokenRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.bots.rotate_bot_token(\n id=\"1895000000000000000\",\n body=RotateBotTokenRequest(scopes=[\"example\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.bots.rotateBotToken(\"1895000000000000000\", { scopes: [\"example\"] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.bots().rotateBotToken(\n \"1895000000000000000\",\n new Schemas.RotateBotTokenRequest().scopes(List.of(\"example\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Bots.RotateBotTokenAsync(\n \"1895000000000000000\",\n new RotateBotTokenRequest { Scopes = new List { \"example\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/bots/1895000000000000000/token \\\n -d '{\"scopes\":[\"example\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.broadcasts.list():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.list();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.broadcasts().listPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Broadcasts.ListPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import CreateBroadcastRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.create_broadcast(body=CreateBroadcastRequest(source_id=\"1895000000000000000\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.createBroadcast({ \"source_id\": \"1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().createBroadcast(new Schemas.CreateBroadcastRequest().sourceId(\"1895000000000000000\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.CreateBroadcastAsync(new CreateBroadcastRequest { SourceId = \"1895000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/broadcasts \\\n -d '{\"source_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/categories'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.broadcasts.list_live_categories()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.broadcasts.listLiveCategories();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().listLiveCategories();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.ListLiveCategoriesAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts/categories" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/chat/moderators'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_chat_moderators()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getChatModerators();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getChatModerators();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetChatModeratorsAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts/chat/moderators" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/chat/moderators'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import AddChatModeratorRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.add_chat_moderator(body=AddChatModeratorRequest(user_id=\"2244994945\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.addChatModerator({ \"user_id\": \"2244994945\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().addChatModerator(new Schemas.AddChatModeratorRequest().userId(\"2244994945\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.AddChatModeratorAsync(new AddChatModeratorRequest { UserId = \"2244994945\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/broadcasts/chat/moderators \\\n -d '{\"user_id\":\"2244994945\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/chat/moderators/{user_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.remove_chat_moderator(user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.removeChatModerator(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().removeChatModerator(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.RemoveChatModeratorAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/broadcasts/chat/moderators/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/chat/mutes'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.broadcasts.get_chat_muted_users():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getChatMutedUsers();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.broadcasts().getChatMutedUsersPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Broadcasts.GetChatMutedUsersPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts/chat/mutes" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/chat/mutes'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import MuteChatUserRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.mute_chat_user(body=MuteChatUserRequest(user_id=\"2244994945\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.muteChatUser({ \"user_id\": \"2244994945\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().muteChatUser(new Schemas.MuteChatUserRequest().userId(\"2244994945\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.MuteChatUserAsync(new MuteChatUserRequest { UserId = \"2244994945\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/broadcasts/chat/mutes \\\n -d '{\"user_id\":\"2244994945\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/chat/mutes/{user_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.unmute_chat_user(user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.unmuteChatUser(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().unmuteChatUser(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UnmuteChatUserAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/broadcasts/chat/mutes/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/scheduled'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.broadcasts.list_scheduled():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.listScheduled();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.broadcasts().listScheduledPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Broadcasts.ListScheduledPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts/scheduled" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/scheduled'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import CreateScheduledBroadcastRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.create_scheduled_broadcast(\n body=CreateScheduledBroadcastRequest(source_id=\"1895000000000000000\", scheduled_start_ms=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.createScheduledBroadcast(\n { \"source_id\": \"1895000000000000000\", \"scheduled_start_ms\": \"example\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().createScheduledBroadcast(\n new Schemas.CreateScheduledBroadcastRequest().sourceId(\"1895000000000000000\").scheduledStartMs(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.CreateScheduledBroadcastAsync(\n new CreateScheduledBroadcastRequest { SourceId = \"1895000000000000000\", ScheduledStartMs = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/broadcasts/scheduled \\\n -d '{\"source_id\":\"1895000000000000000\",\"scheduled_start_ms\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/scheduled/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.delete_scheduled_broadcast(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.deleteScheduledBroadcast(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().deleteScheduledBroadcast(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.DeleteScheduledBroadcastAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/broadcasts/scheduled/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/scheduled/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_scheduled_broadcast(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getScheduledBroadcast(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getScheduledBroadcast(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetScheduledBroadcastAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts/scheduled/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/scheduled/{id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import UpdateScheduledBroadcastRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.update_scheduled_broadcast(\n id=\"1895000000000000000\",\n body=UpdateScheduledBroadcastRequest(scheduled_broadcast_id=\"1895000000000000000\", scheduled_start_ms=\"example\", scheduled_end_ms=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.updateScheduledBroadcast(\n \"1895000000000000000\",\n { \"scheduled_broadcast_id\": \"1895000000000000000\", \"scheduled_start_ms\": \"example\", \"scheduled_end_ms\": \"example\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().updateScheduledBroadcast(\n \"1895000000000000000\",\n new Schemas.UpdateScheduledBroadcastRequest().scheduledBroadcastId(\"1895000000000000000\").scheduledStartMs(\"example\").scheduledEndMs(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UpdateScheduledBroadcastAsync(\n \"1895000000000000000\",\n new UpdateScheduledBroadcastRequest { ScheduledBroadcastId = \"1895000000000000000\", ScheduledStartMs = \"example\", ScheduledEndMs = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/broadcasts/scheduled/1895000000000000000 \\\n -d '{\"scheduled_broadcast_id\":\"1895000000000000000\",\"scheduled_start_ms\":\"example\",\"scheduled_end_ms\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/scheduled/{id}/live'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.go_live_scheduled_broadcast(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.goLiveScheduledBroadcast(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().goLiveScheduledBroadcast(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GoLiveScheduledBroadcastAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/broadcasts/scheduled/1895000000000000000/live" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.delete_broadcast(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.deleteBroadcast(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().deleteBroadcast(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.DeleteBroadcastAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/broadcasts/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_broadcast(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getBroadcast(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getBroadcast(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetBroadcastAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import UpdateBroadcastRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.update_broadcast(\n id=\"1895000000000000000\",\n body=UpdateBroadcastRequest(live_category_id=\"1895000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.updateBroadcast(\"1895000000000000000\", { \"live_category_id\": \"1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().updateBroadcast(\n \"1895000000000000000\",\n new Schemas.UpdateBroadcastRequest().liveCategoryId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UpdateBroadcastAsync(\n \"1895000000000000000\",\n new UpdateBroadcastRequest { LiveCategoryId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/broadcasts/1895000000000000000 \\\n -d '{\"live_category_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}/chat'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.broadcasts.get_broadcast_chat(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getBroadcastChat(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.broadcasts().getBroadcastChatPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Broadcasts.GetBroadcastChatPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/broadcasts/1895000000000000000/chat" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}/chat'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import SendBroadcastChatRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.send_broadcast_chat(\n id=\"1895000000000000000\",\n body=SendBroadcastChatRequest(text=\"Hello from XDK!\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.sendBroadcastChat(\"1895000000000000000\", { text: \"Hello from XDK!\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().sendBroadcastChat(\n \"1895000000000000000\",\n new Schemas.SendBroadcastChatRequest().text(\"Hello from XDK!\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.SendBroadcastChatAsync(\n \"1895000000000000000\",\n new SendBroadcastChatRequest { Text = \"Hello from XDK!\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/broadcasts/1895000000000000000/chat \\\n -d '{\"text\":\"Hello from XDK!\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}/chat/mutes'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import MuteBroadcastChatUserRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.mute_broadcast_chat_user(\n id=\"1895000000000000000\",\n body=MuteBroadcastChatUserRequest(user_id=\"2244994945\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.muteBroadcastChatUser(\"1895000000000000000\", { \"user_id\": \"2244994945\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().muteBroadcastChatUser(\n \"1895000000000000000\",\n new Schemas.MuteBroadcastChatUserRequest().userId(\"2244994945\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.MuteBroadcastChatUserAsync(\n \"1895000000000000000\",\n new MuteBroadcastChatUserRequest { UserId = \"2244994945\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/broadcasts/1895000000000000000/chat/mutes \\\n -d '{\"user_id\":\"2244994945\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}/chat/mutes/{user_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.unmute_broadcast_chat_user(id=\"1895000000000000000\", user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.unmuteBroadcastChatUser(\"1895000000000000000\", \"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().unmuteBroadcastChatUser(\"1895000000000000000\", \"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UnmuteBroadcastChatUserAsync(\"1895000000000000000\", \"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/broadcasts/1895000000000000000/chat/mutes/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}/chat/{message_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.delete_broadcast_chat_message(id=\"1895000000000000000\", message_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.deleteBroadcastChatMessage(\"1895000000000000000\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().deleteBroadcastChatMessage(\"1895000000000000000\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.DeleteBroadcastChatMessageAsync(\"1895000000000000000\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/broadcasts/1895000000000000000/chat/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/broadcasts/{id}/state'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import UpdateBroadcastStateRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.update_broadcast_state(\n id=\"1895000000000000000\",\n body=UpdateBroadcastStateRequest(state=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.updateBroadcastState(\"1895000000000000000\", { state: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().updateBroadcastState(\n \"1895000000000000000\",\n new Schemas.UpdateBroadcastStateRequest().state(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UpdateBroadcastStateAsync(\n \"1895000000000000000\",\n new UpdateBroadcastStateRequest { State = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/broadcasts/1895000000000000000/state \\\n -d '{\"state\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/calls'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.calls.models import CreateCallRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.create_call(body=CreateCallRequest(conversation_id=\"1500000000000000000\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.createCall({ \"conversation_id\": \"1500000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().createCall(\n new Schemas.CreateCallRequest().conversationId(\"1500000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.CreateCallAsync(new CreateCallRequest { ConversationId = \"1500000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/calls \\\n -d '{\"conversation_id\":\"1500000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/calls/scheduled'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.list_scheduled()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.listScheduled();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().listScheduled();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.ListScheduledAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/calls/scheduled" + } + ] + } + }, + { + "target": "$.paths['/2/calls/scheduled'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.calls.models import ScheduleCallRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.schedule_call(body=ScheduleCallRequest(start_time=\"2026-01-01T00:00:00Z\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.scheduleCall({ \"start_time\": \"2026-01-01T00:00:00Z\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().scheduleCall(new Schemas.ScheduleCallRequest().startTime(\"2026-01-01T00:00:00Z\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.ScheduleCallAsync(new ScheduleCallRequest { StartTime = \"2026-01-01T00:00:00Z\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/calls/scheduled \\\n -d '{\"start_time\":\"2026-01-01T00:00:00Z\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/calls/scheduled/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.cancel_scheduled_call(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.cancelScheduledCall(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().cancelScheduledCall(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.CancelScheduledCallAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/calls/scheduled/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/calls/scheduled/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.get_scheduled_call(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.getScheduledCall(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().getScheduledCall(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.GetScheduledCallAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/calls/scheduled/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/calls/scheduled/{id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.calls.models import UpdateScheduledCallRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.update_scheduled_call(\n id=\"1895000000000000000\",\n body=UpdateScheduledCallRequest(occurrence_start_time=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.updateScheduledCall(\"1895000000000000000\", { \"occurrence_start_time\": \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().updateScheduledCall(\n \"1895000000000000000\",\n new Schemas.UpdateScheduledCallRequest().occurrenceStartTime(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.UpdateScheduledCallAsync(\n \"1895000000000000000\",\n new UpdateScheduledCallRequest { OccurrenceStartTime = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/calls/scheduled/1895000000000000000 \\\n -d '{\"occurrence_start_time\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/calls/scheduled/{id}/rsvp'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.calls.models import RespondToScheduledCallRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.respond_to_scheduled_call(\n id=\"1895000000000000000\",\n body=RespondToScheduledCallRequest(response=\"accepted\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.respondToScheduledCall(\"1895000000000000000\", { response: \"accepted\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().respondToScheduledCall(\n \"1895000000000000000\",\n new Schemas.RespondToScheduledCallRequest().response(\"accepted\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.RespondToScheduledCallAsync(\n \"1895000000000000000\",\n new RespondToScheduledCallRequest { Response = \"accepted\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/calls/scheduled/1895000000000000000/rsvp \\\n -d '{\"response\":\"accepted\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/calls/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.get_call(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.getCall(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().getCall(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.GetCallAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/calls/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/calls/{id}/join'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.calls.models import JoinCallRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.join_call(\n id=\"1895000000000000000\",\n body=JoinCallRequest(media={\"type\": \"websocket\"})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.joinCall(\"1895000000000000000\", { media: { type: \"websocket\" } });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().joinCall(\"1895000000000000000\", new Schemas.JoinCallRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.JoinCallAsync(\"1895000000000000000\", new JoinCallRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/calls/1895000000000000000/join \\\n -d '{\"media\":{\"type\":\"websocket\"}}'" + } + ] + } + }, + { + "target": "$.paths['/2/calls/{id}/leave'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.calls.leave_call(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.calls.leaveCall(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.calls().leaveCall(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Calls.LeaveCallAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/calls/1895000000000000000/leave" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.chat.get_conversations():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getConversations();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.chat().getConversationsPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Chat.GetConversationsPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/conversations" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/group'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import CreateConversationRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.create_conversation(\n body=CreateConversationRequest(conversation_id=\"1500000000000000000\", conversation_key_version=\"example\", conversation_participant_keys=[{\"user_id\": \"2244994945\", \"encrypted_conversation_key\": \"example\", \"public_key_version\": \"example\"}], group_members=[\"example\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.createConversation(\n { \"conversation_id\": \"1500000000000000000\", \"conversation_key_version\": \"example\", \"conversation_participant_keys\": [{ \"user_id\": \"2244994945\", \"encrypted_conversation_key\": \"example\", \"public_key_version\": \"example\" }], \"group_members\": [\"example\"] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().createConversation(\n new Schemas.CreateChatConversationRequest().conversationId(\"1500000000000000000\").conversationKeyVersion(\"example\").groupMembers(List.of(\"example\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.CreateConversationAsync(\n new CreateChatConversationRequest { ConversationId = \"1500000000000000000\", ConversationKeyVersion = \"example\", GroupMembers = new List { \"example\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/group \\\n -d '{\"conversation_id\":\"1500000000000000000\",\"conversation_key_version\":\"example\",\"conversation_participant_keys\":[{\"user_id\":\"2244994945\",\"encrypted_conversation_key\":\"example\",\"public_key_version\":\"example\"}],\"group_members\":[\"example\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/group/initialize'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.initialize_group()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.initializeGroup();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().initializeGroup();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.InitializeGroupAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/group/initialize" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import DeleteConversationRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.delete_conversation(\n id=\"1895000000000000000\",\n body=DeleteConversationRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.deleteConversation(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().deleteConversation(\"1895000000000000000\", new Schemas.DeleteChatConversationRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.DeleteConversationAsync(\"1895000000000000000\", new DeleteChatConversationRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/chat/conversations/1895000000000000000 \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.get_conversation(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getConversation(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().getConversation(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.GetConversationAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/conversations/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import UpdateGroupRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.update_group(\n id=\"1895000000000000000\",\n body=UpdateGroupRequest(modified_fields=[\"group_name\"], conversation_key_version=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.updateGroup(\n \"1895000000000000000\",\n { \"modified_fields\": [\"group_name\"], \"conversation_key_version\": \"example\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().updateGroup(\n \"1895000000000000000\",\n new Schemas.UpdateChatGroupRequest().modifiedFields(List.of(\"group_name\")).conversationKeyVersion(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.UpdateGroupAsync(\n \"1895000000000000000\",\n new UpdateChatGroupRequest { ModifiedFields = new List { \"group_name\" }, ConversationKeyVersion = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/chat/conversations/1895000000000000000 \\\n -d '{\"modified_fields\":[\"group_name\"],\"conversation_key_version\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/admin_requests'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.chat.get_group_admin_requests(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getGroupAdminRequests(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.chat().getGroupAdminRequestsPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Chat.GetGroupAdminRequestsPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/conversations/1895000000000000000/admin_requests" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/admin_requests'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import CreateGroupAdminRequestRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.create_group_admin_request(\n id=\"1895000000000000000\",\n body=CreateGroupAdminRequestRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.createGroupAdminRequest(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().createGroupAdminRequest(\n \"1895000000000000000\",\n new Schemas.CreateChatGroupAdminRequestRequest()\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.CreateGroupAdminRequestAsync(\"1895000000000000000\", new CreateChatGroupAdminRequestRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/admin_requests \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/admin_requests/{user_id}/approve'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import ApproveGroupAdminRequestRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.approve_group_admin_request(\n id=\"1895000000000000000\",\n user_id=\"2244994945\",\n body=ApproveGroupAdminRequestRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.approveGroupAdminRequest(\n \"1895000000000000000\",\n \"2244994945\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().approveGroupAdminRequest(\n \"1895000000000000000\",\n \"2244994945\",\n new Schemas.ApproveChatGroupAdminRequestRequest()\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.ApproveGroupAdminRequestAsync(\n \"1895000000000000000\",\n \"2244994945\",\n new ApproveChatGroupAdminRequestRequest()\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/admin_requests/2244994945/approve \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/admin_requests/{user_id}/reject'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import RejectGroupAdminRequestRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.reject_group_admin_request(\n id=\"1895000000000000000\",\n user_id=\"2244994945\",\n body=RejectGroupAdminRequestRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.rejectGroupAdminRequest(\n \"1895000000000000000\",\n \"2244994945\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().rejectGroupAdminRequest(\n \"1895000000000000000\",\n \"2244994945\",\n new Schemas.RejectChatGroupAdminRequestRequest()\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.RejectGroupAdminRequestAsync(\n \"1895000000000000000\",\n \"2244994945\",\n new RejectChatGroupAdminRequestRequest()\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/admin_requests/2244994945/reject \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/admin_settings'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import UpdateGroupAdminSettingsRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.update_group_admin_settings(\n id=\"1895000000000000000\",\n body=UpdateGroupAdminSettingsRequest(block_screen_capture=True)\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.updateGroupAdminSettings(\"1895000000000000000\", { \"block_screen_capture\": true });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().updateGroupAdminSettings(\n \"1895000000000000000\",\n new Schemas.UpdateChatGroupAdminSettingsRequest().blockScreenCapture(true)\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.UpdateGroupAdminSettingsAsync(\n \"1895000000000000000\",\n new UpdateChatGroupAdminSettingsRequest { BlockScreenCapture = true }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/chat/conversations/1895000000000000000/admin_settings \\\n -d '{\"block_screen_capture\":true}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/admins'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import AddGroupAdminsRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.add_group_admins(\n id=\"1895000000000000000\",\n body=AddGroupAdminsRequest(user_ids=[\"2244994945\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.addGroupAdmins(\"1895000000000000000\", { \"user_ids\": [\"2244994945\"] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().addGroupAdmins(\n \"1895000000000000000\",\n new Schemas.AddChatGroupAdminsRequest().userIds(List.of(\"2244994945\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.AddGroupAdminsAsync(\n \"1895000000000000000\",\n new AddChatGroupAdminsRequest { UserIds = new List { \"2244994945\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/admins \\\n -d '{\"user_ids\":[\"2244994945\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/admins/remove'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import RemoveGroupAdminsRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.remove_group_admins(\n id=\"1895000000000000000\",\n body=RemoveGroupAdminsRequest(user_ids=[\"2244994945\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.removeGroupAdmins(\"1895000000000000000\", { \"user_ids\": [\"2244994945\"] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().removeGroupAdmins(\n \"1895000000000000000\",\n new Schemas.RemoveChatGroupAdminsRequest().userIds(List.of(\"2244994945\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.RemoveGroupAdminsAsync(\n \"1895000000000000000\",\n new RemoveChatGroupAdminsRequest { UserIds = new List { \"2244994945\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/admins/remove \\\n -d '{\"user_ids\":[\"2244994945\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/archive'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import UnarchiveConversationRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.unarchive_conversation(\n id=\"1895000000000000000\",\n body=UnarchiveConversationRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.unarchiveConversation(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().unarchiveConversation(\n \"1895000000000000000\",\n new Schemas.UnarchiveChatConversationRequest()\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.UnarchiveConversationAsync(\"1895000000000000000\", new UnarchiveChatConversationRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/chat/conversations/1895000000000000000/archive \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/archive'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import ArchiveConversationRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.archive_conversation(\n id=\"1895000000000000000\",\n body=ArchiveConversationRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.archiveConversation(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().archiveConversation(\"1895000000000000000\", new Schemas.ArchiveChatConversationRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.ArchiveConversationAsync(\"1895000000000000000\", new ArchiveChatConversationRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/archive \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/events'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.chat.get_conversation_events(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getConversationEvents(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.chat().getConversationEventsPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Chat.GetConversationEventsPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/conversations/1895000000000000000/events" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/invite'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import DisableGroupInviteRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.disable_group_invite(\n id=\"1895000000000000000\",\n body=DisableGroupInviteRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.disableGroupInvite(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().disableGroupInvite(\"1895000000000000000\", new Schemas.DisableChatGroupInviteRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.DisableGroupInviteAsync(\"1895000000000000000\", new DisableChatGroupInviteRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/chat/conversations/1895000000000000000/invite \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/invite'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import EnableGroupInviteRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.enable_group_invite(\n id=\"1895000000000000000\",\n body=EnableGroupInviteRequest(affiliate_user_id=\"1895000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.enableGroupInvite(\n \"1895000000000000000\",\n { \"affiliate_user_id\": \"1895000000000000000\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().enableGroupInvite(\n \"1895000000000000000\",\n new Schemas.EnableChatGroupInviteRequest().affiliateUserId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.EnableGroupInviteAsync(\n \"1895000000000000000\",\n new EnableChatGroupInviteRequest { AffiliateUserId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/invite \\\n -d '{\"affiliate_user_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/invites/{token}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.get_group_invite(id=\"1895000000000000000\", token=\"example\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getGroupInvite(\"1895000000000000000\", \"example\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().getGroupInvite(\"1895000000000000000\", \"example\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.GetGroupInviteAsync(\"1895000000000000000\", \"example\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/conversations/1895000000000000000/invites/example" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/join_requests'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import CreateGroupJoinRequestRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.create_group_join_request(\n id=\"1895000000000000000\",\n body=CreateGroupJoinRequestRequest(token=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.createGroupJoinRequest(\"1895000000000000000\", { token: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().createGroupJoinRequest(\n \"1895000000000000000\",\n new Schemas.CreateChatGroupJoinRequestRequest().token(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.CreateGroupJoinRequestAsync(\n \"1895000000000000000\",\n new CreateChatGroupJoinRequestRequest { Token = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/join_requests \\\n -d '{\"token\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/join_requests/reject'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import RejectGroupJoinRequestsRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.reject_group_join_requests(\n id=\"1895000000000000000\",\n body=RejectGroupJoinRequestsRequest(user_ids=[\"2244994945\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.rejectGroupJoinRequests(\"1895000000000000000\", { \"user_ids\": [\"2244994945\"] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().rejectGroupJoinRequests(\n \"1895000000000000000\",\n new Schemas.RejectChatGroupJoinRequestsRequest().userIds(List.of(\"2244994945\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.RejectGroupJoinRequestsAsync(\n \"1895000000000000000\",\n new RejectChatGroupJoinRequestsRequest { UserIds = new List { \"2244994945\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/join_requests/reject \\\n -d '{\"user_ids\":[\"2244994945\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/keys'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import AddConversationKeysRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.add_conversation_keys(\n id=\"1895000000000000000\",\n body=AddConversationKeysRequest(conversation_key_version=\"example\", conversation_participant_keys=[{\"user_id\": \"2244994945\", \"encrypted_conversation_key\": \"example\", \"public_key_version\": \"example\"}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.addConversationKeys(\n \"1895000000000000000\",\n { \"conversation_key_version\": \"example\", \"conversation_participant_keys\": [{ \"user_id\": \"2244994945\", \"encrypted_conversation_key\": \"example\", \"public_key_version\": \"example\" }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().addConversationKeys(\n \"1895000000000000000\",\n new Schemas.AddConversationKeysRequest().conversationKeyVersion(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.AddConversationKeysAsync(\n \"1895000000000000000\",\n new AddConversationKeysRequest { ConversationKeyVersion = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/keys \\\n -d '{\"conversation_key_version\":\"example\",\"conversation_participant_keys\":[{\"user_id\":\"2244994945\",\"encrypted_conversation_key\":\"example\",\"public_key_version\":\"example\"}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/members'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import AddGroupMembersRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.add_group_members(\n id=\"1895000000000000000\",\n body=AddGroupMembersRequest(user_ids=[\"2244994945\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.addGroupMembers(\"1895000000000000000\", { \"user_ids\": [\"2244994945\"] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().addGroupMembers(\n \"1895000000000000000\",\n new Schemas.AddChatGroupMembersRequest().userIds(List.of(\"2244994945\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.AddGroupMembersAsync(\n \"1895000000000000000\",\n new AddChatGroupMembersRequest { UserIds = new List { \"2244994945\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/members \\\n -d '{\"user_ids\":[\"2244994945\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/members/remove'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import RemoveGroupMembersRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.remove_group_members(\n id=\"1895000000000000000\",\n body=RemoveGroupMembersRequest(user_ids=[\"2244994945\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.removeGroupMembers(\"1895000000000000000\", { \"user_ids\": [\"2244994945\"] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().removeGroupMembers(\n \"1895000000000000000\",\n new Schemas.RemoveChatGroupMembersRequest().userIds(List.of(\"2244994945\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.RemoveGroupMembersAsync(\n \"1895000000000000000\",\n new RemoveChatGroupMembersRequest { UserIds = new List { \"2244994945\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/members/remove \\\n -d '{\"user_ids\":[\"2244994945\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/message_ttl'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import DeleteConversationMessageTtlRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.delete_conversation_message_ttl(\n id=\"1895000000000000000\",\n body=DeleteConversationMessageTtlRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.deleteConversationMessageTtl(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().deleteConversationMessageTtl(\n \"1895000000000000000\",\n new Schemas.DeleteChatConversationMessageTtlRequest()\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.DeleteConversationMessageTtlAsync(\"1895000000000000000\", new DeleteChatConversationMessageTtlRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/chat/conversations/1895000000000000000/message_ttl \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/message_ttl'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import UpdateConversationMessageTtlRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.update_conversation_message_ttl(\n id=\"1895000000000000000\",\n body=UpdateConversationMessageTtlRequest(message_ttl_ms=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.updateConversationMessageTtl(\"1895000000000000000\", { \"message_ttl_ms\": \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().updateConversationMessageTtl(\n \"1895000000000000000\",\n new Schemas.UpdateChatConversationMessageTtlRequest().messageTtlMs(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.UpdateConversationMessageTtlAsync(\n \"1895000000000000000\",\n new UpdateChatConversationMessageTtlRequest { MessageTtlMs = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/chat/conversations/1895000000000000000/message_ttl \\\n -d '{\"message_ttl_ms\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/messages'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import SendMessageRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.send_message(\n id=\"1895000000000000000\",\n body=SendMessageRequest(message_id=\"1895000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.sendMessage(\"1895000000000000000\", { \"message_id\": \"1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().sendMessage(\n \"1895000000000000000\",\n new Schemas.SendChatMessageRequest().messageId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.SendMessageAsync(\n \"1895000000000000000\",\n new SendChatMessageRequest { MessageId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/messages \\\n -d '{\"message_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/messages/delete'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import DeleteMessagesRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.delete_messages(\n id=\"1895000000000000000\",\n body=DeleteMessagesRequest(sequence_ids=[\"1895000000000000000\"], delete_message_action=\"delete_for_all\", action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.deleteMessages(\n \"1895000000000000000\",\n { \"sequence_ids\": [\"1895000000000000000\"], \"delete_message_action\": \"delete_for_all\", \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().deleteMessages(\n \"1895000000000000000\",\n new Schemas.DeleteChatMessagesRequest().sequenceIds(List.of(\"1895000000000000000\")).deleteMessageAction(\"delete_for_all\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.DeleteMessagesAsync(\n \"1895000000000000000\",\n new DeleteChatMessagesRequest { SequenceIds = new List { \"1895000000000000000\" }, DeleteMessageAction = \"delete_for_all\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/messages/delete \\\n -d '{\"sequence_ids\":[\"1895000000000000000\"],\"delete_message_action\":\"delete_for_all\",\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/mute'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import UnmuteConversationRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.unmute_conversation(\n id=\"1895000000000000000\",\n body=UnmuteConversationRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.unmuteConversation(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().unmuteConversation(\"1895000000000000000\", new Schemas.UnmuteChatConversationRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.UnmuteConversationAsync(\"1895000000000000000\", new UnmuteChatConversationRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/chat/conversations/1895000000000000000/mute \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/mute'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import MuteConversationRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.mute_conversation(\n id=\"1895000000000000000\",\n body=MuteConversationRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.muteConversation(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().muteConversation(\"1895000000000000000\", new Schemas.MuteChatConversationRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.MuteConversationAsync(\"1895000000000000000\", new MuteChatConversationRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/mute \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/pinned_messages'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.chat.get_conversation_pinned_messages(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getConversationPinnedMessages(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.chat().getConversationPinnedMessagesPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Chat.GetConversationPinnedMessagesPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/conversations/1895000000000000000/pinned_messages" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/read'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import MarkConversationReadRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.mark_conversation_read(\n id=\"1895000000000000000\",\n body=MarkConversationReadRequest(action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.markConversationRead(\n \"1895000000000000000\",\n { \"action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().markConversationRead(\"1895000000000000000\", new Schemas.MarkChatConversationReadRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.MarkConversationReadAsync(\"1895000000000000000\", new MarkChatConversationReadRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/read \\\n -d '{\"action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/screen_capture'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import UpdateConversationScreenCaptureRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.update_conversation_screen_capture(\n id=\"1895000000000000000\",\n body=UpdateConversationScreenCaptureRequest(blocking_action_signatures=[{\"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {}}])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.updateConversationScreenCapture(\n \"1895000000000000000\",\n { \"blocking_action_signatures\": [{ \"message_id\": \"1895000000000000000\", \"encoded_message_event_detail\": \"example\", \"message_event_signature\": {} }] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().updateConversationScreenCapture(\n \"1895000000000000000\",\n new Schemas.UpdateChatConversationScreenCaptureRequest()\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.UpdateConversationScreenCaptureAsync(\n \"1895000000000000000\",\n new UpdateChatConversationScreenCaptureRequest()\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/chat/conversations/1895000000000000000/screen_capture \\\n -d '{\"blocking_action_signatures\":[{\"message_id\":\"1895000000000000000\",\"encoded_message_event_detail\":\"example\",\"message_event_signature\":{}}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/typing'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.send_typing_indicator(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.sendTypingIndicator(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().sendTypingIndicator(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.SendTypingIndicatorAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/typing" + } + ] + } + }, + { + "target": "$.paths['/2/chat/conversations/{id}/unread'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.mark_conversation_unread(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.markConversationUnread(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().markConversationUnread(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.MarkConversationUnreadAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/conversations/1895000000000000000/unread" + } + ] + } + }, + { + "target": "$.paths['/2/chat/media/upload/initialize'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import MediaUploadInitializeRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.media_upload_initialize(\n body=MediaUploadInitializeRequest(conversation_id=\"1500000000000000000\", total_bytes=1)\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.mediaUploadInitialize({ \"conversation_id\": \"1500000000000000000\", \"total_bytes\": 1 });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().mediaUploadInitialize(\n new Schemas.ChatMediaUploadInitializeRequest().conversationId(\"1500000000000000000\").totalBytes(1)\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.MediaUploadInitializeAsync(\n new ChatMediaUploadInitializeRequest { ConversationId = \"1500000000000000000\", TotalBytes = 1 }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/media/upload/initialize \\\n -d '{\"conversation_id\":\"1500000000000000000\",\"total_bytes\":1}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/media/upload/{id}/append'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import MediaUploadAppendRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.media_upload_append(\n id=\"1895000000000000000\",\n body=MediaUploadAppendRequest(media=\"example\", segment_index=1, conversation_id=\"1500000000000000000\", media_hash_key=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.mediaUploadAppend(\n \"1895000000000000000\",\n { media: \"example\", \"segment_index\": 1, \"conversation_id\": \"1500000000000000000\", \"media_hash_key\": \"example\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().mediaUploadAppend(\n \"1895000000000000000\",\n new Schemas.ChatMediaUploadAppendRequest().media(\"example\").segmentIndex(1).conversationId(\"1500000000000000000\").mediaHashKey(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.MediaUploadAppendAsync(\n \"1895000000000000000\",\n new ChatMediaUploadAppendRequest { Media = \"example\", SegmentIndex = 1, ConversationId = \"1500000000000000000\", MediaHashKey = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/media/upload/1895000000000000000/append \\\n -d '{\"media\":\"example\",\"segment_index\":1,\"conversation_id\":\"1500000000000000000\",\"media_hash_key\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/media/upload/{id}/finalize'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import MediaUploadFinalizeRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.media_upload_finalize(\n id=\"1895000000000000000\",\n body=MediaUploadFinalizeRequest(conversation_id=\"1500000000000000000\", media_hash_key=\"example\", num_parts=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.mediaUploadFinalize(\n \"1895000000000000000\",\n { \"conversation_id\": \"1500000000000000000\", \"media_hash_key\": \"example\", \"num_parts\": \"example\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().mediaUploadFinalize(\n \"1895000000000000000\",\n new Schemas.ChatMediaUploadFinalizeRequest().conversationId(\"1500000000000000000\").mediaHashKey(\"example\").numParts(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.MediaUploadFinalizeAsync(\n \"1895000000000000000\",\n new ChatMediaUploadFinalizeRequest { ConversationId = \"1500000000000000000\", MediaHashKey = \"example\", NumParts = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/media/upload/1895000000000000000/finalize \\\n -d '{\"conversation_id\":\"1500000000000000000\",\"media_hash_key\":\"example\",\"num_parts\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/chat/media/{id}/{media_hash_key}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.media_download(id=\"1895000000000000000\", media_hash_key=\"example\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.mediaDownload(\"1895000000000000000\", \"example\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().mediaDownload(\"1895000000000000000\", \"example\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.MediaDownloadAsync(\"1895000000000000000\", \"example\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/media/1895000000000000000/example" + } + ] + } + }, + { + "target": "$.paths['/2/chat/message_requests'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.chat.get_message_requests():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getMessageRequests();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.chat().getMessageRequestsPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Chat.GetMessageRequestsPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/message_requests" + } + ] + } + }, + { + "target": "$.paths['/2/chat/message_requests/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.get_message_request(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getMessageRequest(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().getMessageRequest(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.GetMessageRequestAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/message_requests/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/chat/message_requests/{id}/accept'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.accept_message_request(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.acceptMessageRequest(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().acceptMessageRequest(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.AcceptMessageRequestAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/chat/message_requests/1895000000000000000/accept" + } + ] + } + }, + { + "target": "$.paths['/2/chat/settings'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.get_settings()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.getSettings();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().getSettings();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.GetSettingsAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/chat/settings" + } + ] + } + }, + { + "target": "$.paths['/2/chat/settings'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import UpdateSettingsRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.update_settings(body=UpdateSettingsRequest(always_allow_dms_from_subscribers=True))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.updateSettings({ \"always_allow_dms_from_subscribers\": true });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().updateSettings(\n new Schemas.UpdateChatSettingsRequest().alwaysAllowDmsFromSubscribers(true)\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.UpdateSettingsAsync(\n new UpdateChatSettingsRequest { AlwaysAllowDmsFromSubscribers = true }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/chat/settings \\\n -d '{\"always_allow_dms_from_subscribers\":true}'" + } + ] + } + }, + { + "target": "$.paths['/2/communities/search'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.communities.search(query=\"from:XDevelopers\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.communities.search(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.communities().searchPages(\"from:XDevelopers\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Communities.SearchPages(\"from:XDevelopers\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/communities/search?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/communities/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.communities.get_by_id(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.communities.getById(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.communities().getById(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Communities.GetByIdAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/communities/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/compliance/jobs'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.compliance.get_jobs(type=\"tweets\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.compliance.getJobs(\"tweets\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.compliance().getJobs(\"tweets\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Compliance.GetJobsAsync(\"tweets\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/compliance/jobs?type=tweets\"" + } + ] + } + }, + { + "target": "$.paths['/2/compliance/jobs'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.compliance.models import CreateJobsRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.compliance.create_jobs(body=CreateJobsRequest(type=\"tweets\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.compliance.createJobs({ type: \"tweets\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.compliance().createJobs(new Schemas.CreateComplianceJobsRequest().type(\"tweets\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Compliance.CreateJobsAsync(new CreateComplianceJobsRequest { Type = \"tweets\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/compliance/jobs \\\n -d '{\"type\":\"tweets\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/compliance/jobs/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.compliance.delete_jobs_by_id(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.compliance.deleteJobsById(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.compliance().deleteJobsById(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Compliance.DeleteJobsByIdAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/compliance/jobs/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/compliance/jobs/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.compliance.get_jobs_by_id(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.compliance.getJobsById(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.compliance().getJobsById(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Compliance.GetJobsByIdAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/compliance/jobs/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/compliance/jobs/{id}/download'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.compliance.download_job_results(id=\"1895000000000000000\", token=\"example\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.compliance.downloadJobResults(\"1895000000000000000\", \"example\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.compliance().downloadJobResults(\"1895000000000000000\", \"example\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Compliance.DownloadJobResultsAsync(\"1895000000000000000\", \"example\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/compliance/jobs/1895000000000000000/download?token=example\"" + } + ] + } + }, + { + "target": "$.paths['/2/compliance/jobs/{id}/upload'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.compliance.upload_job_submission(id=\"1895000000000000000\", token=\"example\", body=b\"...\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.compliance.uploadJobSubmission(\"1895000000000000000\", \"example\", new Uint8Array());\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.compliance().uploadJobSubmission(\"1895000000000000000\", \"example\", new byte[0]);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Compliance.UploadJobSubmissionAsync(\"1895000000000000000\", \"example\", Array.Empty());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT \"/2/compliance/jobs/1895000000000000000/upload?token=example\"" + } + ] + } + }, + { + "target": "$.paths['/2/connections'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.connections.models import DeleteByUuidsRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.connections.delete_by_uuids(body=DeleteByUuidsRequest(uuids=[\"example\"]))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.connections.deleteByUuids({ uuids: [\"example\"] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.connections().deleteByUuids(\n new Schemas.DeleteConnectionsByUuidsRequest().uuids(List.of(\"example\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Connections.DeleteByUuidsAsync(\n new DeleteConnectionsByUuidsRequest { Uuids = new List { \"example\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/connections \\\n -d '{\"uuids\":[\"example\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/connections'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.connections.get_connection_history():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.connections.getConnectionHistory();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.connections().getConnectionHistoryPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Connections.GetConnectionHistoryPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/connections" + } + ] + } + }, + { + "target": "$.paths['/2/connections/all'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.connections.delete_all()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.connections.deleteAll();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.connections().deleteAll();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Connections.DeleteAllAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/connections/all" + } + ] + } + }, + { + "target": "$.paths['/2/connections/{endpoint_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.connections.delete_by_endpoint(endpoint_id=\"filtered_stream\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.connections.deleteByEndpoint(\"filtered_stream\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.connections().deleteByEndpoint(\"filtered_stream\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Connections.DeleteByEndpointAsync(\"filtered_stream\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/connections/filtered_stream" + } + ] + } + }, + { + "target": "$.paths['/2/dm_conversations'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.direct_messages.models import CreateConversationRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.direct_messages.create_conversation(\n body=CreateConversationRequest(conversation_type=\"Group\", participant_ids=[\"2244994945\"], message={\"text\": \"Hello from XDK!\"})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.createConversation(\n { \"conversation_type\": \"Group\", \"participant_ids\": [\"2244994945\"], message: { text: \"Hello from XDK!\" } }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.directMessages().createConversation(\n new Schemas.CreateDirectMessagesConversationRequest().conversationType(\"Group\").participantIds(List.of(\"2244994945\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.DirectMessages.CreateConversationAsync(\n new CreateDirectMessagesConversationRequest { ConversationType = \"Group\", ParticipantIds = new List { \"2244994945\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/dm_conversations \\\n -d '{\"conversation_type\":\"Group\",\"participant_ids\":[\"2244994945\"],\"message\":{\"text\":\"Hello from XDK!\"}}'" + } + ] + } + }, + { + "target": "$.paths['/2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.direct_messages.dm_conversations_media_download(\n dm_id=\"1895000000000000000\",\n media_id=\"3_1895000000000000000\",\n resource_id=\"1895000000000000000\"\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.dmConversationsMediaDownload(\n \"1895000000000000000\",\n \"3_1895000000000000000\",\n \"1895000000000000000\"\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.directMessages().dmConversationsMediaDownload(\n \"1895000000000000000\",\n \"3_1895000000000000000\",\n \"1895000000000000000\"\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.DirectMessages.DmConversationsMediaDownloadAsync(\n \"1895000000000000000\",\n \"3_1895000000000000000\",\n \"1895000000000000000\"\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/dm_conversations/media/1895000000000000000/3_1895000000000000000/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/dm_conversations/with/{participant_id}/dm_events'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.direct_messages.get_events_by_participant_id(participant_id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.getEventsByParticipantId(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.directMessages().getEventsByParticipantIdPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.DirectMessages.GetEventsByParticipantIdPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/dm_conversations/with/2244994945/dm_events" + } + ] + } + }, + { + "target": "$.paths['/2/dm_conversations/with/{participant_id}/messages'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.direct_messages.models import CreateByParticipantIdRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.direct_messages.create_by_participant_id(\n participant_id=\"2244994945\",\n body=CreateByParticipantIdRequest(text=\"Hello from XDK!\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.createByParticipantId(\"2244994945\", { text: \"Hello from XDK!\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.directMessages().createByParticipantId(\n \"2244994945\",\n new Schemas.CreateDirectMessagesByParticipantIdRequest().text(\"Hello from XDK!\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.DirectMessages.CreateByParticipantIdAsync(\n \"2244994945\",\n new CreateDirectMessagesByParticipantIdRequest { Text = \"Hello from XDK!\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/dm_conversations/with/2244994945/messages \\\n -d '{\"text\":\"Hello from XDK!\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/dm_conversations/{dm_conversation_id}/messages'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.direct_messages.models import CreateByConversationIdRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.direct_messages.create_by_conversation_id(\n dm_conversation_id=\"1500000000000000000\",\n body=CreateByConversationIdRequest(text=\"Hello from XDK!\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.createByConversationId(\"1500000000000000000\", { text: \"Hello from XDK!\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.directMessages().createByConversationId(\n \"1500000000000000000\",\n new Schemas.CreateDirectMessagesByConversationIdRequest().text(\"Hello from XDK!\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.DirectMessages.CreateByConversationIdAsync(\n \"1500000000000000000\",\n new CreateDirectMessagesByConversationIdRequest { Text = \"Hello from XDK!\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/dm_conversations/1500000000000000000/messages \\\n -d '{\"text\":\"Hello from XDK!\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/dm_conversations/{id}/dm_events'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.direct_messages.get_events_by_conversation_id(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.getEventsByConversationId(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.directMessages().getEventsByConversationIdPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.DirectMessages.GetEventsByConversationIdPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/dm_conversations/1895000000000000000/dm_events" + } + ] + } + }, + { + "target": "$.paths['/2/dm_events'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.direct_messages.get_events():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.getEvents();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.directMessages().getEventsPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.DirectMessages.GetEventsPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/dm_events" + } + ] + } + }, + { + "target": "$.paths['/2/dm_events/{event_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.direct_messages.delete_events(event_id=\"1600000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.deleteEvents(\"1600000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.directMessages().deleteEvents(\"1600000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.DirectMessages.DeleteEventsAsync(\"1600000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/dm_events/1600000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/dm_events/{event_id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.direct_messages.get_events_by_id(event_id=\"1600000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.directMessages.getEventsById(\"1600000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.directMessages().getEventsById(\"1600000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.DirectMessages.GetEventsByIdAsync(\"1600000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/dm_events/1600000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/likes/compliance/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.likes_compliance():\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.likesCompliance();\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().likesCompliance()) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.LikesComplianceStream();\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s /2/likes/compliance/stream" + } + ] + } + }, + { + "target": "$.paths['/2/likes/firehose/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.likes_firehose(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.likesFirehose(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().likesFirehose(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.LikesFirehoseStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/likes/firehose/stream?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/likes/sample10/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.likes_sample10(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.likesSample10(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().likesSample10(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.LikesSample10Stream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/likes/sample10/stream?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/lists'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.lists.models import CreateRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.lists.create(body=CreateRequest(name=\"My List\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.lists.create({ name: \"My List\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.lists().create(new Schemas.CreateListsRequest().name(\"My List\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Lists.CreateAsync(new CreateListsRequest { Name = \"My List\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/lists \\\n -d '{\"name\":\"My List\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.lists.delete(id=\"1450000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.lists.delete(\"1450000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.lists().delete(\"1450000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Lists.DeleteAsync(\"1450000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/lists/1450000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.lists.get_by_id(id=\"1450000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.lists.getById(\"1450000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.lists().getById(\"1450000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Lists.GetByIdAsync(\"1450000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/lists/1450000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.lists.models import UpdateRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.lists.update(id=\"1450000000000000000\", body=UpdateRequest(name=\"My List\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.lists.update(\"1450000000000000000\", { name: \"My List\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.lists().update(\n \"1450000000000000000\",\n new Schemas.UpdateListsRequest().name(\"My List\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Lists.UpdateAsync(\"1450000000000000000\", new UpdateListsRequest { Name = \"My List\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/lists/1450000000000000000 \\\n -d '{\"name\":\"My List\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}/followers'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.lists.get_followers(id=\"1450000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.lists.getFollowers(\"1450000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.lists().getFollowersPages(\"1450000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Lists.GetFollowersPages(\"1450000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/lists/1450000000000000000/followers" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}/members'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.lists.get_members(id=\"1450000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.lists.getMembers(\"1450000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.lists().getMembersPages(\"1450000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Lists.GetMembersPages(\"1450000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/lists/1450000000000000000/members" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}/members'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.lists.models import AddMemberRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.lists.add_member(\n id=\"1450000000000000000\",\n body=AddMemberRequest(user_id=\"2244994945\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.lists.addMember(\"1450000000000000000\", { \"user_id\": \"2244994945\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.lists().addMember(\n \"1450000000000000000\",\n new Schemas.AddListsMemberRequest().userId(\"2244994945\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Lists.AddMemberAsync(\n \"1450000000000000000\",\n new AddListsMemberRequest { UserId = \"2244994945\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/lists/1450000000000000000/members \\\n -d '{\"user_id\":\"2244994945\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}/members/{user_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.lists.remove_member_by_user_id(id=\"1450000000000000000\", user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.lists.removeMemberByUserId(\"1450000000000000000\", \"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.lists().removeMemberByUserId(\"1450000000000000000\", \"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Lists.RemoveMemberByUserIdAsync(\"1450000000000000000\", \"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/lists/1450000000000000000/members/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/lists/{id}/tweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.lists.get_posts(id=\"1450000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.lists.getPosts(\"1450000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.lists().getPostsPages(\"1450000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Lists.GetPostsPages(\"1450000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/lists/1450000000000000000/tweets" + } + ] + } + }, + { + "target": "$.paths['/2/media'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.media.get_by_keys(media_keys=[\"3_1895000000000000000\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.media.getByKeys([\"3_1895000000000000000\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.media().getByKeys(List.of(\"3_1895000000000000000\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Media.GetByKeysAsync(new List { \"3_1895000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/media?media_keys=3_1895000000000000000\"" + } + ] + } + }, + { + "target": "$.paths['/2/media/amplify/posts'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import AddPostToAmplifyProgramsRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.add_post_to_amplify_programs(\n body=AddPostToAmplifyProgramsRequest(post_id=\"1895000000000000000\", program_ids=[\"1895000000000000000\"])\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.addPostToAmplifyPrograms(\n { \"post_id\": \"1895000000000000000\", \"program_ids\": [\"1895000000000000000\"] }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().addPostToAmplifyPrograms(\n new Schemas.AddPostToAmplifyProgramsRequest().postId(\"1895000000000000000\").programIds(List.of(\"1895000000000000000\"))\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.AddPostToAmplifyProgramsAsync(\n new AddPostToAmplifyProgramsRequest { PostId = \"1895000000000000000\", ProgramIds = new List { \"1895000000000000000\" } }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/amplify/posts \\\n -d '{\"post_id\":\"1895000000000000000\",\"program_ids\":[\"1895000000000000000\"]}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/amplify/programs'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.get_amplify_programs()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.getAmplifyPrograms();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().getAmplifyPrograms();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.GetAmplifyProgramsAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/media/amplify/programs" + } + ] + } + }, + { + "target": "$.paths['/2/media/amplify/programs/{program_id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.get_amplify_program(program_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.getAmplifyProgram(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().getAmplifyProgram(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.GetAmplifyProgramAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/media/amplify/programs/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/media/amplify/programs/{program_id}/posts'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.get_amplify_program_posts(program_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.getAmplifyProgramPosts(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().getAmplifyProgramPosts(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.GetAmplifyProgramPostsAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/media/amplify/programs/1895000000000000000/posts" + } + ] + } + }, + { + "target": "$.paths['/2/media/analytics'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.get_analytics(\n media_keys=[\"3_1895000000000000000\"],\n start_time=\"2026-01-01T00:00:00Z\",\n end_time=\"2026-01-02T00:00:00Z\"\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.getAnalytics(\n [\"3_1895000000000000000\"],\n \"2026-01-01T00:00:00Z\",\n \"2026-01-02T00:00:00Z\"\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().getAnalytics(\n List.of(\"3_1895000000000000000\"),\n \"2026-01-01T00:00:00Z\",\n \"2026-01-02T00:00:00Z\"\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.GetAnalyticsAsync(\n new List { \"3_1895000000000000000\" },\n \"2026-01-01T00:00:00Z\",\n \"2026-01-02T00:00:00Z\"\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/media/analytics?media_keys=3_1895000000000000000&start_time=2026-01-01T00%3A00%3A00Z&end_time=2026-01-02T00%3A00%3A00Z\"" + } + ] + } + }, + { + "target": "$.paths['/2/media/library'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import AddToLibraryRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.add_to_library(body=AddToLibraryRequest(media_key=\"3_1895000000000000000\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.addToLibrary({ \"media_key\": \"3_1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().addToLibrary(\n new Schemas.AddMediaToLibraryRequest().mediaKey(\"3_1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.AddToLibraryAsync(new AddMediaToLibraryRequest { MediaKey = \"3_1895000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/library \\\n -d '{\"media_key\":\"3_1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/library/categories'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.get_library_categories()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.getLibraryCategories();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().getLibraryCategories();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.GetLibraryCategoriesAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/media/library/categories" + } + ] + } + }, + { + "target": "$.paths['/2/media/library/{media_key}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import RemoveFromLibraryRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.remove_from_library(media_key=\"3_1895000000000000000\", body=RemoveFromLibraryRequest())\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.removeFromLibrary(\"3_1895000000000000000\", {});\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().removeFromLibrary(\"3_1895000000000000000\", new Schemas.RemoveMediaFromLibraryRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.RemoveFromLibraryAsync(\"3_1895000000000000000\", new RemoveMediaFromLibraryRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/media/library/3_1895000000000000000 \\\n -d '{}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/library/{media_key}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import UpdateInLibraryRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.update_in_library(\n media_key=\"3_1895000000000000000\",\n body=UpdateInLibraryRequest(name=\"My List\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.updateInLibrary(\"3_1895000000000000000\", { name: \"My List\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().updateInLibrary(\n \"3_1895000000000000000\",\n new Schemas.UpdateMediaInLibraryRequest().name(\"My List\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.UpdateInLibraryAsync(\n \"3_1895000000000000000\",\n new UpdateMediaInLibraryRequest { Name = \"My List\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/media/library/3_1895000000000000000 \\\n -d '{\"name\":\"My List\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/metadata'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import CreateMetadataRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.create_metadata(\n body=CreateMetadataRequest(id=\"1895000000000000000\", metadata={\"shared_info\": {\"shared\": \"example\"}})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.createMetadata(\n { id: \"1895000000000000000\", metadata: { \"shared_info\": { shared: \"example\" } } }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().createMetadata(new Schemas.CreateMediaMetadataRequest().id(\"1895000000000000000\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.CreateMetadataAsync(new CreateMediaMetadataRequest { Id = \"1895000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/metadata \\\n -d '{\"id\":\"1895000000000000000\",\"metadata\":{\"shared_info\":{\"shared\":\"example\"}}}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/subtitles'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import DeleteSubtitlesRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.delete_subtitles(\n body=DeleteSubtitlesRequest(id=\"1895000000000000000\", media_category=\"example\", language_code=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.deleteSubtitles(\n { id: \"1895000000000000000\", \"media_category\": \"example\", \"language_code\": \"example\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().deleteSubtitles(\n new Schemas.DeleteMediaSubtitlesRequest().id(\"1895000000000000000\").mediaCategory(\"example\").languageCode(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.DeleteSubtitlesAsync(\n new DeleteMediaSubtitlesRequest { Id = \"1895000000000000000\", MediaCategory = \"example\", LanguageCode = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/media/subtitles \\\n -d '{\"id\":\"1895000000000000000\",\"media_category\":\"example\",\"language_code\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/subtitles'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import CreateSubtitlesRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.create_subtitles(\n body=CreateSubtitlesRequest(id=\"1895000000000000000\", media_category=\"AmplifyVideo\", subtitles={\"language_code\": \"example\"})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.createSubtitles(\n { id: \"1895000000000000000\", \"media_category\": \"AmplifyVideo\", subtitles: { \"language_code\": \"example\" } }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().createSubtitles(\n new Schemas.CreateMediaSubtitlesRequest().id(\"1895000000000000000\").mediaCategory(\"AmplifyVideo\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.CreateSubtitlesAsync(\n new CreateMediaSubtitlesRequest { Id = \"1895000000000000000\", MediaCategory = \"AmplifyVideo\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/subtitles \\\n -d '{\"id\":\"1895000000000000000\",\"media_category\":\"AmplifyVideo\",\"subtitles\":{\"language_code\":\"example\"}}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/upload'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.get_upload_status(media_id=\"3_1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.getUploadStatus(\"3_1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().getUploadStatus(\"3_1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.GetUploadStatusAsync(\"3_1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/media/upload?media_id=3_1895000000000000000\"" + } + ] + } + }, + { + "target": "$.paths['/2/media/upload'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import UploadRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.upload(body=UploadRequest(media=\"example\", media_category=\"tweet_image\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.upload({ media: \"example\", \"media_category\": \"tweet_image\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().upload(\n new Schemas.MediaUploadRequest().media(\"example\").mediaCategory(\"tweet_image\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.UploadAsync(\n new MediaUploadRequest { Media = \"example\", MediaCategory = \"tweet_image\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/upload \\\n -d '{\"media\":\"example\",\"media_category\":\"tweet_image\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/upload/initialize'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import InitializeUploadRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.initialize_upload(body=InitializeUploadRequest(media_category=\"amplify_video\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.initializeUpload({ \"media_category\": \"amplify_video\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().initializeUpload(\n new Schemas.InitializeMediaUploadRequest().mediaCategory(\"amplify_video\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.InitializeUploadAsync(new InitializeMediaUploadRequest { MediaCategory = \"amplify_video\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/upload/initialize \\\n -d '{\"media_category\":\"amplify_video\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/upload/{id}/append'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.media.models import AppendUploadRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.append_upload(\n id=\"1895000000000000000\",\n body=AppendUploadRequest(media=\"example\", segment_index=1)\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.appendUpload(\"1895000000000000000\", { media: \"example\", \"segment_index\": 1 });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().appendUpload(\n \"1895000000000000000\",\n new Schemas.AppendMediaUploadRequest().media(\"example\").segmentIndex(1)\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.AppendUploadAsync(\n \"1895000000000000000\",\n new AppendMediaUploadRequest { Media = \"example\", SegmentIndex = 1 }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/upload/1895000000000000000/append \\\n -d '{\"media\":\"example\",\"segment_index\":1}'" + } + ] + } + }, + { + "target": "$.paths['/2/media/upload/{id}/finalize'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.media.finalize_upload(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.media.finalizeUpload(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.media().finalizeUpload(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Media.FinalizeUploadAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/media/upload/1895000000000000000/finalize" + } + ] + } + }, + { + "target": "$.paths['/2/media/{media_key}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.media.get_by_key(media_key=\"3_1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.media.getByKey(\"3_1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.media().getByKey(\"3_1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Media.GetByKeyAsync(\"3_1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/media/3_1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/news/search'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.news.search(query=\"from:XDevelopers\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.news.search(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.news().search(\"from:XDevelopers\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.News.SearchAsync(\"from:XDevelopers\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/news/search?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/news/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.news.get(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.news.get(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.news().get(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.News.GetAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/news/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/notes'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.community_notes.models import CreateRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.community_notes.create(\n body=CreateRequest(test_mode=True, post_id=\"1895000000000000000\", info={\"text\": \"Hello from XDK!\", \"classification\": \"misinformed_or_potentially_misleading\", \"misleading_tags\": [\"disputed_claim_as_fact\"], \"trustworthy_sources\": True})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.communityNotes.create(\n { \"test_mode\": true, \"post_id\": \"1895000000000000000\", info: { text: \"Hello from XDK!\", classification: \"misinformed_or_potentially_misleading\", \"misleading_tags\": [\"disputed_claim_as_fact\"], \"trustworthy_sources\": true } }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.communityNotes().create(\n new Schemas.CreateCommunityNotesRequest().testMode(true).postId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.CommunityNotes.CreateAsync(\n new CreateCommunityNotesRequest { TestMode = true, PostId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/notes \\\n -d '{\"test_mode\":true,\"post_id\":\"1895000000000000000\",\"info\":{\"text\":\"Hello from XDK!\",\"classification\":\"misinformed_or_potentially_misleading\",\"misleading_tags\":[\"disputed_claim_as_fact\"],\"trustworthy_sources\":true}}'" + } + ] + } + }, + { + "target": "$.paths['/2/notes/evaluate'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.community_notes.models import EvaluateRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.community_notes.evaluate(\n body=EvaluateRequest(post_id=\"1895000000000000000\", note_text=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.communityNotes.evaluate({ \"post_id\": \"1895000000000000000\", \"note_text\": \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.communityNotes().evaluate(\n new Schemas.EvaluateCommunityNotesRequest().postId(\"1895000000000000000\").noteText(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.CommunityNotes.EvaluateAsync(\n new EvaluateCommunityNotesRequest { PostId = \"1895000000000000000\", NoteText = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/notes/evaluate \\\n -d '{\"post_id\":\"1895000000000000000\",\"note_text\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/notes/search/notes_written'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.community_notes.search_written(test_mode=True):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.communityNotes.searchWritten(true);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.communityNotes().searchWrittenPages(true)) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.CommunityNotes.SearchWrittenPages(true))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/notes/search/notes_written?test_mode=true\"" + } + ] + } + }, + { + "target": "$.paths['/2/notes/search/posts_eligible_for_notes'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.community_notes.search_eligible_posts(test_mode=True):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.communityNotes.searchEligiblePosts(true);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.communityNotes().searchEligiblePostsPages(true)) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.CommunityNotes.SearchEligiblePostsPages(true))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/notes/search/posts_eligible_for_notes?test_mode=true\"" + } + ] + } + }, + { + "target": "$.paths['/2/notes/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.community_notes.delete(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.communityNotes.delete(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.communityNotes().delete(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.CommunityNotes.DeleteAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/notes/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/openapi.json'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.general.get_open_api_spec()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.general.getOpenApiSpec();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.general().getOpenApiSpec();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.General.GetOpenApiSpecAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/openapi.json" + } + ] + } + }, + { + "target": "$.paths['/2/posts/drafts'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.posts.get_post_drafts():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.getPostDrafts();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.posts().getPostDraftsPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.GetPostDraftsPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/posts/drafts" + } + ] + } + }, + { + "target": "$.paths['/2/posts/drafts'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.posts.models import CreatePostDraftRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.posts.create_post_draft(body=CreatePostDraftRequest(text=\"Hello from XDK!\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.createPostDraft({ text: \"Hello from XDK!\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.posts().createPostDraft(new Schemas.CreatePostDraftRequest().text(\"Hello from XDK!\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Posts.CreatePostDraftAsync(new CreatePostDraftRequest { Text = \"Hello from XDK!\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/posts/drafts \\\n -d '{\"text\":\"Hello from XDK!\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/posts/drafts/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.posts.delete_post_draft(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.deletePostDraft(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.posts().deletePostDraft(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Posts.DeletePostDraftAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/posts/drafts/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/region'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_region()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getRegion();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getRegion();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetRegionAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/region" + } + ] + } + }, + { + "target": "$.paths['/2/sources'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.list_sources()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.listSources();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().listSources();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.ListSourcesAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/sources" + } + ] + } + }, + { + "target": "$.paths['/2/sources'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import CreateSourceRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.create_source(body=CreateSourceRequest(name=\"My List\", region=\"example\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.createSource({ name: \"My List\", region: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().createSource(new Schemas.CreateSourceRequest().name(\"My List\").region(\"example\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.CreateSourceAsync(new CreateSourceRequest { Name = \"My List\", Region = \"example\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/sources \\\n -d '{\"name\":\"My List\",\"region\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/sources/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.delete_source(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.deleteSource(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().deleteSource(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.DeleteSourceAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/sources/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/sources/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_source(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getSource(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getSource(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetSourceAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/sources/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/sources/{id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import UpdateSourceRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.update_source(id=\"1895000000000000000\", body=UpdateSourceRequest(name=\"My List\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.updateSource(\"1895000000000000000\", { name: \"My List\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().updateSource(\n \"1895000000000000000\",\n new Schemas.UpdateSourceRequest().name(\"My List\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UpdateSourceAsync(\"1895000000000000000\", new UpdateSourceRequest { Name = \"My List\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/sources/1895000000000000000 \\\n -d '{\"name\":\"My List\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/sources/{id}/stream_key'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_source_stream_key(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getSourceStreamKey(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getSourceStreamKey(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetSourceStreamKeyAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/sources/1895000000000000000/stream_key" + } + ] + } + }, + { + "target": "$.paths['/2/spaces'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.spaces.get_by_ids(ids=[\"1YqKDqWLPPlGV\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.spaces.getByIds([\"1YqKDqWLPPlGV\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.spaces().getByIds(List.of(\"1YqKDqWLPPlGV\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Spaces.GetByIdsAsync(new List { \"1YqKDqWLPPlGV\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/spaces?ids=1YqKDqWLPPlGV\"" + } + ] + } + }, + { + "target": "$.paths['/2/spaces/by/creator_ids'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.spaces.get_by_creator_ids(user_ids=[\"2244994945\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.spaces.getByCreatorIds([\"2244994945\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.spaces().getByCreatorIds(List.of(\"2244994945\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Spaces.GetByCreatorIdsAsync(new List { \"2244994945\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/spaces/by/creator_ids?user_ids=2244994945\"" + } + ] + } + }, + { + "target": "$.paths['/2/spaces/search'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.spaces.search(query=\"from:XDevelopers\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.spaces.search(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.spaces().search(\"from:XDevelopers\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Spaces.SearchAsync(\"from:XDevelopers\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/spaces/search?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/spaces/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.spaces.get_by_id(id=\"1YqKDqWLPPlGV\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.spaces.getById(\"1YqKDqWLPPlGV\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.spaces().getById(\"1YqKDqWLPPlGV\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Spaces.GetByIdAsync(\"1YqKDqWLPPlGV\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/spaces/1YqKDqWLPPlGV" + } + ] + } + }, + { + "target": "$.paths['/2/spaces/{id}/buyers'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.spaces.get_buyers(id=\"1YqKDqWLPPlGV\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.spaces.getBuyers(\"1YqKDqWLPPlGV\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.spaces().getBuyersPages(\"1YqKDqWLPPlGV\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Spaces.GetBuyersPages(\"1YqKDqWLPPlGV\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/spaces/1YqKDqWLPPlGV/buyers" + } + ] + } + }, + { + "target": "$.paths['/2/spaces/{id}/tweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.spaces.get_posts(id=\"1YqKDqWLPPlGV\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.spaces.getPosts(\"1YqKDqWLPPlGV\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.spaces().getPostsPages(\"1YqKDqWLPPlGV\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Spaces.GetPostsPages(\"1YqKDqWLPPlGV\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/spaces/1YqKDqWLPPlGV/tweets" + } + ] + } + }, + { + "target": "$.paths['/2/trends/by/woeid/{woeid}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.trends.get_by_woeid(woeid=1)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.trends.getByWoeid(1);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.trends().getByWoeid(1);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Trends.GetByWoeidAsync(1);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/trends/by/woeid/1" + } + ] + } + }, + { + "target": "$.paths['/2/trends/locations'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.trends.get_locations()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.trends.getLocations();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.trends().getLocations();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Trends.GetLocationsAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/trends/locations" + } + ] + } + }, + { + "target": "$.paths['/2/tweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.posts.get_by_ids(ids=[\"1895000000000000000\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.getByIds([\"1895000000000000000\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.posts().getByIds(List.of(\"1895000000000000000\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Posts.GetByIdsAsync(new List { \"1895000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/tweets?ids=1895000000000000000\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.posts.models import CreateRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.posts.create(body=CreateRequest(text=\"Hello from XDK!\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.create({ text: \"Hello from XDK!\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.posts().create(new Schemas.CreatePostsRequest().text(\"Hello from XDK!\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Posts.CreateAsync(new CreatePostsRequest { Text = \"Hello from XDK!\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/tweets \\\n -d '{\"text\":\"Hello from XDK!\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/analytics'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.posts.get_analytics(\n ids=[\"1895000000000000000\"],\n start_time=\"2026-01-01T00:00:00Z\",\n end_time=\"2026-01-02T00:00:00Z\"\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.getAnalytics(\n [\"1895000000000000000\"],\n \"2026-01-01T00:00:00Z\",\n \"2026-01-02T00:00:00Z\"\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.posts().getAnalytics(\n List.of(\"1895000000000000000\"),\n \"2026-01-01T00:00:00Z\",\n \"2026-01-02T00:00:00Z\"\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Posts.GetAnalyticsAsync(\n new List { \"1895000000000000000\" },\n \"2026-01-01T00:00:00Z\",\n \"2026-01-02T00:00:00Z\"\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/tweets/analytics?ids=1895000000000000000&start_time=2026-01-01T00%3A00%3A00Z&end_time=2026-01-02T00%3A00%3A00Z\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/compliance/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_compliance(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsCompliance(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsCompliance(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsComplianceStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/tweets/compliance/stream?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/counts/all'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.posts.get_counts_all(query=\"from:XDevelopers\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.getCountsAll(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.posts().getCountsAllPages(\"from:XDevelopers\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.GetCountsAllPages(\"from:XDevelopers\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/tweets/counts/all?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/counts/recent'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.posts.get_counts_recent(query=\"from:XDevelopers\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.getCountsRecent(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.posts().getCountsRecentPages(\"from:XDevelopers\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.GetCountsRecentPages(\"from:XDevelopers\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/tweets/counts/recent?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/firehose/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_firehose(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsFirehose(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsFirehose(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsFirehoseStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/tweets/firehose/stream?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/firehose/stream/lang/en'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_firehose_en(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsFirehoseEn(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsFirehoseEn(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsFirehoseEnStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/tweets/firehose/stream/lang/en?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/firehose/stream/lang/ja'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_firehose_ja(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsFirehoseJa(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsFirehoseJa(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsFirehoseJaStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/tweets/firehose/stream/lang/ja?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/firehose/stream/lang/ko'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_firehose_ko(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsFirehoseKo(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsFirehoseKo(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsFirehoseKoStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/tweets/firehose/stream/lang/ko?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/firehose/stream/lang/pt'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_firehose_pt(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsFirehosePt(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsFirehosePt(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsFirehosePtStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/tweets/firehose/stream/lang/pt?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/label/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.labels_compliance():\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.labelsCompliance();\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().labelsCompliance()) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.LabelsComplianceStream();\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s /2/tweets/label/stream" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/sample/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_sample():\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsSample();\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsSample()) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsSampleStream();\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s /2/tweets/sample/stream" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/sample10/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts_sample10(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.postsSample10(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().postsSample10(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsSample10Stream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/tweets/sample10/stream?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/all'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.posts.search_all(query=\"from:XDevelopers\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.searchAll(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.posts().searchAllPages(\"from:XDevelopers\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.SearchAllPages(\"from:XDevelopers\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/tweets/search/all?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/recent'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.posts.search_recent(query=\"from:XDevelopers\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.searchRecent(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.posts().searchRecentPages(\"from:XDevelopers\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.SearchRecentPages(\"from:XDevelopers\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/tweets/search/recent?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.posts():\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.posts();\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().posts()) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.PostsStream();\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s /2/tweets/search/stream" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/stream/rules'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.stream.get_rules():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.stream.getRules();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.stream().getRulesPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Stream.GetRulesPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/search/stream/rules" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/stream/rules'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.stream.models import UpdateRulesRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.stream.update_rules(body=UpdateRulesRequest(add=[{\"value\": \"from:XDevelopers\"}]))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.stream.updateRules({ add: [{ value: \"from:XDevelopers\" }] });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.stream().updateRules(new Schemas.UpdateRulesRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Stream.UpdateRulesAsync(new UpdateRulesRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/tweets/search/stream/rules \\\n -d '{\"add\":[{\"value\":\"from:XDevelopers\"}]}'" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/stream/rules/counts'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.stream.get_rule_counts()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.stream.getRuleCounts();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.stream().getRuleCounts();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Stream.GetRuleCountsAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/search/stream/rules/counts" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/webhooks'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.get_stream_links()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.getStreamLinks();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().getStreamLinks();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.GetStreamLinksAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/search/webhooks" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/webhooks/{webhook_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.delete_stream_link(webhook_id=\"1234567890\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.deleteStreamLink(\"1234567890\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().deleteStreamLink(\"1234567890\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.DeleteStreamLinkAsync(\"1234567890\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/tweets/search/webhooks/1234567890" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/search/webhooks/{webhook_id}'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.create_stream_link(webhook_id=\"1234567890\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.createStreamLink(\"1234567890\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().createStreamLink(\"1234567890\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.CreateStreamLinkAsync(\"1234567890\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/tweets/search/webhooks/1234567890" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/{id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.posts.delete(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.delete(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.posts().delete(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Posts.DeleteAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/tweets/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.posts.get_by_id(id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.getById(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.posts().getById(\"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Posts.GetByIdAsync(\"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/{id}/liking_users'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.posts.get_liking_users(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.getLikingUsers(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.posts().getLikingUsersPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.GetLikingUsersPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/1895000000000000000/liking_users" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/{id}/quote_tweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.posts.get_quoted(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.getQuoted(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.posts().getQuotedPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.GetQuotedPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/1895000000000000000/quote_tweets" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/{id}/retweeted_by'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.posts.get_reposted_by(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.getRepostedBy(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.posts().getRepostedByPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.GetRepostedByPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/1895000000000000000/retweeted_by" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/{id}/retweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.posts.get_reposts(id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.posts.getReposts(\"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.posts().getRepostsPages(\"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Posts.GetRepostsPages(\"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/tweets/1895000000000000000/retweets" + } + ] + } + }, + { + "target": "$.paths['/2/tweets/{tweet_id}/hidden'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.posts.models import HideReplyRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.posts.hide_reply(tweet_id=\"1895000000000000000\", body=HideReplyRequest(hidden=True))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.posts.hideReply(\"1895000000000000000\", { hidden: true });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.posts().hideReply(\n \"1895000000000000000\",\n new Schemas.HidePostsReplyRequest().hidden(true)\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Posts.HideReplyAsync(\"1895000000000000000\", new HidePostsReplyRequest { Hidden = true });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/tweets/1895000000000000000/hidden \\\n -d '{\"hidden\":true}'" + } + ] + } + }, + { + "target": "$.paths['/2/usage/credits'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.usage.get_credits()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.usage.getCredits();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.usage().getCredits();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Usage.GetCreditsAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/usage/credits" + } + ] + } + }, + { + "target": "$.paths['/2/usage/tweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.usage.get()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.usage.get();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.usage().get();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Usage.GetAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/usage/tweets" + } + ] + } + }, + { + "target": "$.paths['/2/users'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.users.get_by_ids(ids=[\"2244994945\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getByIds([\"2244994945\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.users().getByIds(List.of(\"2244994945\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Users.GetByIdsAsync(new List { \"2244994945\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/users?ids=2244994945\"" + } + ] + } + }, + { + "target": "$.paths['/2/users/by'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.users.get_by_usernames(usernames=[\"XDevelopers\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getByUsernames([\"XDevelopers\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.users().getByUsernames(List.of(\"XDevelopers\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Users.GetByUsernamesAsync(new List { \"XDevelopers\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/users/by?usernames=XDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/users/by/username/{username}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.users.get_by_username(username=\"XDevelopers\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getByUsername(\"XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.users().getByUsername(\"XDevelopers\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Users.GetByUsernameAsync(\"XDevelopers\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/by/username/XDevelopers" + } + ] + } + }, + { + "target": "$.paths['/2/users/compliance/stream'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor event in client.stream.users_compliance(partition=1):\n print(event)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst stream = await client.stream.usersCompliance(1);\nfor await (const event of stream) {\n console.log(event);\n}" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\ntry (var stream = client.stream().usersCompliance(1)) {\n for (var event : stream) {\n System.out.println(event);\n }\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait using var stream = await client.Stream.UsersComplianceStream(1);\nawait foreach (var item in stream)\n{\n Console.WriteLine(item);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -s \"/2/users/compliance/stream?partition=1\"" + } + ] + } + }, + { + "target": "$.paths['/2/users/me'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.get_me()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getMe();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().getMe();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.GetMeAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/me" + } + ] + } + }, + { + "target": "$.paths['/2/users/me/followers'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_me_followers():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getMeFollowers();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getMeFollowersPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetMeFollowersPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/me/followers" + } + ] + } + }, + { + "target": "$.paths['/2/users/me/following'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_me_following():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getMeFollowing();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getMeFollowingPages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetMeFollowingPages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/me/following" + } + ] + } + }, + { + "target": "$.paths['/2/users/personalized_trends'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.trends.get_personalized()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.trends.getPersonalized();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.trends().getPersonalized();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Trends.GetPersonalizedAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/personalized_trends" + } + ] + } + }, + { + "target": "$.paths['/2/users/public_keys'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.get_public_keys(ids=[\"2244994945\"])\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getPublicKeys([\"2244994945\"]);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\nimport java.util.List;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().getPublicKeys(List.of(\"2244994945\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing System.Collections.Generic;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.GetPublicKeysAsync(new List { \"2244994945\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/users/public_keys?ids=2244994945\"" + } + ] + } + }, + { + "target": "$.paths['/2/users/reposts_of_me'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_reposts_of_me():\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getRepostsOfMe();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getRepostsOfMePages()) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetRepostsOfMePages())\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/reposts_of_me" + } + ] + } + }, + { + "target": "$.paths['/2/users/search'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.search(query=\"from:XDevelopers\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.search(\"from:XDevelopers\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().searchPages(\"from:XDevelopers\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.SearchPages(\"from:XDevelopers\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl \"/2/users/search?query=from%3AXDevelopers\"" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.users.get_by_id(id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getById(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.users().getById(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Users.GetByIdAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/affiliates'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_affiliates(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getAffiliates(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getAffiliatesPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetAffiliatesPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/affiliates" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/blocking'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_blocking(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getBlocking(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getBlockingPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetBlockingPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/blocking" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/blocking'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import IdBlockRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.id_block(id=\"2244994945\", body=IdBlockRequest(target_user_id=\"2244994945\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.idBlock(\"2244994945\", { \"target_user_id\": \"2244994945\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().idBlock(\n \"2244994945\",\n new Schemas.UsersIdBlockRequest().targetUserId(\"2244994945\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.IdBlockAsync(\n \"2244994945\",\n new UsersIdBlockRequest { TargetUserId = \"2244994945\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/blocking \\\n -d '{\"target_user_id\":\"2244994945\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/bookmarks'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_bookmarks(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getBookmarks(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getBookmarksPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetBookmarksPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/bookmarks" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/bookmarks'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import CreateBookmarkRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.create_bookmark(\n id=\"2244994945\",\n body=CreateBookmarkRequest(tweet_id=\"1895000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.createBookmark(\"2244994945\", { \"tweet_id\": \"1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().createBookmark(\n \"2244994945\",\n new Schemas.CreateUsersBookmarkRequest().tweetId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.CreateBookmarkAsync(\n \"2244994945\",\n new CreateUsersBookmarkRequest { TweetId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/bookmarks \\\n -d '{\"tweet_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/bookmarks/folders'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_bookmark_folders(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getBookmarkFolders(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getBookmarkFoldersPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetBookmarkFoldersPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/bookmarks/folders" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/bookmarks/folders'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import CreateBookmarkFolderRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.create_bookmark_folder(id=\"2244994945\", body=CreateBookmarkFolderRequest(name=\"My List\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.createBookmarkFolder(\"2244994945\", { name: \"My List\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().createBookmarkFolder(\n \"2244994945\",\n new Schemas.CreateUsersBookmarkFolderRequest().name(\"My List\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.CreateBookmarkFolderAsync(\n \"2244994945\",\n new CreateUsersBookmarkFolderRequest { Name = \"My List\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/bookmarks/folders \\\n -d '{\"name\":\"My List\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/bookmarks/folders/{folder_id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_bookmarks_by_folder_id(id=\"2244994945\", folder_id=\"1895000000000000000\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getBookmarksByFolderId(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getBookmarksByFolderIdPages(\"2244994945\", \"1895000000000000000\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetBookmarksByFolderIdPages(\"2244994945\", \"1895000000000000000\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/bookmarks/folders/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/bookmarks/{tweet_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.delete_bookmark(id=\"2244994945\", tweet_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.deleteBookmark(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().deleteBookmark(\"2244994945\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.DeleteBookmarkAsync(\"2244994945\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/bookmarks/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/broadcasts'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.broadcasts.list_user(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.listUser(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.broadcasts().listUserPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Broadcasts.ListUserPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/broadcasts" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/broadcasts'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import CreateUserBroadcastRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.create_user_broadcast(\n id=\"2244994945\",\n body=CreateUserBroadcastRequest(source_id=\"1895000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.createUserBroadcast(\"2244994945\", { \"source_id\": \"1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().createUserBroadcast(\n \"2244994945\",\n new Schemas.CreateUserBroadcastRequest().sourceId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.CreateUserBroadcastAsync(\n \"2244994945\",\n new CreateUserBroadcastRequest { SourceId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/broadcasts \\\n -d '{\"source_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/broadcasts/{broadcast_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.delete_user_broadcast(id=\"2244994945\", broadcast_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.deleteUserBroadcast(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().deleteUserBroadcast(\"2244994945\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.DeleteUserBroadcastAsync(\"2244994945\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/broadcasts/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/broadcasts/{broadcast_id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_user_broadcast(id=\"2244994945\", broadcast_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getUserBroadcast(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getUserBroadcast(\"2244994945\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetUserBroadcastAsync(\"2244994945\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/broadcasts/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/broadcasts/{broadcast_id}/state'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import UpdateUserBroadcastStateRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.update_user_broadcast_state(\n id=\"2244994945\",\n broadcast_id=\"1895000000000000000\",\n body=UpdateUserBroadcastStateRequest(state=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.updateUserBroadcastState(\"2244994945\", \"1895000000000000000\", { state: \"example\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().updateUserBroadcastState(\n \"2244994945\",\n \"1895000000000000000\",\n new Schemas.UpdateUserBroadcastStateRequest().state(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UpdateUserBroadcastStateAsync(\n \"2244994945\",\n \"1895000000000000000\",\n new UpdateUserBroadcastStateRequest { State = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/users/2244994945/broadcasts/1895000000000000000/state \\\n -d '{\"state\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/dm/block'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.block_dms(id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.blockDms(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().blockDms(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.BlockDmsAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/dm/block" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/dm/unblock'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.unblock_dms(id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.unblockDms(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().unblockDms(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.UnblockDmsAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/dm/unblock" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/followed_lists'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_followed_lists(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getFollowedLists(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getFollowedListsPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetFollowedListsPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/followed_lists" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/followed_lists'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import FollowListRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.follow_list(\n id=\"2244994945\",\n body=FollowListRequest(list_id=\"1450000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.followList(\"2244994945\", { \"list_id\": \"1450000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().followList(\n \"2244994945\",\n new Schemas.FollowListRequest().listId(\"1450000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.FollowListAsync(\n \"2244994945\",\n new FollowListRequest { ListId = \"1450000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/followed_lists \\\n -d '{\"list_id\":\"1450000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/followed_lists/{list_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.unfollow_list(id=\"2244994945\", list_id=\"1450000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.unfollowList(\"2244994945\", \"1450000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().unfollowList(\"2244994945\", \"1450000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.UnfollowListAsync(\"2244994945\", \"1450000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/followed_lists/1450000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/followers'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_followers(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getFollowers(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getFollowersPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetFollowersPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/followers" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/following'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_following(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getFollowing(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getFollowingPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetFollowingPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/following" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/following'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import FollowUserRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.follow_user(id=\"2244994945\", body=FollowUserRequest(target_user_id=\"2244994945\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.followUser(\"2244994945\", { \"target_user_id\": \"2244994945\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().followUser(\n \"2244994945\",\n new Schemas.FollowUserRequest().targetUserId(\"2244994945\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.FollowUserAsync(\"2244994945\", new FollowUserRequest { TargetUserId = \"2244994945\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/following \\\n -d '{\"target_user_id\":\"2244994945\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/liked_tweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_liked_posts(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getLikedPosts(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getLikedPostsPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetLikedPostsPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/liked_tweets" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/likes'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import LikePostRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.like_post(\n id=\"2244994945\",\n body=LikePostRequest(tweet_id=\"1895000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.likePost(\"2244994945\", { \"tweet_id\": \"1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().likePost(\n \"2244994945\",\n new Schemas.LikePostRequest().tweetId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.LikePostAsync(\n \"2244994945\",\n new LikePostRequest { TweetId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/likes \\\n -d '{\"tweet_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/likes/{tweet_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.unlike_post(id=\"2244994945\", tweet_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.unlikePost(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().unlikePost(\"2244994945\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.UnlikePostAsync(\"2244994945\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/likes/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/list_memberships'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_list_memberships(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getListMemberships(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getListMembershipsPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetListMembershipsPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/list_memberships" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/mentions'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_mentions(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getMentions(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getMentionsPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetMentionsPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/mentions" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/muting'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_muting(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getMuting(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getMutingPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetMutingPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/muting" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/muting'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import MuteUserRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.mute_user(id=\"2244994945\", body=MuteUserRequest(target_user_id=\"2244994945\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.muteUser(\"2244994945\", { \"target_user_id\": \"2244994945\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().muteUser(\n \"2244994945\",\n new Schemas.MuteUserRequest().targetUserId(\"2244994945\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.MuteUserAsync(\"2244994945\", new MuteUserRequest { TargetUserId = \"2244994945\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/muting \\\n -d '{\"target_user_id\":\"2244994945\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/owned_lists'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_owned_lists(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getOwnedLists(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getOwnedListsPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetOwnedListsPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/owned_lists" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/pinned_lists'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.get_pinned_lists(id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getPinnedLists(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().getPinnedLists(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.GetPinnedListsAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/pinned_lists" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/pinned_lists'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import PinListRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.pin_list(id=\"2244994945\", body=PinListRequest(list_id=\"1450000000000000000\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.pinList(\"2244994945\", { \"list_id\": \"1450000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().pinList(\n \"2244994945\",\n new Schemas.PinListRequest().listId(\"1450000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.PinListAsync(\"2244994945\", new PinListRequest { ListId = \"1450000000000000000\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/pinned_lists \\\n -d '{\"list_id\":\"1450000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/pinned_lists/{list_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.unpin_list(id=\"2244994945\", list_id=\"1450000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.unpinList(\"2244994945\", \"1450000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().unpinList(\"2244994945\", \"1450000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.UnpinListAsync(\"2244994945\", \"1450000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/pinned_lists/1450000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/public_keys'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.get_public_key(id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getPublicKey(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().getPublicKey(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.GetPublicKeyAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/public_keys" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/public_keys'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.chat.models import AddUserPublicKeyRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.chat.add_user_public_key(\n id=\"2244994945\",\n body=AddUserPublicKeyRequest(public_key={\"public_key\": \"example\"})\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.chat.addUserPublicKey(\"2244994945\", { \"public_key\": { \"public_key\": \"example\" } });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.chat().addUserPublicKey(\"2244994945\", new Schemas.AddUserPublicKeyRequest());\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Chat.AddUserPublicKeyAsync(\"2244994945\", new AddUserPublicKeyRequest());\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/public_keys \\\n -d '{\"public_key\":{\"public_key\":\"example\"}}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/retweets'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.users.models import RepostPostRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.repost_post(\n id=\"2244994945\",\n body=RepostPostRequest(tweet_id=\"1895000000000000000\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.repostPost(\"2244994945\", { \"tweet_id\": \"1895000000000000000\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().repostPost(\n \"2244994945\",\n new Schemas.RepostPostRequest().tweetId(\"1895000000000000000\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.RepostPostAsync(\n \"2244994945\",\n new RepostPostRequest { TweetId = \"1895000000000000000\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/retweets \\\n -d '{\"tweet_id\":\"1895000000000000000\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/retweets/{source_tweet_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.unrepost_post(id=\"2244994945\", source_tweet_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.unrepostPost(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().unrepostPost(\"2244994945\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.UnrepostPostAsync(\"2244994945\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/retweets/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/sources'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.list_user_sources(id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.listUserSources(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().listUserSources(\"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.ListUserSourcesAsync(\"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/sources" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/sources'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import CreateUserSourceRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.create_user_source(id=\"2244994945\", body=CreateUserSourceRequest(name=\"My List\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.createUserSource(\"2244994945\", { name: \"My List\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().createUserSource(\"2244994945\", new Schemas.CreateUserSourceRequest().name(\"My List\"));\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.CreateUserSourceAsync(\"2244994945\", new CreateUserSourceRequest { Name = \"My List\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/users/2244994945/sources \\\n -d '{\"name\":\"My List\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/sources/{source_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.delete_user_source(id=\"2244994945\", source_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.deleteUserSource(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().deleteUserSource(\"2244994945\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.DeleteUserSourceAsync(\"2244994945\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/sources/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/sources/{source_id}'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.get_user_source(id=\"2244994945\", source_id=\"1895000000000000000\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.getUserSource(\"2244994945\", \"1895000000000000000\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().getUserSource(\"2244994945\", \"1895000000000000000\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.GetUserSourceAsync(\"2244994945\", \"1895000000000000000\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/sources/1895000000000000000" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/sources/{source_id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.broadcasts.models import UpdateUserSourceRequest\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.broadcasts.update_user_source(\n id=\"2244994945\",\n source_id=\"1895000000000000000\",\n body=UpdateUserSourceRequest(name=\"My List\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.broadcasts.updateUserSource(\"2244994945\", \"1895000000000000000\", { name: \"My List\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.broadcasts().updateUserSource(\n \"2244994945\",\n \"1895000000000000000\",\n new Schemas.UpdateUserSourceRequest().name(\"My List\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Broadcasts.UpdateUserSourceAsync(\n \"2244994945\",\n \"1895000000000000000\",\n new UpdateUserSourceRequest { Name = \"My List\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/users/2244994945/sources/1895000000000000000 \\\n -d '{\"name\":\"My List\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/timelines/reverse_chronological'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nfor page in client.users.get_timeline(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.getTimeline(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nfor (var page : client.users().getTimelinePages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetTimelinePages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/timelines/reverse_chronological" + } + ] + } + }, + { + "target": "$.paths['/2/users/{id}/tweets'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nfor page in client.users.get_posts(id=\"2244994945\"):\n print(page.data)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.users.getPosts(\"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nfor (var page : client.users().getPostsPages(\"2244994945\")) {\n System.out.println(page);\n}" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nawait foreach (var page in client.Users.GetPostsPages(\"2244994945\"))\n{\n Console.WriteLine(page);\n}" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/users/2244994945/tweets" + } + ] + } + }, + { + "target": "$.paths['/2/users/{source_user_id}/blocking/{target_user_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.id_unblock(source_user_id=\"2244994945\", target_user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.idUnblock(\"2244994945\", \"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().idUnblock(\"2244994945\", \"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.IdUnblockAsync(\"2244994945\", \"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/blocking/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/users/{source_user_id}/following/{target_user_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.unfollow_user(source_user_id=\"2244994945\", target_user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.unfollowUser(\"2244994945\", \"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().unfollowUser(\"2244994945\", \"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.UnfollowUserAsync(\"2244994945\", \"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/following/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/users/{source_user_id}/muting/{target_user_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(access_token=os.environ[\"X_ACCESS_TOKEN\"])\n\nresponse = client.users.unmute_user(source_user_id=\"2244994945\", target_user_id=\"2244994945\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ accessToken: process.env.X_ACCESS_TOKEN });\n\nconst response = await client.users.unmuteUser(\"2244994945\", \"2244994945\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .accessToken(System.getenv(\"X_ACCESS_TOKEN\"))\n .build();\n\nvar response = client.users().unmuteUser(\"2244994945\", \"2244994945\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n AccessToken = Environment.GetEnvironmentVariable(\"X_ACCESS_TOKEN\"),\n});\n\nvar response = await client.Users.UnmuteUserAsync(\"2244994945\", \"2244994945\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/users/2244994945/muting/2244994945" + } + ] + } + }, + { + "target": "$.paths['/2/webhooks'].get", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.get()\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.get();\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().get();\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.GetAsync();\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl /2/webhooks" + } + ] + } + }, + { + "target": "$.paths['/2/webhooks'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.webhooks.models import CreateRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.create(body=CreateRequest(url=\"https://example.com/webhook\"))\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.create({ url: \"https://example.com/webhook\" });\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().create(\n new Schemas.CreateWebhooksRequest().url(\"https://example.com/webhook\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.CreateAsync(new CreateWebhooksRequest { Url = \"https://example.com/webhook\" });\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/webhooks \\\n -d '{\"url\":\"https://example.com/webhook\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/webhooks/replay'].post", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\nfrom xdk.webhooks.models import CreateWebhookReplayJobRequest\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.create_webhook_replay_job(\n body=CreateWebhookReplayJobRequest(webhook_id=\"1234567890\", from_date=\"example\", to_date=\"example\")\n)\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.createWebhookReplayJob(\n { \"webhook_id\": \"1234567890\", \"from_date\": \"example\", \"to_date\": \"example\" }\n);\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.Schemas;\nimport com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().createWebhookReplayJob(\n new Schemas.CreateWebhookReplayJobRequest().webhookId(\"1234567890\").fromDate(\"example\").toDate(\"example\")\n);\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\nusing Xdk.Models;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.CreateWebhookReplayJobAsync(\n new CreateWebhookReplayJobRequest { WebhookId = \"1234567890\", FromDate = \"example\", ToDate = \"example\" }\n);\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X POST /2/webhooks/replay \\\n -d '{\"webhook_id\":\"1234567890\",\"from_date\":\"example\",\"to_date\":\"example\"}'" + } + ] + } + }, + { + "target": "$.paths['/2/webhooks/{webhook_id}'].delete", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.delete(webhook_id=\"1234567890\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.delete(\"1234567890\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().delete(\"1234567890\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.DeleteAsync(\"1234567890\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X DELETE /2/webhooks/1234567890" + } + ] + } + }, + { + "target": "$.paths['/2/webhooks/{webhook_id}'].put", + "update": { + "x-codeSamples": [ + { + "lang": "python", + "label": "Python (XDK)", + "source": "import os\nfrom xdk import Client\n\nclient = Client(bearer_token=os.environ[\"X_BEARER_TOKEN\"])\n\nresponse = client.webhooks.validate(webhook_id=\"1234567890\")\nprint(response)" + }, + { + "lang": "typescript", + "label": "TypeScript (XDK)", + "source": "import { Client } from \"@xdevplatform/xdk\";\n\nconst client = new Client({ bearerToken: process.env.X_BEARER_TOKEN });\n\nconst response = await client.webhooks.validate(\"1234567890\");\nconsole.log(response);" + }, + { + "lang": "java", + "label": "Java (XDK)", + "source": "import com.x.xdk.XClient;\n\nXClient client = XClient.builder()\n .bearerToken(System.getenv(\"X_BEARER_TOKEN\"))\n .build();\n\nvar response = client.webhooks().validate(\"1234567890\");\nSystem.out.println(response);" + }, + { + "lang": "csharp", + "label": "C# (XDK)", + "source": "using System;\nusing Xdk;\n\nusing var client = new XClient(new XClientOptions\n{\n BearerToken = Environment.GetEnvironmentVariable(\"X_BEARER_TOKEN\"),\n});\n\nvar response = await client.Webhooks.ValidateAsync(\"1234567890\");\nConsole.WriteLine(response);" + }, + { + "lang": "bash", + "label": "xurl", + "source": "xurl -X PUT /2/webhooks/1234567890" + } + ] + } + } + ] +} diff --git a/overview.mdx b/overview.mdx index 232dbb9ca..0bca3c789 100644 --- a/overview.mdx +++ b/overview.mdx @@ -70,8 +70,8 @@ New pay-per-use accounts can earn up to **$70** in free X API credits: &d Explore endpoints for posts, users, spaces, DMs, lists, and more. - - Official Python and TypeScript SDKs for faster development. + + Official Python, TypeScript, Java, and C# SDKs for faster development. diff --git a/tools-and-libraries.mdx b/tools-and-libraries.mdx index 77b18d0c1..18fc561c5 100644 --- a/tools-and-libraries.mdx +++ b/tools-and-libraries.mdx @@ -1,24 +1,32 @@ --- title: Tools & Libraries sidebarTitle: Overview -description: Official X API SDKs in Python and TypeScript, CLI tools like xurl, the playground server, MCP servers for AI, and community client libraries. -keywords: ["tools", "libraries", "SDK", "XDK", "client libraries", "Postman", "xurl", "playground", "XMCP", "developer tools", "API tools", "code libraries", "Python SDK", "TypeScript SDK", "AI tools", "MCP"] +description: Official X API SDKs in Python, TypeScript, Java, and C#, CLI tools like xurl, the API playground server, MCP servers for AI agents, and community libraries. +keywords: ["tools", "libraries", "SDK", "XDK", "client libraries", "Postman", "xurl", "playground", "XMCP", "developer tools", "Python SDK", "TypeScript SDK", "Java SDK", "C# SDK", ".NET SDK", "AI tools", "MCP"] --- import { Button } from '/snippets/button.mdx'; -Speed up your development with official SDKs, developer tools, and community libraries. +Speed up your development with official SDKs, CLI tools, AI agent integrations, and community libraries. --- -## Official SDKs +## Official SDKs (XDKs) + +Generated directly from the X API v2 OpenAPI specification with built-in authentication, pagination, and real-time streaming. - Async support, type hints, and automatic token refresh. Perfect for data analysis and automation. + `pip install xdk` — Pydantic models, iterator pagination, OAuth 2.0 PKCE, and streaming for Python 3.8+. - Full type safety and ESM support. Works in Node.js and modern bundlers. + `npm install @xdevplatform/xdk` — Full TypeScript definitions, dual ESM/CJS builds, and event-driven streaming for Node.js 18+. + + + `com.x:xdk` on Maven Central — Fluent builders, `Paginator`, and `AutoCloseable` `EventStream` for Java 17+. + + + `XDevPlatform.Xdk` on NuGet — Zero external runtime dependencies, `async`/`await`, and `IAsyncEnumerable` for .NET 8+. @@ -31,14 +39,15 @@ pip install xdk ``` ```python +import os from xdk import Client -client = Client(bearer_token="YOUR_BEARER_TOKEN") +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) -for page in client.posts.search_recent(query="api", max_results=10): - if page.data and len(page.data) > 0: +for page in client.posts.search_recent(query="from:XDevelopers", max_results=10): + if page.data: print(page.data[0].text) - break + break ``` @@ -51,13 +60,55 @@ npm install @xdevplatform/xdk ```typescript import { Client } from '@xdevplatform/xdk'; -const client = new Client({ bearerToken: 'YOUR_BEARER_TOKEN' }); +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); const userResponse = await client.users.getByUsername('XDevelopers'); console.log(userResponse.data?.username); ``` + +```xml + + com.x + xdk + 0.1.2 + +``` + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.users().getByUsername("XDevelopers"); +System.out.println(response.getData()); +``` + + + + +```bash +dotnet add package XDevPlatform.Xdk +``` + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Users.GetByUsernameAsync("XDevelopers"); +Console.WriteLine(response.Data); +``` + + + --- @@ -65,17 +116,23 @@ console.log(userResponse.data?.username); ## Developer tools - - Interactive API testing for all v2 endpoints. - - curl-like CLI for the X API with built-in OAuth authentication. No manual token management. + `curl`-like CLI for the X API with built-in OAuth 2.0, OAuth 1.0a, and app-only authentication. + + + Client-side encryption, key management, and signing toolkit for X Chat in Python, TS, Java, C#, Go, and Rust. - - Local mock server for testing X API v2 endpoints without using real credits. + + Interactive API testing for X API v2 endpoints. + + + Local mock server for testing X API v2 endpoints without spending credits. - XMCP, llms.txt, skill.md, docs MCP server, and resources for AI-powered development. + XMCP, `llms.txt`, `skill.md`, docs MCP server, and resources for AI-powered development. + + + Open-source Rust code generator powering all four official XDKs. @@ -83,8 +140,8 @@ console.log(userResponse.data?.username); | Tool | Description | |:-----|:------------| -| [OpenAPI Spec](https://api.x.com/2/openapi.json) | Machine-readable API specification | -| [twitter-text](https://github.com/twitter/twitter-text) | Parse and validate post text, count characters | +| [OpenAPI Spec](https://api.x.com/2/openapi.json) | Machine-readable X API v2 specification | +| [twitter-text](https://github.com/twitter/twitter-text) | Parse and validate post text and character counts | | [Embed Generator](https://publish.x.com/#) | Build embeddable posts, timelines, or buttons for your site | --- @@ -157,9 +214,9 @@ Community libraries are not maintained by X. Check their repositories for suppor ## Code samples -- [X API v2 Sample Code](https://github.com/xdevplatform/Twitter-API-v2-sample-code) — Examples in Python, JavaScript, Ruby, and more -- [Code Samples Repo](https://github.com/xdevplatform/samples) — Examples using the official XDKs -- [X Developer GitHub](https://github.com/xdevplatform) — Official repos and tools +- [XDK Code Samples Repo](https://github.com/xdevplatform/samples) — Runnable examples using the official XDKs +- [X API v2 Sample Code](https://github.com/xdevplatform/Twitter-API-v2-sample-code) — Standalone HTTP examples across languages +- [X Developer GitHub](https://github.com/xdevplatform) — Official repositories and developer tools --- diff --git a/tools/csharp-xdk.mdx b/tools/csharp-xdk.mdx new file mode 100644 index 000000000..302398821 --- /dev/null +++ b/tools/csharp-xdk.mdx @@ -0,0 +1,146 @@ +--- +title: C# / .NET XDK +sidebarTitle: C# +description: Install and use the official C# / .NET XDK client library (XDevPlatform.Xdk) for the X API v2 with async/await, IAsyncEnumerable pagination, and EventStream. +keywords: ["C# SDK", ".NET SDK", "XDK", "C#", "dotnet", "NuGet", "XDevPlatform.Xdk", "X API"] +--- + +The [C# / .NET XDK](https://github.com/xdevplatform/xdk-csharp) (`XDevPlatform.Xdk` on NuGet) is the official .NET client library for the X API v2, targeting .NET 8+ with zero external runtime dependencies (`System.Net.Http` and `System.Text.Json`), `CancellationToken` support on every call, `Paginator`, and `EventStream`. + + + + `dotnet add package XDevPlatform.Xdk` — .NET 8.0+. + + + Source code, runnable examples, and issue tracker. + + + +--- + +## Installation + + + +```bash .NET CLI +dotnet add package XDevPlatform.Xdk +``` + +```xml PackageReference + + + +``` + + + +Requires .NET 8.0+. + +--- + +## Quick start + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var user = await client.Users.GetByUsernameAsync("XDevelopers"); +Console.WriteLine(user.Data); +``` + +--- + +## Authentication + + + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); +``` + + +```csharp +using System; +using Xdk; +using Xdk.Auth; + +var oauth2 = new OAuth2Pkce( + clientId: Environment.GetEnvironmentVariable("X_CLIENT_ID")!, + clientSecret: Environment.GetEnvironmentVariable("X_CLIENT_SECRET"), + redirectUri: "http://localhost:8080/callback", + scopes: new[] { "tweet.read", "tweet.write", "users.read", "offline.access" } +); + +string authUrl = oauth2.GetAuthorizationUrl("state-token"); +OAuth2Token token = await oauth2.ExchangeCodeAsync(authCode); + +using var client = new XClient(new XClientOptions { OAuth2 = oauth2 }); +``` + + +```csharp +using System; +using Xdk; +using Xdk.Auth; + +var oauth1 = new OAuth1( + apiKey: Environment.GetEnvironmentVariable("X_API_KEY")!, + apiSecret: Environment.GetEnvironmentVariable("X_API_SECRET")!, + callback: "oob", + accessToken: Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), + accessTokenSecret: Environment.GetEnvironmentVariable("X_ACCESS_TOKEN_SECRET") +); + +using var client = new XClient(new XClientOptions { OAuth1 = oauth1 }); +``` + + + +--- + +## Common methods + +| Category | Method | +|:---------|:-------| +| **Posts** | `client.Posts.SearchRecentPages(query, opts)`, `client.Posts.CreateAsync(body)` | +| **Users** | `client.Users.GetMeAsync()`, `client.Users.GetByUsernameAsync(username)` | +| **Streams** | `client.Stream.PostsStream()`, `client.Stream.PostsSampleStream()` | +| **Spaces** | `client.Spaces.GetByIdAsync(id)` | +| **Lists** | `client.Lists.GetByIdAsync(id)` | +| **Direct Messages** | `client.DirectMessages.GetEventsPages()` | + +--- + +## Learn more + + + + .NET CLI, csproj configuration, and DI setup. + + + Step-by-step first request walkthrough. + + + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a guides. + + + `IAsyncEnumerable` paging via `*Pages(...)` methods. + + + `await using` + `await foreach` on `EventStream`. + + + Complete reference for all 24 resource clients. + + diff --git a/tools/java-xdk.mdx b/tools/java-xdk.mdx new file mode 100644 index 000000000..d0099d249 --- /dev/null +++ b/tools/java-xdk.mdx @@ -0,0 +1,152 @@ +--- +title: Java XDK +sidebarTitle: Java +description: Install and use the official Java XDK client library (com.x:xdk) for the X API v2 with fluent builders, OAuth 2.0 PKCE, Paginator, and EventStream. +keywords: ["Java SDK", "XDK", "Java", "Kotlin", "Maven", "Gradle", "com.x:xdk", "X API"] +--- + +The [Java XDK](https://github.com/xdevplatform/xdk-java) (`com.x:xdk` on Maven Central) is the official JVM client library for the X API v2, targeting Java 17+ (including Java 21, Kotlin, and Scala) with strongly typed Jackson models, `Paginator`, and `AutoCloseable` `EventStream`. + + + + `com.x:xdk:0.1.2` — Java 17+. + + + Source code, runnable examples, and issue tracker. + + + +--- + +## Installation + + + +```xml Maven + + com.x + xdk + 0.1.2 + +``` + +```kotlin Gradle (Kotlin DSL) +dependencies { + implementation("com.x:xdk:0.1.2") +} +``` + +```groovy Gradle (Groovy) +dependencies { + implementation 'com.x:xdk:0.1.2' +} +``` + + + +Requires JDK 17+. + +--- + +## Quick start + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var user = client.users().getByUsername("XDevelopers"); +System.out.println(user.getData()); +``` + +--- + +## Authentication + + + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); +``` + + +```java +import com.x.xdk.XClient; +import com.x.xdk.auth.OAuth2Pkce; +import com.x.xdk.auth.OAuth2Token; +import java.util.List; + +OAuth2Pkce oauth2 = new OAuth2Pkce( + System.getenv("X_CLIENT_ID"), + System.getenv("X_CLIENT_SECRET"), + "http://localhost:8080/callback", + List.of("tweet.read", "tweet.write", "users.read", "offline.access") +); + +String authUrl = oauth2.getAuthorizationUrl("state-token"); +OAuth2Token token = oauth2.exchangeCode(authCode); + +XClient client = XClient.builder().oauth2(oauth2).build(); +``` + + +```java +import com.x.xdk.XClient; +import com.x.xdk.auth.OAuth1; + +OAuth1 oauth1 = new OAuth1( + System.getenv("X_API_KEY"), + System.getenv("X_API_SECRET"), + "oob", + System.getenv("X_ACCESS_TOKEN"), + System.getenv("X_ACCESS_TOKEN_SECRET") +); + +XClient client = XClient.builder().oauth1(oauth1).build(); +``` + + + +--- + +## Common methods + +| Category | Method | +|:---------|:-------| +| **Posts** | `client.posts().searchRecentPages(query, opts)`, `client.posts().create(body)` | +| **Users** | `client.users().getMe()`, `client.users().getByUsername(username)` | +| **Streams** | `client.stream().posts()`, `client.stream().postsSample()` | +| **Spaces** | `client.spaces().getById(id)` | +| **Lists** | `client.lists().getById(id)` | +| **Direct Messages** | `client.directMessages().getEventsPages()` | + +--- + +## Learn more + + + + Maven, Gradle, JDK requirements, and build setup. + + + Step-by-step first request walkthrough. + + + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a guides. + + + `Paginator` cursor iteration via `*Pages(...)` methods. + + + `EventStream` with `try-with-resources` and auto-reconnect. + + + Complete reference for all 24 resource clients. + + diff --git a/tools/llms-txt.mdx b/tools/llms-txt.mdx index d759c0988..e112b14dd 100644 --- a/tools/llms-txt.mdx +++ b/tools/llms-txt.mdx @@ -17,7 +17,7 @@ The [`llms.txt` standard](https://llmstxt.org) is like a sitemap for AI. It help | [`x-api/llms.txt`](https://docs.x.com/x-api/llms.txt) | 370+ X API v2 reference pages | Posts, Users, DMs, Streams, Compliance, etc. | | [`enterprise-api/llms.txt`](https://docs.x.com/enterprise-api/llms.txt) | Enterprise, Account Activity, GNIP, Webhooks | Historical + real-time enterprise data | | [`x-ads-api/llms.txt`](https://docs.x.com/x-ads-api/llms.txt) | Ads API (campaigns, creatives, audiences, analytics) | Advertising and measurement | -| [`xdks/python/llms.txt`](https://docs.x.com/xdks/python/llms.txt) + [`xdks/typescript/llms.txt`](https://docs.x.com/xdks/typescript/llms.txt) | Full SDK client & model references | Python and TypeScript/JavaScript developers | +| [`xdks/llms.txt`](https://docs.x.com/xdks/llms.txt) | Official Python, TypeScript, Java, and C# SDK indexes ([Python](https://docs.x.com/xdks/python/llms.txt), [TypeScript](https://docs.x.com/xdks/typescript/llms.txt), [Java](https://docs.x.com/xdks/java/llms.txt), [C#](https://docs.x.com/xdks/csharp/llms.txt)) | Python, TypeScript/JS, Java, and .NET developers | | [`llms-full.txt`](https://docs.x.com/llms-full.txt) | Entire docs as one Markdown file | Maximum context for deep reasoning | These files (plus section-specific indexes under `/x-api/llms.txt`, `/enterprise-api/llms.txt`, `/x-ads-api/llms.txt`, and the XDKs) are available at the root and under `/.well-known/`. Every documentation page supports the `.md` suffix for clean Markdown (example: `https://docs.x.com/x-api/posts/get-post-by-id.md`). diff --git a/tools/python-xdk.mdx b/tools/python-xdk.mdx index a319219f6..9a41f6614 100644 --- a/tools/python-xdk.mdx +++ b/tools/python-xdk.mdx @@ -5,11 +5,16 @@ description: Install and use the official Python XDK client library for the X AP keywords: ["Python SDK", "XDK", "Python", "X API", "client library", "pip", "xdk"] --- -The [Python XDK](https://github.com/xdevplatform/xdk-python) is the official client library for the X API v2. It handles authentication, pagination, and streaming so you can focus on building. +The [Python XDK](https://github.com/xdevplatform/xdk-python) (`xdk` on PyPI) is the official Python client library for the X API v2, providing Pydantic v2 models, automatic pagination, OAuth helpers, and streaming. - - Source code, issues, and releases. - + + + `pip install xdk` — Python 3.8+. + + + Source code, release notes, and issue tracker. + + --- @@ -26,54 +31,44 @@ Requires Python 3.8+. ## Quick start ```python +import os from xdk import Client -client = Client(bearer_token="YOUR_BEARER_TOKEN") +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) -# Search for posts -for page in client.posts.search_recent(query="X API", max_results=10): - if page.data and len(page.data) > 0: +for page in client.posts.search_recent(query="from:XDevelopers", max_results=10): + if page.data: print(page.data[0].text) - break + break ``` --- -## Key features - -| Feature | Description | -|:--------|:------------| -| **OAuth support** | Bearer Token, OAuth 2.0 with PKCE, and OAuth 1.0a | -| **Automatic pagination** | Iterate through results without manual `next_token` handling | -| **Streaming** | Real-time data via persistent connections (filtered stream, etc.) | -| **Full API coverage** | All X API v2 endpoints — search, timelines, filtered stream, and more | - ---- - ## Authentication ```python +import os from xdk import Client -client = Client(bearer_token="YOUR_BEARER_TOKEN") +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) ``` - -```python title="Example" lines wrap icon="python" + +```python from xdk import Client from xdk.oauth2_auth import OAuth2PKCEAuth auth = OAuth2PKCEAuth( client_id="YOUR_CLIENT_ID", - redirect_uri="YOUR_CALLBACK_URL", - scope="tweet.read users.read offline.access" + redirect_uri="http://localhost:8080/callback", + scope="tweet.read tweet.write users.read offline.access", ) auth_url = auth.get_authorization_url() tokens = auth.fetch_token(authorization_response=callback_url) -client = Client(bearer_token=tokens["access_token"]) +client = Client(access_token=tokens["access_token"]) ``` @@ -85,7 +80,7 @@ oauth1 = OAuth1( api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET", access_token="YOUR_ACCESS_TOKEN", - access_token_secret="YOUR_ACCESS_TOKEN_SECRET" + access_token_secret="YOUR_ACCESS_TOKEN_SECRET", ) client = Client(auth=oauth1) @@ -99,11 +94,12 @@ client = Client(auth=oauth1) | Category | Method | |:---------|:-------| -| **Posts** | `client.posts.search_recent()` | -| **Users** | `client.users.get_me()` | -| **Spaces** | `client.spaces.get()` | -| **Lists** | `client.lists.get()` | -| **DMs** | `client.direct_messages.get()` | +| **Posts** | `client.posts.search_recent(query="...")`, `client.posts.create(body=...)` | +| **Users** | `client.users.get_me()`, `client.users.get_by_username(username="...")` | +| **Streams** | `client.stream.posts()`, `client.stream.update_rules(body=...)` | +| **Spaces** | `client.spaces.get_by_id(id="...")` | +| **Lists** | `client.lists.get_by_id(id="...")` | +| **Direct Messages** | `client.direct_messages.get_events()` | --- @@ -111,23 +107,21 @@ client = Client(auth=oauth1) - Development install, prerequisites, and verification. + Virtual environments, editable installs, and verification. Step-by-step first request walkthrough. - Detailed guide for all auth methods. + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a guides. - Automatic pagination and iterators. + Automatic iterator pagination and manual cursors. - Real-time data via filtered stream. + Filtered stream, sample stream, and rule management. - - Complete client and model reference. + + Complete reference for all 24 resource clients. - -For code examples, see the [samples repo](https://github.com/xdevplatform/samples/tree/main/python). \ No newline at end of file diff --git a/tools/typescript-xdk.mdx b/tools/typescript-xdk.mdx index da6e00bf5..b2ebd5914 100644 --- a/tools/typescript-xdk.mdx +++ b/tools/typescript-xdk.mdx @@ -2,14 +2,19 @@ title: TypeScript XDK sidebarTitle: TypeScript description: Install and use the official TypeScript XDK client library for the X API v2, with authentication, typed responses, pagination, and streaming examples. -keywords: ["TypeScript SDK", "XDK", "TypeScript", "JavaScript", "X API", "client library", "npm", "xdk"] +keywords: ["TypeScript SDK", "XDK", "TypeScript", "JavaScript", "X API", "client library", "npm", "@xdevplatform/xdk"] --- -The [TypeScript XDK](https://github.com/xdevplatform/twitter-api-typescript-sdk) is the official client library for the X API v2. Full type safety, automatic pagination, and event-driven streaming. +The [TypeScript XDK](https://github.com/xdevplatform/xdk-typescript) (`@xdevplatform/xdk` on npm) is the official TypeScript and JavaScript client library for the X API v2, featuring full TypeScript types, dual ESM/CommonJS builds, async paginators, and event-driven streaming. - - Source code, issues, and releases. - + + + `npm install @xdevplatform/xdk` — Node.js 18+. + + + Source code, release notes, and issue tracker. + + --- @@ -21,70 +26,58 @@ The [TypeScript XDK](https://github.com/xdevplatform/twitter-api-typescript-sdk) npm install @xdevplatform/xdk ``` -```bash yarn -yarn add @xdevplatform/xdk -``` - ```bash pnpm pnpm add @xdevplatform/xdk ``` +```bash yarn +yarn add @xdevplatform/xdk +``` + -Requires Node.js 16+ and TypeScript 4.5+ (if using TypeScript). +Requires Node.js 18+ (built-in `fetch` and Web Crypto). --- ## Quick start ```typescript -import { Client } from '@xdevplatform/xdk'; +import { Client } from "@xdevplatform/xdk"; -const client = new Client({ bearerToken: 'YOUR_BEARER_TOKEN' }); +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); -const userResponse = await client.users.getByUsername('XDevelopers'); +const userResponse = await client.users.getByUsername("XDevelopers"); console.log(userResponse.data?.username); ``` --- -## Key features - -| Feature | Description | -|:--------|:------------| -| **Type safety** | Complete TypeScript definitions for all endpoints and parameters | -| **Authentication** | Bearer Token, OAuth 2.0 with PKCE, and OAuth 1.0a | -| **Automatic pagination** | Async iteration support for paginated endpoints | -| **Streaming** | Event-driven streaming with automatic reconnection | -| **Full API coverage** | Users, Posts, Lists, Bookmarks, Communities, and more | - ---- - ## Authentication ```typescript -import { Client } from '@xdevplatform/xdk'; +import { Client } from "@xdevplatform/xdk"; -const client = new Client({ bearerToken: 'YOUR_BEARER_TOKEN' }); +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); ``` - -```typescript title="Example" lines wrap icon="square-js" -import { Client, OAuth2, generateCodeVerifier, generateCodeChallenge } from '@xdevplatform/xdk'; + +```typescript +import { Client, OAuth2, generateCodeVerifier, generateCodeChallenge } from "@xdevplatform/xdk"; const oauth2 = new OAuth2({ - clientId: 'YOUR_CLIENT_ID', - clientSecret: 'YOUR_CLIENT_SECRET', - redirectUri: 'https://your-app.com/callback', - scope: ['tweet.read', 'users.read', 'offline.access'], + clientId: process.env.X_CLIENT_ID!, + clientSecret: process.env.X_CLIENT_SECRET, + redirectUri: "http://localhost:3000/callback", + scope: ["tweet.read", "tweet.write", "users.read", "offline.access"], }); const codeVerifier = generateCodeVerifier(); const codeChallenge = await generateCodeChallenge(codeVerifier); oauth2.setPkceParameters(codeVerifier, codeChallenge); -const authUrl = await oauth2.getAuthorizationUrl('state'); +const authUrl = await oauth2.getAuthorizationUrl("state"); const tokens = await oauth2.exchangeCode(authCode, codeVerifier); const client = new Client({ accessToken: tokens.access_token }); @@ -92,16 +85,16 @@ const client = new Client({ accessToken: tokens.access_token }); ```typescript -import { Client, OAuth1 } from '@xdevplatform/xdk'; +import { Client, OAuth1 } from "@xdevplatform/xdk"; const oauth1 = new OAuth1({ - apiKey: 'YOUR_API_KEY', - apiSecret: 'YOUR_API_SECRET', - accessToken: 'YOUR_ACCESS_TOKEN', - accessTokenSecret: 'YOUR_ACCESS_TOKEN_SECRET' + apiKey: process.env.X_API_KEY!, + apiSecret: process.env.X_API_SECRET!, + accessToken: process.env.X_ACCESS_TOKEN!, + accessTokenSecret: process.env.X_ACCESS_TOKEN_SECRET!, }); -const client = new Client({ oauth1: oauth1 }); +const client = new Client({ oauth1 }); ``` @@ -112,11 +105,12 @@ const client = new Client({ oauth1: oauth1 }); | Category | Method | |:---------|:-------| -| **Posts** | `client.posts.search()` | -| **Users** | `client.users.getMe()` | -| **Spaces** | `client.spaces.findSpaceById()` | -| **Lists** | `client.lists.getList()` | -| **DMs** | `client.directMessages.lookup()` | +| **Posts** | `client.posts.searchRecent(query, options)`, `client.posts.create(body)` | +| **Users** | `client.users.getMe()`, `client.users.getByUsername(username)` | +| **Streams** | `client.stream.posts()`, `client.stream.postsSample()` | +| **Spaces** | `client.spaces.getById(id)` | +| **Lists** | `client.lists.getById(id)` | +| **Direct Messages** | `client.directMessages.getEvents()` | --- @@ -124,20 +118,21 @@ const client = new Client({ oauth1: oauth1 }); - Package managers, TypeScript setup, and requirements. + Package managers, ESM/CommonJS usage, and requirements. + + + Step-by-step first request walkthrough. - Detailed guide for all auth methods. + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a guides. - Async iteration and paginated responses. + `UserPaginator`, `PostPaginator`, and async iteration. - Event-driven streaming with reconnection. + `EventDrivenStream` listeners and `for await` consumption. - - Complete client, interface, and type reference. + + Complete reference for all 24 resource clients. - -For code examples, see the [samples repo](https://github.com/xdevplatform/samples/tree/main/javascript). \ No newline at end of file diff --git a/x-api/introduction.mdx b/x-api/introduction.mdx index 4196098a7..920a1bfcf 100644 --- a/x-api/introduction.mdx +++ b/x-api/introduction.mdx @@ -17,8 +17,8 @@ The X API gives you programmatic access to X's public conversation. Read posts, Explore all available endpoints. - - Official Python and TypeScript libraries. + + Official Python, TypeScript, Java, and C# libraries. @@ -157,15 +157,18 @@ Earn free [xAI API](https://docs.x.ai) credits when you purchase X API credits ## Tools & libraries - + - Official Python library with async support. + Official Python library (`xdk`). - Official TypeScript/JavaScript library. + Official TypeScript/JavaScript library (`@xdevplatform/xdk`). + + + Official Java 17+ library (`com.x:xdk`). - - Interactive API explorer. + + Official .NET 8+ library (`XDevPlatform.Xdk`). diff --git a/xchat/getting-started.mdx b/xchat/getting-started.mdx index c1f8cee54..6dddc58cc 100644 --- a/xchat/getting-started.mdx +++ b/xchat/getting-started.mdx @@ -12,7 +12,7 @@ X Chat apps use two pieces together: | Component | Role | |:----------|:-----| | **[Chat XDK](/xchat/xchat-xdk)** | Encryption, decryption, signing, and private key storage (secure key backup or a key blob) | -| **X API** | Public keys, conversation keys, messages, and events: via the [Python](/xdks/python/overview) or [TypeScript](/xdks/typescript/overview) XDK, or HTTPS with a user access token | +| **X API** | Public keys, conversation keys, messages, and events: via the [Python](/xdks/python/overview), [TypeScript](/xdks/typescript/overview), [Java](/xdks/java/overview), or [C#](/xdks/csharp/overview) XDK, or HTTPS with a user access token | **Prerequisites** diff --git a/xchat/introduction.mdx b/xchat/introduction.mdx index 83419ed91..9cea32b8a 100644 --- a/xchat/introduction.mdx +++ b/xchat/introduction.mdx @@ -14,7 +14,7 @@ The **X Chat API** lets you send and receive **encrypted** direct messages on X. | Piece | Responsibility | |:------|:---------------| | **[Chat XDK](/xchat/xchat-xdk)** | Generate keys, encrypt/decrypt, sign/verify, optional passcode-protected secure key backup (Python, JS, Rust, Go, C#, Java) | -| **X API access** | Public keys, conversation keys, messages, events, media: via **[XDK](/xdks/python/overview)** (Python/TypeScript) or HTTPS | +| **X API access** | Public keys, conversation keys, messages, events, media: via **[XDK](/xdks/overview)** ([Python](/xdks/python/overview), [TypeScript](/xdks/typescript/overview), [Java](/xdks/java/overview), [C#](/xdks/csharp/overview)) or HTTPS | | **Delivery** | [Webhooks or activity stream](/xchat/real-time-events) for live events; events API for history | Follow **[Getting Started](/xchat/getting-started)** for a full implementation. For concepts only, see the **[Cryptography primer](/xchat/cryptography-primer)**. diff --git a/xchat/xchat-xdk.mdx b/xchat/xchat-xdk.mdx index 35bf577de..867c7384a 100644 --- a/xchat/xchat-xdk.mdx +++ b/xchat/xchat-xdk.mdx @@ -5,7 +5,7 @@ description: "Meet the Chat XDK, the library that handles keys, encryption, decr keywords: ["Chat XDK", "chat-xdk", "encryption SDK", "key management", "signing", "SDK reference"] --- -The **Chat XDK** handles key management, encryption, decryption, and signing for X Chat. It does **not** call the X HTTP API: pair it with the [Python](/xdks/python/overview) or [TypeScript](/xdks/typescript/overview) **XDK**, or with HTTPS and a user access token. +The **Chat XDK** handles key management, encryption, decryption, and signing for X Chat. It does **not** call the X HTTP API: pair it with the [Python](/xdks/python/overview), [TypeScript](/xdks/typescript/overview), [Java](/xdks/java/overview), or [C#](/xdks/csharp/overview) **XDK**, or with HTTPS and a user access token. App walkthrough: [Getting Started](/xchat/getting-started). Sample bots: [chat-xdk/examples](https://github.com/xdevplatform/chat-xdk/tree/main/examples). diff --git a/xdks/csharp/authentication.mdx b/xdks/csharp/authentication.mdx new file mode 100644 index 000000000..6180334c5 --- /dev/null +++ b/xdks/csharp/authentication.mdx @@ -0,0 +1,97 @@ +--- +title: C# Authentication +sidebarTitle: Authentication +description: Authenticate the C# / .NET XDK (XDevPlatform.Xdk) using Bearer Tokens, OAuth 2.0 PKCE with token refresh, or OAuth 1.0a user context. +--- + +`XClient` supports all three X API v2 authentication modes through `XClientOptions`: + +1. **Bearer Token (App-Only)** — Public read, search, and filtered/sample streaming endpoints. +2. **OAuth 2.0 User Context with PKCE** — Scoped user-authorized calls (`POST /2/tweets`, bookmarks, DMs, X Chat) with refresh token support. +3. **OAuth 1.0a User Context** — HMAC-SHA1 request signing. + +## 1. Bearer Token (App-Only) + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var user = await client.Users.GetByUsernameAsync("XDevelopers"); +``` + +## 2. OAuth 2.0 User Context with PKCE + +If you already hold an OAuth 2.0 user access token: + +```csharp +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var me = await client.Users.GetMeAsync(); +``` + +To run the full RFC 7636 PKCE authorization flow and enable token refresh via `OAuth2Pkce`: + +```csharp +using System; +using Xdk; +using Xdk.Auth; +using Xdk.Models; + +var oauth2 = new OAuth2Pkce( + clientId: Environment.GetEnvironmentVariable("X_CLIENT_ID")!, + redirectUri: "http://localhost:8080/callback", + clientSecret: Environment.GetEnvironmentVariable("X_CLIENT_SECRET"), // null for public clients + scopes: new[] { "tweet.read", "tweet.write", "users.read", "offline.access" } +); + +// 1. Direct the user to authorize your application +string authorizationUrl = oauth2.GetAuthorizationUrl("random-csrf-state"); + +// 2. Exchange the authorization code from the callback URL +OAuth2Token token = await oauth2.ExchangeCodeAsync(callbackCode); + +// 3. Create XClient bound to the OAuth2Pkce manager +using var client = new XClient(new XClientOptions +{ + OAuth2 = oauth2, +}); + +var created = await client.Posts.CreateAsync(new CreatePostsRequest +{ + Text = "Hello from C# XDK!", +}); + +// Refresh tokens explicitly when needed (requires offline.access scope) +await client.RefreshTokenAsync(); +``` + +## 3. OAuth 1.0a User Context + +```csharp +using System; +using Xdk; +using Xdk.Auth; + +var oauth1 = new OAuth1( + apiKey: Environment.GetEnvironmentVariable("X_API_KEY")!, + apiSecret: Environment.GetEnvironmentVariable("X_API_SECRET")!, + callback: "oob", + accessToken: Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), + accessTokenSecret: Environment.GetEnvironmentVariable("X_ACCESS_TOKEN_SECRET") +); + +using var client = new XClient(new XClientOptions +{ + OAuth1 = oauth1, +}); + +var me = await client.Users.GetMeAsync(); +``` diff --git a/xdks/csharp/install.mdx b/xdks/csharp/install.mdx new file mode 100644 index 000000000..5aab7ccae --- /dev/null +++ b/xdks/csharp/install.mdx @@ -0,0 +1,62 @@ +--- +title: Install C# / .NET XDK +sidebarTitle: Install +description: Install the official C# / .NET XDK (XDevPlatform.Xdk) from NuGet for .NET 8.0 and newer projects. +--- + +Install `XDevPlatform.Xdk` from [NuGet.org](https://www.nuget.org/packages/XDevPlatform.Xdk). + +## Prerequisites + +- **.NET 8.0 SDK** or newer (`.NET 8`, `.NET 9`) +- Zero external NuGet runtime dependencies required + +## Add Package + + + +```bash .NET CLI +dotnet add package XDevPlatform.Xdk +``` + +```xml PackageReference (.csproj) + + + +``` + +```powershell NuGet Package Manager +Install-Package XDevPlatform.Xdk +``` + + + +## Custom `HttpClient` Integration + +In ASP.NET Core or worker services using `IHttpClientFactory`, pass a managed `HttpClient` via `XClientOptions.HttpClient`: + +```csharp +using System.Net.Http; +using Xdk; + +var httpClient = new HttpClient(); +var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), + HttpClient = httpClient, +}); +``` + +## Build from Source + +```bash +git clone https://github.com/xdevplatform/xdk-csharp.git +cd xdk-csharp +dotnet test +``` + +## Next Steps + +- [Quickstart](/xdks/csharp/quickstart) — Make your first request +- [Authentication](/xdks/csharp/authentication) — Configure Bearer Token, OAuth 2.0 PKCE, or OAuth 1.0a +- [API Reference](/xdks/csharp/reference/overview) — Explore all 24 resource clients diff --git a/xdks/csharp/llms.txt b/xdks/csharp/llms.txt new file mode 100644 index 000000000..2d1864d26 --- /dev/null +++ b/xdks/csharp/llms.txt @@ -0,0 +1,40 @@ +# C# XDK (`XDevPlatform.Xdk` v0.1.2) + +> Official C# SDK for the X API v2 (.NET 8.0+). Install with `dotnet add package XDevPlatform.Xdk`. + +## Guides + +- [C# overview](https://docs.x.com/xdks/csharp/overview.md): Architecture, capabilities, and client overview +- [C# install](https://docs.x.com/xdks/csharp/install.md): Package installation and runtime requirements +- [C# quickstart](https://docs.x.com/xdks/csharp/quickstart.md): First authenticated X API v2 request in under 2 minutes +- [C# authentication](https://docs.x.com/xdks/csharp/authentication.md): Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a user-context setup +- [C# pagination](https://docs.x.com/xdks/csharp/pagination.md): Automatic cursor iteration across multi-page endpoints +- [C# streaming](https://docs.x.com/xdks/csharp/streaming.md): Real-time event streams with reconnection and lifecycle handling + +## Client Reference + +- [Reference Overview](https://docs.x.com/xdks/csharp/reference/overview.md): Main client options and resource client directory +- [`AccountClient` (Account)](https://docs.x.com/xdks/csharp/reference/clients/account.md): 2 methods via `client.Account` +- [`AccountActivityClient` (Account Activity)](https://docs.x.com/xdks/csharp/reference/clients/account-activity.md): 5 methods via `client.AccountActivity` +- [`ActivityClient` (Activity)](https://docs.x.com/xdks/csharp/reference/clients/activity.md): 5 methods via `client.Activity` +- [`ArticlesClient` (Articles)](https://docs.x.com/xdks/csharp/reference/clients/articles.md): 2 methods via `client.Articles` +- [`BotsClient` (Bots)](https://docs.x.com/xdks/csharp/reference/clients/bots.md): 6 methods via `client.Bots` +- [`BroadcastsClient` (Broadcasts)](https://docs.x.com/xdks/csharp/reference/clients/broadcasts.md): 41 methods via `client.Broadcasts` +- [`CallsClient` (Calls)](https://docs.x.com/xdks/csharp/reference/clients/calls.md): 10 methods via `client.Calls` +- [`ChatClient` (Chat)](https://docs.x.com/xdks/csharp/reference/clients/chat.md): 45 methods via `client.Chat` +- [`CommunitiesClient` (Communities)](https://docs.x.com/xdks/csharp/reference/clients/communities.md): 2 methods via `client.Communities` +- [`CommunityNotesClient` (Community Notes)](https://docs.x.com/xdks/csharp/reference/clients/community-notes.md): 5 methods via `client.CommunityNotes` +- [`ComplianceClient` (Compliance)](https://docs.x.com/xdks/csharp/reference/clients/compliance.md): 6 methods via `client.Compliance` +- [`ConnectionsClient` (Connections)](https://docs.x.com/xdks/csharp/reference/clients/connections.md): 4 methods via `client.Connections` +- [`DirectMessagesClient` (Direct Messages)](https://docs.x.com/xdks/csharp/reference/clients/direct-messages.md): 9 methods via `client.DirectMessages` +- [`GeneralClient` (General)](https://docs.x.com/xdks/csharp/reference/clients/general.md): 1 methods via `client.General` +- [`ListsClient` (Lists)](https://docs.x.com/xdks/csharp/reference/clients/lists.md): 9 methods via `client.Lists` +- [`MediaClient` (Media)](https://docs.x.com/xdks/csharp/reference/clients/media.md): 19 methods via `client.Media` +- [`NewsClient` (News)](https://docs.x.com/xdks/csharp/reference/clients/news.md): 2 methods via `client.News` +- [`PostsClient` (Posts)](https://docs.x.com/xdks/csharp/reference/clients/posts.md): 17 methods via `client.Posts` +- [`SpacesClient` (Spaces)](https://docs.x.com/xdks/csharp/reference/clients/spaces.md): 6 methods via `client.Spaces` +- [`StreamClient` (Stream)](https://docs.x.com/xdks/csharp/reference/clients/stream.md): 18 methods via `client.Stream` +- [`TrendsClient` (Trends)](https://docs.x.com/xdks/csharp/reference/clients/trends.md): 3 methods via `client.Trends` +- [`UsageClient` (Usage)](https://docs.x.com/xdks/csharp/reference/clients/usage.md): 2 methods via `client.Usage` +- [`UsersClient` (Users)](https://docs.x.com/xdks/csharp/reference/clients/users.md): 46 methods via `client.Users` +- [`WebhooksClient` (Webhooks)](https://docs.x.com/xdks/csharp/reference/clients/webhooks.md): 8 methods via `client.Webhooks` diff --git a/xdks/csharp/overview.mdx b/xdks/csharp/overview.mdx new file mode 100644 index 000000000..852ea6886 --- /dev/null +++ b/xdks/csharp/overview.mdx @@ -0,0 +1,70 @@ +--- +title: C# / .NET XDK +sidebarTitle: Overview +description: Official C# and .NET SDK (XDevPlatform.Xdk) for the X API v2 targeting .NET 8+ with zero external runtime dependencies, IAsyncEnumerable pagination, and EventStream. +--- + +The **C# / .NET XDK** (`XDevPlatform.Xdk`) is X's official .NET client library for the X API v2, generated directly from the [official OpenAPI specification](https://api.x.com/2/openapi.json) and published on NuGet. + + + + `dotnet add package XDevPlatform.Xdk` — .NET 8.0+. + + + Source code, runnable examples, and issue tracker. + + + +## Key Features + +- **Zero External Runtime Dependencies**: Built entirely on `System.Net.Http.HttpClient` and `System.Text.Json` for .NET 8+. +- **First-Class Async & Cancellation**: Every endpoint method is `async` (`*Async`), accepts a `CancellationToken`, and `XClient` implements `IDisposable`. +- **Authentication**: App-only Bearer Token, OAuth 2.0 User Context with PKCE (`OAuth2Pkce`) and token refresh, and OAuth 1.0a HMAC-SHA1 (`OAuth1`). +- **Async Pagination (`IAsyncEnumerable`)**: Paginated endpoints expose `*Pages(...)` returning `Paginator`, enabling native `await foreach` loops. +- **Resilient Streaming (`IAsyncDisposable`)**: Streaming endpoints return `EventStream` supporting `await using` and `await foreach` with incremental UTF-8 line decoding and exponential backoff reconnection. + +## Quick Example + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Clients; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Users.GetByUsernameAsync( + "XDevelopers", + new UsersClient.GetByUsernameOptions + { + UserFields = new List { "created_at", "public_metrics" }, + }); + +Console.WriteLine(response.Data); +``` + +## Guides & Reference + + + + Add `XDevPlatform.Xdk` via the .NET CLI or NuGet. + + + Make your first X API v2 request in C#. + + + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a setup. + + + Iterate pages lazily with `await foreach`. + + + Consume live NDJSON streams with `EventStream`. + + + Full method & parameter reference for all 24 clients. + + diff --git a/xdks/csharp/pagination.mdx b/xdks/csharp/pagination.mdx new file mode 100644 index 000000000..e0ba72caf --- /dev/null +++ b/xdks/csharp/pagination.mdx @@ -0,0 +1,61 @@ +--- +title: C# Pagination +sidebarTitle: Pagination +description: Automatically iterate paginated X API v2 endpoints in C# using IAsyncEnumerable and *Pages(...) methods. +--- + +Every paginated endpoint in the C# XDK exposes a companion `*Pages(...)` method returning `Paginator` (`IAsyncEnumerable`), which lazily fetches subsequent pages via `meta.next_token` as you iterate with `await foreach`. + +## Automatic Async Pagination (`*Pages`) + +```csharp +using System; +using System.Collections.Generic; +using System.Threading; +using Xdk; +using Xdk.Clients; + +using var cts = new CancellationTokenSource(); +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +int pageCount = 0; +await foreach (var page in client.Posts.SearchRecentPages( + "from:XDevelopers -is:retweet", + new PostsClient.SearchRecentOptions + { + MaxResults = 50, + PostFields = new List { "created_at", "public_metrics" }, + }).WithCancellation(cts.Token)) +{ + Console.WriteLine($"Fetched {page.Data?.Count ?? 0} posts"); + if (++pageCount >= 5) + { + break; // Stops immediately without issuing additional HTTP requests + } +} +``` + +## Manual Cursor Control + +If you need to persist pagination tokens across separate requests or background jobs, call the single-page `*Async` method with `PaginationToken`: + +```csharp +var firstPage = await client.Posts.SearchRecentAsync( + "from:XDevelopers", + new PostsClient.SearchRecentOptions { MaxResults = 25 }); + +string? nextToken = firstPage.Meta?.NextToken; +if (!string.IsNullOrEmpty(nextToken)) +{ + var secondPage = await client.Posts.SearchRecentAsync( + "from:XDevelopers", + new PostsClient.SearchRecentOptions + { + MaxResults = 25, + PaginationToken = nextToken, + }); +} +``` diff --git a/xdks/csharp/quickstart.mdx b/xdks/csharp/quickstart.mdx new file mode 100644 index 000000000..92f7f823f --- /dev/null +++ b/xdks/csharp/quickstart.mdx @@ -0,0 +1,58 @@ +--- +title: C# Quickstart +sidebarTitle: Quickstart +description: Make your first X API v2 request in C# (.NET 8+) using XDevPlatform.Xdk and a Bearer Token. +--- + +Make your first authenticated X API v2 call with `XDevPlatform.Xdk` in minutes. + + + +```bash +dotnet new console -n XdkQuickstart +cd XdkQuickstart +dotnet add package XDevPlatform.Xdk +``` + + + Generate a **Bearer Token** in the [X Developer Console](https://console.x.com) and export it in your shell: + +```bash +export X_BEARER_TOKEN="your_bearer_token_here" +``` + + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Clients; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var user = await client.Users.GetByUsernameAsync("XDevelopers"); +Console.WriteLine($"User: {user.Data}"); + +var posts = await client.Posts.SearchRecentAsync( + "from:XDevelopers -is:retweet", + new PostsClient.SearchRecentOptions + { + MaxResults = 10, + PostFields = new List { "created_at", "public_metrics" }, + }); +Console.WriteLine($"Posts returned: {posts.Data?.Count ?? 0}"); +``` + + Run your app with `dotnet run`. + + + +## Next Steps + +- [Authentication](/xdks/csharp/authentication) — Act on behalf of users with OAuth 2.0 PKCE or OAuth 1.0a +- [Pagination](/xdks/csharp/pagination) — Stream pages lazily with `await foreach` +- [Streaming](/xdks/csharp/streaming) — Subscribe to live streams with `EventStream` +- [Client Reference](/xdks/csharp/reference/overview) — Browse all 24 resource clients diff --git a/xdks/csharp/reference/clients/account-activity.mdx b/xdks/csharp/reference/clients/account-activity.mdx new file mode 100644 index 000000000..dc03d10fe --- /dev/null +++ b/xdks/csharp/reference/clients/account-activity.mdx @@ -0,0 +1,176 @@ +--- +title: "AccountActivityClient (C# XDK)" +sidebarTitle: "Account Activity" +description: "C# XDK AccountActivityClient reference — 5 methods for X API v2 Account Activity endpoints." +--- + +Access **Account Activity** endpoints via `client.AccountActivity` (`AccountActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateSubscriptionAsync`](#createsubscriptionasync) | `POST /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Create Subscription | +| [`DeleteSubscriptionAsync`](#deletesubscriptionasync) | `DELETE /2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` | Standard | Delete Subscription | +| [`GetSubscriptionCountAsync`](#getsubscriptioncountasync) | `GET /2/account_activity/subscriptions/count` | Standard | Get Subscription Count | +| [`GetSubscriptionsAsync`](#getsubscriptionsasync) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` | Standard | Get Subscriptions | +| [`ValidateSubscriptionAsync`](#validatesubscriptionasync) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Validate Subscription | + +## `CreateSubscriptionAsync` + +POST `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Create Subscription** + +Creates an Account Activity subscription for the user and the given webhook. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.AccountActivity.CreateSubscriptionAsync("1234567890", new CreateAccountActivitySubscriptionRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteSubscriptionAsync` + +DELETE `/2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` + +**Delete Subscription** + +Deletes an Account Activity subscription for the given webhook and user ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.AccountActivity.DeleteSubscriptionAsync("1234567890", "2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetSubscriptionCountAsync` + +GET `/2/account_activity/subscriptions/count` + +**Get Subscription Count** + +Retrieves a count of currently active Account Activity subscriptions. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.AccountActivity.GetSubscriptionCountAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `GetSubscriptionsAsync` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` + +**Get Subscriptions** + +Retrieves a list of all active subscriptions for a given webhook. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.AccountActivity.GetSubscriptionsAsync("1234567890"); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `ValidateSubscriptionAsync` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Validate Subscription** + +Checks a user's Account Activity subscription for a given webhook. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.AccountActivity.ValidateSubscriptionAsync("1234567890"); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/account.mdx b/xdks/csharp/reference/clients/account.mdx new file mode 100644 index 000000000..d194976e6 --- /dev/null +++ b/xdks/csharp/reference/clients/account.mdx @@ -0,0 +1,72 @@ +--- +title: "AccountClient (C# XDK)" +sidebarTitle: "Account" +description: "C# XDK AccountClient reference — 2 methods for X API v2 Account endpoints." +--- + +Access **Account** endpoints via `client.Account` (`AccountClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`EnsureAsync`](#ensureasync) | `POST /2/account` | Standard | Ensure Developer Account | +| [`GetDeveloperAsync`](#getdeveloperasync) | `GET /2/account` | Standard | Get Developer Account | + +## `EnsureAsync` + +POST `/2/account` + +**Ensure Developer Account** + +Creates an X Developer Platform account for the authenticated user if they do not already have one, and returns it. Idempotent: when the user already has an account it is returned unchanged with `created` false. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Account.EnsureAsync(new EnsureAccountRequest { Metadata = "example" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `GetDeveloperAsync` + +GET `/2/account` + +**Get Developer Account** + +Returns the X Developer Platform account that is billed for the authenticated user's API access. A user with no such account gets a resource-not-found error entry. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Account.GetDeveloperAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/activity.mdx b/xdks/csharp/reference/clients/activity.mdx new file mode 100644 index 000000000..56ebc60c2 --- /dev/null +++ b/xdks/csharp/reference/clients/activity.mdx @@ -0,0 +1,199 @@ +--- +title: "ActivityClient (C# XDK)" +sidebarTitle: "Activity" +description: "C# XDK ActivityClient reference — 5 methods for X API v2 Activity endpoints." +--- + +Access **Activity** endpoints via `client.Activity` (`ActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateSubscriptionAsync`](#createsubscriptionasync) | `POST /2/activity/subscriptions` | Standard | Create X Activity Subscription | +| [`DeleteSubscriptionAsync`](#deletesubscriptionasync) | `DELETE /2/activity/subscriptions/{subscription_id}` | Standard | Delete X Activity Subscription | +| [`DeleteSubscriptionsByIdsAsync`](#deletesubscriptionsbyidsasync) | `DELETE /2/activity/subscriptions` | Standard | Delete X Activity Subscriptions by IDs | +| [`GetSubscriptionsAsync`](#getsubscriptionsasync) | `GET /2/activity/subscriptions` | Paginated | Get X Activity Subscriptions | +| [`UpdateSubscriptionAsync`](#updatesubscriptionasync) | `PUT /2/activity/subscriptions/{subscription_id}` | Standard | Update X Activity Subscription | + +## `CreateSubscriptionAsync` + +POST `/2/activity/subscriptions` + +**Create X Activity Subscription** + +Creates a subscription for an X activity event. OAuth2 user-context tokens must hold the scope matching the requested event_type: dm.read for chat.* and dm.* events, like.read for like.* events, mute.read for mute.* events, block.read for block.* events, follows.read for subscriptions.* events, and tweet.read for all other event types. Mute and block subscriptions are actor-only: filter.user_id must identify the authenticated user and direction is not supported. subscriptions.* events require a user-context token and filter.user_id must identify the authenticated user. Optional filter.qualifiers further narrow supported chat, follow, unfollow, like, subscriptions, and trends events. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Activity.CreateSubscriptionAsync( + new CreateActivitySubscriptionRequest { EventType = "profile.update.bio" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteSubscriptionAsync` + +DELETE `/2/activity/subscriptions/{subscription_id}` + +**Delete X Activity Subscription** + +Deletes a subscription for an X activity event + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Activity.DeleteSubscriptionAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `subscription_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DeleteSubscriptionsByIdsAsync` + +DELETE `/2/activity/subscriptions` + +**Delete X Activity Subscriptions by IDs** + +Deletes multiple subscriptions for X activity events by their IDs + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Activity.DeleteSubscriptionsByIdsAsync(new List { "1895000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + `ids` (query parameter). + + +**Returns:** `Task` + +--- + +## `GetSubscriptionsAsync` + +GET `/2/activity/subscriptions` Paginated + +**Get X Activity Subscriptions** + +Get a list of active subscriptions for XAA. Optional user_id narrows the list to subscriptions whose filter.user_id matches; with a user-context token it must identify the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Activity.GetSubscriptionsPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 9 bytes. + + + + Only return subscriptions whose filter.user_id matches. + + + + +**Returns:** `Task` (use `GetSubscriptionsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `UpdateSubscriptionAsync` + +PUT `/2/activity/subscriptions/{subscription_id}` + +**Update X Activity Subscription** + +Updates a subscription for an X activity event + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Activity.UpdateSubscriptionAsync( + "1895000000000000000", + new UpdateActivitySubscriptionRequest { Tag = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `subscription_id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/articles.mdx b/xdks/csharp/reference/clients/articles.mdx new file mode 100644 index 000000000..7b0bb73f6 --- /dev/null +++ b/xdks/csharp/reference/clients/articles.mdx @@ -0,0 +1,78 @@ +--- +title: "ArticlesClient (C# XDK)" +sidebarTitle: "Articles" +description: "C# XDK ArticlesClient reference — 2 methods for X API v2 Articles endpoints." +--- + +Access **Articles** endpoints via `client.Articles` (`ArticlesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`ArticleCreateDraftAsync`](#articlecreatedraftasync) | `POST /2/articles/draft` | Standard | Create Draft Article | +| [`ArticlePublishAsync`](#articlepublishasync) | `POST /2/articles/{article_id}/publish` | Standard | Publish Article | + +## `ArticleCreateDraftAsync` + +POST `/2/articles/draft` + +**Create Draft Article** + +Creates a new Article draft that can later be published. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Articles.ArticleCreateDraftAsync(new ArticleCreateDraftRequest { Title = "example" }); +Console.WriteLine(response); +``` + +### Parameters + + + Create a draft Article. + + +**Returns:** `Task` + +--- + +## `ArticlePublishAsync` + +POST `/2/articles/{article_id}/publish` + +**Publish Article** + +Publishes a draft Article, making it publicly visible. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Articles.ArticlePublishAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `article_id` (path parameter). + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/bots.mdx b/xdks/csharp/reference/clients/bots.mdx new file mode 100644 index 000000000..d328c872a --- /dev/null +++ b/xdks/csharp/reference/clients/bots.mdx @@ -0,0 +1,232 @@ +--- +title: "BotsClient (C# XDK)" +sidebarTitle: "Bots" +description: "C# XDK BotsClient reference — 6 methods for X API v2 Bots endpoints." +--- + +Access **Bots** endpoints via `client.Bots` (`BotsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateBotAsync`](#createbotasync) | `POST /2/bots` | Standard | Create a Bot | +| [`DeleteBotAsync`](#deletebotasync) | `DELETE /2/bots/{id}` | Standard | Delete Bot | +| [`GetAsync`](#getasync) | `GET /2/bots` | Standard | Get Bots | +| [`RevokeBotTokenAsync`](#revokebottokenasync) | `DELETE /2/bots/{id}/token` | Standard | Revoke Bot Token | +| [`RotateBotTokenAsync`](#rotatebottokenasync) | `POST /2/bots/{id}/token` | Standard | Rotate Bot Token | +| [`UpdateBotAsync`](#updatebotasync) | `PUT /2/bots/{id}` | Standard | Update Bot | + +## `CreateBotAsync` + +POST `/2/bots` + +**Create a Bot** + +Creates a bot account in the calling app's project and returns its bearer token. Idempotent on handle: repeating the request for a handle that already names one of the project's bots returns that bot with a freshly minted token, revoking the previous one — safe to retry when a response was lost, since the replaced token was never seen. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is created in the user's project instead; its token is still minted for the calling app. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Bots.CreateBotAsync(new CreateBotRequest { Handle = "example" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteBotAsync` + +DELETE `/2/bots/{id}` + +**Delete Bot** + +Deletes a bot account from the calling app's project. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is deleted from the user's project instead. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Bots.DeleteBotAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetAsync` + +GET `/2/bots` + +**Get Bots** + +Retrieves the bot accounts in the calling app's project. meta.max_bots is the most bots the project can have. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Bots.GetAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` + +--- + +## `RevokeBotTokenAsync` + +DELETE `/2/bots/{id}/token` + +**Revoke Bot Token** + +Revokes a bot's bearer token. The bot account is kept, and rotating its token mints a new one. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Bots.RevokeBotTokenAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `RotateBotTokenAsync` + +POST `/2/bots/{id}/token` + +**Rotate Bot Token** + +Mints a new bearer token for a bot and invalidates every token previously issued for it. The new token is returned only once. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Bots.RotateBotTokenAsync( + "1895000000000000000", + new RotateBotTokenRequest { Scopes = new List { "example" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateBotAsync` + +PUT `/2/bots/{id}` + +**Update Bot** + +Updates a bot's handle, display name, or who may send it Direct Messages. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Bots.UpdateBotAsync("1895000000000000000", new UpdateBotRequest { Handle = "example" }); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/broadcasts.mdx b/xdks/csharp/reference/clients/broadcasts.mdx new file mode 100644 index 000000000..ae108470f --- /dev/null +++ b/xdks/csharp/reference/clients/broadcasts.mdx @@ -0,0 +1,1554 @@ +--- +title: "BroadcastsClient (C# XDK)" +sidebarTitle: "Broadcasts" +description: "C# XDK BroadcastsClient reference — 41 methods for X API v2 Broadcasts endpoints." +--- + +Access **Broadcasts** endpoints via `client.Broadcasts` (`BroadcastsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`AddChatModeratorAsync`](#addchatmoderatorasync) | `POST /2/broadcasts/chat/moderators` | Standard | Add a Chat Moderator | +| [`CreateBroadcastAsync`](#createbroadcastasync) | `POST /2/broadcasts` | Standard | Go Live on a Source | +| [`CreateScheduledBroadcastAsync`](#createscheduledbroadcastasync) | `POST /2/broadcasts/scheduled` | Standard | Create a Scheduled Broadcast | +| [`CreateSourceAsync`](#createsourceasync) | `POST /2/sources` | Standard | Create a Stream Source | +| [`CreateUserBroadcastAsync`](#createuserbroadcastasync) | `POST /2/users/{id}/broadcasts` | Standard | Create a Broadcast on a User's Source | +| [`CreateUserSourceAsync`](#createusersourceasync) | `POST /2/users/{id}/sources` | Standard | Create a Stream Source for a User | +| [`DeleteBroadcastAsync`](#deletebroadcastasync) | `DELETE /2/broadcasts/{id}` | Standard | Delete a Broadcast | +| [`DeleteBroadcastChatMessageAsync`](#deletebroadcastchatmessageasync) | `DELETE /2/broadcasts/{id}/chat/{message_id}` | Standard | Remove a Chat Message from a Live Broadcast | +| [`DeleteScheduledBroadcastAsync`](#deletescheduledbroadcastasync) | `DELETE /2/broadcasts/scheduled/{id}` | Standard | Delete a Scheduled Broadcast | +| [`DeleteSourceAsync`](#deletesourceasync) | `DELETE /2/sources/{id}` | Standard | Delete a Stream Source | +| [`DeleteUserBroadcastAsync`](#deleteuserbroadcastasync) | `DELETE /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Delete a User's Broadcast | +| [`DeleteUserSourceAsync`](#deleteusersourceasync) | `DELETE /2/users/{id}/sources/{source_id}` | Standard | Delete a User's Stream Source | +| [`GetBroadcastAsync`](#getbroadcastasync) | `GET /2/broadcasts/{id}` | Standard | Get a Broadcast | +| [`GetBroadcastChatAsync`](#getbroadcastchatasync) | `GET /2/broadcasts/{id}/chat` | Paginated | Get Broadcast Chat History | +| [`GetChatModeratorsAsync`](#getchatmoderatorsasync) | `GET /2/broadcasts/chat/moderators` | Standard | Get Chat Moderators | +| [`GetChatMutedUsersAsync`](#getchatmutedusersasync) | `GET /2/broadcasts/chat/mutes` | Paginated | Get Muted Chat Users | +| [`GetRegionAsync`](#getregionasync) | `GET /2/region` | Standard | Get the Ingest Region | +| [`GetScheduledBroadcastAsync`](#getscheduledbroadcastasync) | `GET /2/broadcasts/scheduled/{id}` | Standard | Get a Scheduled Broadcast | +| [`GetSourceAsync`](#getsourceasync) | `GET /2/sources/{id}` | Standard | Get a Stream Source | +| [`GetSourceStreamKeyAsync`](#getsourcestreamkeyasync) | `GET /2/sources/{id}/stream_key` | Standard | Get a Stream Source's Stream Key | +| [`GetUserBroadcastAsync`](#getuserbroadcastasync) | `GET /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Get a User's Broadcast | +| [`GetUserSourceAsync`](#getusersourceasync) | `GET /2/users/{id}/sources/{source_id}` | Standard | Get a User's Stream Source | +| [`GoLiveScheduledBroadcastAsync`](#golivescheduledbroadcastasync) | `POST /2/broadcasts/scheduled/{id}/live` | Standard | Go Live on a Scheduled Broadcast | +| [`ListAsync`](#listasync) | `GET /2/broadcasts` | Paginated | List Broadcasts | +| [`ListLiveCategoriesAsync`](#listlivecategoriesasync) | `GET /2/broadcasts/categories` | Standard | List Live Categories | +| [`ListScheduledAsync`](#listscheduledasync) | `GET /2/broadcasts/scheduled` | Paginated | List Scheduled Broadcasts | +| [`ListSourcesAsync`](#listsourcesasync) | `GET /2/sources` | Standard | List Stream Sources | +| [`ListUserAsync`](#listuserasync) | `GET /2/users/{id}/broadcasts` | Paginated | List a User's Broadcasts | +| [`ListUserSourcesAsync`](#listusersourcesasync) | `GET /2/users/{id}/sources` | Standard | List a User's Stream Sources | +| [`MuteBroadcastChatUserAsync`](#mutebroadcastchatuserasync) | `POST /2/broadcasts/{id}/chat/mutes` | Standard | Mute or Time Out a User in a Broadcast Chat | +| [`MuteChatUserAsync`](#mutechatuserasync) | `POST /2/broadcasts/chat/mutes` | Standard | Mute or Time Out a User in Chat | +| [`RemoveChatModeratorAsync`](#removechatmoderatorasync) | `DELETE /2/broadcasts/chat/moderators/{user_id}` | Standard | Remove a Chat Moderator | +| [`SendBroadcastChatAsync`](#sendbroadcastchatasync) | `POST /2/broadcasts/{id}/chat` | Standard | Send a Chat Message to a Live Broadcast | +| [`UnmuteBroadcastChatUserAsync`](#unmutebroadcastchatuserasync) | `DELETE /2/broadcasts/{id}/chat/mutes/{user_id}` | Standard | Unmute a User in a Broadcast Chat | +| [`UnmuteChatUserAsync`](#unmutechatuserasync) | `DELETE /2/broadcasts/chat/mutes/{user_id}` | Standard | Unmute a User in Chat | +| [`UpdateBroadcastAsync`](#updatebroadcastasync) | `PUT /2/broadcasts/{id}` | Standard | Update a Broadcast | +| [`UpdateBroadcastStateAsync`](#updatebroadcaststateasync) | `PUT /2/broadcasts/{id}/state` | Standard | End a Broadcast | +| [`UpdateScheduledBroadcastAsync`](#updatescheduledbroadcastasync) | `PUT /2/broadcasts/scheduled/{id}` | Standard | Update a Scheduled Broadcast | +| [`UpdateSourceAsync`](#updatesourceasync) | `PUT /2/sources/{id}` | Standard | Rename a Stream Source | +| [`UpdateUserBroadcastStateAsync`](#updateuserbroadcaststateasync) | `PUT /2/users/{id}/broadcasts/{broadcast_id}/state` | Standard | Publish or End a User's Broadcast | +| [`UpdateUserSourceAsync`](#updateusersourceasync) | `PUT /2/users/{id}/sources/{source_id}` | Standard | Rename a User's Stream Source | + +## `AddChatModeratorAsync` + +POST `/2/broadcasts/chat/moderators` + +**Add a Chat Moderator** + +Adds a moderator to the authenticated broadcaster's persistent list and returns the updated moderator user IDs. The list applies to all current and future broadcast chats. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.AddChatModeratorAsync(new AddChatModeratorRequest { UserId = "2244994945" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateBroadcastAsync` + +POST `/2/broadcasts` + +**Go Live on a Source** + +Takes one or more of the authenticated user's sources live and returns 201 with the new broadcast. Several sources (`source_id` plus `additional_source_ids`, one per video format) go live together as one broadcast; they must all be RTMP sources in one region, and when one of them is already live its broadcast is returned only if it holds every listed source. The broadcast goes live immediately (state `RUNNING`), even before the encoder sends video, and is ended (`TIMED_OUT`) if no video arrives within 5 minutes. It is announced in a Post unless `should_not_tweet` is true. When the source already has a live broadcast, returns 200 with that broadcast unchanged and ignores the request's `title`, `locale`, `chat_option` and `should_not_tweet`. A missing `tweet_id` means the Post hasn't been created yet, was suppressed with `should_not_tweet`, or could not be created; read it later with GET /2/broadcasts/:id. A 409 `conflict` means the source can't go live right now: either it can't take video before the encoder connects (external HLS sources, or regions where this isn't available), so retry once video is flowing, or another broadcast is live on it, so END that broadcast first. The `detail` says which, and names the live broadcast when known. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.CreateBroadcastAsync(new CreateBroadcastRequest { SourceId = "1895000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateScheduledBroadcastAsync` + +POST `/2/broadcasts/scheduled` + +**Create a Scheduled Broadcast** + +Schedules a broadcast for the authenticated user on one of their sources: `source_id` is required. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.CreateScheduledBroadcastAsync( + new CreateScheduledBroadcastRequest { SourceId = "1895000000000000000", ScheduledStartMs = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateSourceAsync` + +POST `/2/sources` + +**Create a Stream Source** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. Push an encoder to `rtmps_url` with the returned `stream_key`. This is the only response that includes the stream key; read it later with GET /2/sources/:id/stream_key. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.CreateSourceAsync(new CreateSourceRequest { Name = "My List", Region = "example" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateUserBroadcastAsync` + +POST `/2/users/{id}/broadcasts` + +**Create a Broadcast on a User's Source** + +Creates a broadcast on one of the authenticated user's sources. `id` must be the authenticated user. The broadcast is `NOT_STARTED` and posts nothing until it is published with PUT /2/users/:id/broadcasts/:broadcast_id/state; one that is never published is deleted after 7 days. When the source already has a running broadcast, that broadcast is returned. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.CreateUserBroadcastAsync( + "2244994945", + new CreateUserBroadcastRequest { SourceId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateUserSourceAsync` + +POST `/2/users/{id}/sources` + +**Create a Stream Source for a User** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. `id` must be the authenticated user. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.CreateUserSourceAsync("2244994945", new CreateUserSourceRequest { Name = "My List" }); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteBroadcastAsync` + +DELETE `/2/broadcasts/{id}` + +**Delete a Broadcast** + +Deletes one of the authenticated user's broadcasts, scheduled or ended, including its replay. A running broadcast must be ended first. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.DeleteBroadcastAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DeleteBroadcastChatMessageAsync` + +DELETE `/2/broadcasts/{id}/chat/{message_id}` + +**Remove a Chat Message from a Live Broadcast** + +Removes a specific chat message from a running broadcast where the authenticated user is the host or a moderator. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.DeleteBroadcastChatMessageAsync("1895000000000000000", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `message_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DeleteScheduledBroadcastAsync` + +DELETE `/2/broadcasts/scheduled/{id}` + +**Delete a Scheduled Broadcast** + +Deletes a scheduled broadcast by its alphanumeric broadcast id. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.DeleteScheduledBroadcastAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + Deprecated: recurring schedules are being retired and `true` will be rejected. + + + + +**Returns:** `Task` + +--- + +## `DeleteSourceAsync` + +DELETE `/2/sources/{id}` + +**Delete a Stream Source** + +Deletes one of the authenticated user's stream sources. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.DeleteSourceAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Task` + +--- + +## `DeleteUserBroadcastAsync` + +DELETE `/2/users/{id}/broadcasts/{broadcast_id}` + +**Delete a User's Broadcast** + +Deletes one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use DELETE /2/broadcasts/:id. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.DeleteUserBroadcastAsync("2244994945", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DeleteUserSourceAsync` + +DELETE `/2/users/{id}/sources/{source_id}` + +**Delete a User's Stream Source** + +Deletes one of the authenticated user's stream sources. `id` must be the authenticated user. Success is an empty object. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.DeleteUserSourceAsync("2244994945", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetBroadcastAsync` + +GET `/2/broadcasts/{id}` + +**Get a Broadcast** + +Returns a broadcast owned by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetBroadcastAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetBroadcastChatAsync` + +GET `/2/broadcasts/{id}/chat` Paginated + +**Get Broadcast Chat History** + +Returns newest-first chat messages for a broadcast owned by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Broadcasts.GetBroadcastChatPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of BroadcastChatMessage fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` (use `GetBroadcastChatPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetChatModeratorsAsync` + +GET `/2/broadcasts/chat/moderators` + +**Get Chat Moderators** + +Returns the authenticated broadcaster's persistent moderators as User resources. The list applies to all of their current and future broadcast chats. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetChatModeratorsAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetChatMutedUsersAsync` + +GET `/2/broadcasts/chat/mutes` Paginated + +**Get Muted Chat Users** + +Returns the users muted in the authenticated broadcaster's chat, with the expiry time of timed mutes. Mutes apply to all of their broadcasts. Expired timed mutes are omitted. Use `expansions=user_id` to include the muted users. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Broadcasts.GetChatMutedUsersPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of BroadcastChatMute fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` (use `GetChatMutedUsersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetRegionAsync` + +GET `/2/region` + +**Get the Ingest Region** + +Returns the ingest region nearest the server handling the request. Pass it as `region` when creating a stream source to ingest there. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetRegionAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `GetScheduledBroadcastAsync` + +GET `/2/broadcasts/scheduled/{id}` + +**Get a Scheduled Broadcast** + +Returns a single scheduled broadcast by its alphanumeric broadcast id. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetScheduledBroadcastAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetSourceAsync` + +GET `/2/sources/{id}` + +**Get a Stream Source** + +Returns one of the authenticated user's stream sources. Poll it after starting an encoder and wait for `is_stream_active` before going live. The stream key is not included; read it with GET /2/sources/:id/stream_key. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetSourceAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Task` + +--- + +## `GetSourceStreamKeyAsync` + +GET `/2/sources/{id}/stream_key` + +**Get a Stream Source's Stream Key** + +Returns the stream key of one of the authenticated user's stream sources. The stream key is a credential: anyone with it can stream to the source, so keep it out of logs, URLs and client-side code. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetSourceStreamKeyAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Task` + +--- + +## `GetUserBroadcastAsync` + +GET `/2/users/{id}/broadcasts/{broadcast_id}` + +**Get a User's Broadcast** + +Returns one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts/:id. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetUserBroadcastAsync("2244994945", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetUserSourceAsync` + +GET `/2/users/{id}/sources/{source_id}` + +**Get a User's Stream Source** + +Returns one of the authenticated user's stream sources. `id` must be the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GetUserSourceAsync("2244994945", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GoLiveScheduledBroadcastAsync` + +POST `/2/broadcasts/scheduled/{id}/live` + +**Go Live on a Scheduled Broadcast** + +Publishes a schedule that was created or updated with `manual_publish: true`. Without that flag the coordinator auto-publishes at start and this call is rejected. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.GoLiveScheduledBroadcastAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `ListAsync` + +GET `/2/broadcasts` Paginated + +**List Broadcasts** + +Returns the authenticated user's live-video broadcasts, or selected owned broadcasts when ids are provided. + +At most one of `ids`, `max_results` may be provided. At most one of `ids`, `pagination_token` may be provided. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Broadcasts.ListPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + Comma-separated broadcast IDs to retrieve instead of listing broadcasts. + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `Task` (use `ListPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `ListLiveCategoriesAsync` + +GET `/2/broadcasts/categories` + +**List Live Categories** + +Returns the live categories a host can pick when going live, in display order. Pass a category's `id` as `live_category_id` on POST /2/broadcasts. Ids are permanent; names can change, so store the id and show the current name. The whole list is returned in one response, without paging. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Broadcasts.ListLiveCategoriesAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `ListScheduledAsync` + +GET `/2/broadcasts/scheduled` Paginated + +**List Scheduled Broadcasts** + +Returns scheduled broadcasts owned by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Broadcasts.ListScheduledPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `oldest_start_time` (query parameter). + + + + `newest_start_time` (query parameter). + + + + `pagination_token` (query parameter). + + + + +**Returns:** `Task` (use `ListScheduledPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `ListSourcesAsync` + +GET `/2/sources` + +**List Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources. A source's `id` is the `source_id` that POST /2/broadcasts and scheduled broadcasts take. Stream keys are not included; read one with GET /2/sources/:id/stream_key. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.ListSourcesAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `ListUserAsync` + +GET `/2/users/{id}/broadcasts` Paginated + +**List a User's Broadcasts** + +Returns the authenticated user's broadcasts, 100 per page. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Broadcasts.ListUserPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `next_token.offset` from the previous page. Empty reads the first page. + + + + +**Returns:** `Task` (use `ListUserPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `ListUserSourcesAsync` + +GET `/2/users/{id}/sources` + +**List a User's Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources (empty array if none). `id` must be the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.ListUserSourcesAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `MuteBroadcastChatUserAsync` + +POST `/2/broadcasts/{id}/chat/mutes` + +**Mute or Time Out a User in a Broadcast Chat** + +Prevents a user from posting further messages in a running broadcast chat. When `end_at_ms` is provided, the mute expires at that time. The authenticated user must be the broadcast host or a moderator. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.MuteBroadcastChatUserAsync( + "1895000000000000000", + new MuteBroadcastChatUserRequest { UserId = "2244994945" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `MuteChatUserAsync` + +POST `/2/broadcasts/chat/mutes` + +**Mute or Time Out a User in Chat** + +Prevents a user from posting messages in all of a broadcaster's chats. Without `broadcast_id`, the user is muted in the authenticated user's own chats. Moderators pass `broadcast_id` to mute the user in that broadcast host's chats. When `end_at_ms` is provided, the mute expires at that time. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.MuteChatUserAsync(new MuteChatUserRequest { UserId = "2244994945" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `RemoveChatModeratorAsync` + +DELETE `/2/broadcasts/chat/moderators/{user_id}` + +**Remove a Chat Moderator** + +Removes a moderator from the authenticated broadcaster's persistent list and returns the updated moderator user IDs. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.RemoveChatModeratorAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + A 64-bit signed integer. + + +**Returns:** `Task` + +--- + +## `SendBroadcastChatAsync` + +POST `/2/broadcasts/{id}/chat` + +**Send a Chat Message to a Live Broadcast** + +Posts a chat message to a running broadcast, attributed to the authenticated user. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.SendBroadcastChatAsync( + "1895000000000000000", + new SendBroadcastChatRequest { Text = "Hello from XDK!" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UnmuteBroadcastChatUserAsync` + +DELETE `/2/broadcasts/{id}/chat/mutes/{user_id}` + +**Unmute a User in a Broadcast Chat** + +Allows a muted user to post messages in a running broadcast chat again. The authenticated user must be the broadcast host or a moderator. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UnmuteBroadcastChatUserAsync("1895000000000000000", "2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + A 64-bit signed integer. + + +**Returns:** `Task` + +--- + +## `UnmuteChatUserAsync` + +DELETE `/2/broadcasts/chat/mutes/{user_id}` + +**Unmute a User in Chat** + +Allows a muted user to post messages in a broadcaster's chats again. Without `broadcast_id`, the user is unmuted in the authenticated user's own chats. Moderators pass `broadcast_id` to unmute the user in that broadcast host's chats. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UnmuteChatUserAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + A 64-bit signed integer. + + + + + + A broadcast whose host's chats the user is unmuted in. + + + + +**Returns:** `Task` + +--- + +## `UpdateBroadcastAsync` + +PUT `/2/broadcasts/{id}` + +**Update a Broadcast** + +Changes the title, chat option or live category of one of the authenticated user's broadcasts and returns the broadcast. Send at least one of `title`, `chat_option` and `live_category_id`; fields left out keep their values. A broadcast can be updated before it starts, while it is live and after it has ended. A 409 `conflict` means the broadcast can't be edited, for example because it was deleted or moderated. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UpdateBroadcastAsync( + "1895000000000000000", + new UpdateBroadcastRequest { LiveCategoryId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateBroadcastStateAsync` + +PUT `/2/broadcasts/{id}/state` + +**End a Broadcast** + +Ends one of the authenticated user's broadcasts. Only `state: END` is supported. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UpdateBroadcastStateAsync( + "1895000000000000000", + new UpdateBroadcastStateRequest { State = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateScheduledBroadcastAsync` + +PUT `/2/broadcasts/scheduled/{id}` + +**Update a Scheduled Broadcast** + +Updates a scheduled broadcast. Path `:id` is the broadcast id; the body must include `scheduled_broadcast_id`. Re-send every field that should be kept. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UpdateScheduledBroadcastAsync( + "1895000000000000000", + new UpdateScheduledBroadcastRequest { ScheduledBroadcastId = "1895000000000000000", ScheduledStartMs = "example", ScheduledEndMs = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateSourceAsync` + +PUT `/2/sources/{id}` + +**Rename a Stream Source** + +Renames one of the authenticated user's stream sources. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UpdateSourceAsync("1895000000000000000", new UpdateSourceRequest { Name = "My List" }); +Console.WriteLine(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateUserBroadcastStateAsync` + +PUT `/2/users/{id}/broadcasts/{broadcast_id}/state` + +**Publish or End a User's Broadcast** + +Publishes or ends one of the authenticated user's broadcasts. `id` must be the authenticated user. `PUBLISH` takes a broadcast created with POST /2/users/:id/broadcasts live once its source is receiving video, and posts it unless `should_not_tweet` is true. `END` ends the broadcast. Deprecated: use PUT /2/broadcasts/:id/state to end a broadcast. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UpdateUserBroadcastStateAsync( + "2244994945", + "1895000000000000000", + new UpdateUserBroadcastStateRequest { State = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateUserSourceAsync` + +PUT `/2/users/{id}/sources/{source_id}` + +**Rename a User's Stream Source** + +Renames one of the authenticated user's stream sources. `id` must be the authenticated user. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Broadcasts.UpdateUserSourceAsync( + "2244994945", + "1895000000000000000", + new UpdateUserSourceRequest { Name = "My List" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/calls.mdx b/xdks/csharp/reference/clients/calls.mdx new file mode 100644 index 000000000..555b00f0b --- /dev/null +++ b/xdks/csharp/reference/clients/calls.mdx @@ -0,0 +1,438 @@ +--- +title: "CallsClient (C# XDK)" +sidebarTitle: "Calls" +description: "C# XDK CallsClient reference — 10 methods for X API v2 Calls endpoints." +--- + +Access **Calls** endpoints via `client.Calls` (`CallsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CancelScheduledCallAsync`](#cancelscheduledcallasync) | `DELETE /2/calls/scheduled/{id}` | Standard | Cancel a Scheduled Call | +| [`CreateCallAsync`](#createcallasync) | `POST /2/calls` | Standard | Create a Call | +| [`GetCallAsync`](#getcallasync) | `GET /2/calls/{id}` | Standard | Get a Call | +| [`GetScheduledCallAsync`](#getscheduledcallasync) | `GET /2/calls/scheduled/{id}` | Standard | Get a Scheduled Call | +| [`JoinCallAsync`](#joincallasync) | `POST /2/calls/{id}/join` | Standard | Join a Call | +| [`LeaveCallAsync`](#leavecallasync) | `POST /2/calls/{id}/leave` | Standard | Leave a Call | +| [`ListScheduledAsync`](#listscheduledasync) | `GET /2/calls/scheduled` | Standard | List Scheduled Calls | +| [`RespondToScheduledCallAsync`](#respondtoscheduledcallasync) | `POST /2/calls/scheduled/{id}/rsvp` | Standard | Respond to a Scheduled Call | +| [`ScheduleCallAsync`](#schedulecallasync) | `POST /2/calls/scheduled` | Standard | Schedule a Call | +| [`UpdateScheduledCallAsync`](#updatescheduledcallasync) | `PUT /2/calls/scheduled/{id}` | Standard | Update a Scheduled Call | + +## `CancelScheduledCallAsync` + +DELETE `/2/calls/scheduled/{id}` + +**Cancel a Scheduled Call** + +Cancels a scheduled call the authenticated user organizes, and takes it off invitees' calendars. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. Cancelling what is already cancelled succeeds. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.CancelScheduledCallAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + Which occurrences: all (the default without occurrence_start_time), this (the default with it), or this_and_following. + + + + Start of the occurrence that scope this or this_and_following refers to (RFC 3339). + + + + Whether invitees get an email about it. Defaults to true. + + + + +**Returns:** `Task` + +--- + +## `CreateCallAsync` + +POST `/2/calls` + +**Create a Call** + +Starts an X call hosted by the authenticated user (typically a bot). Pass an XChat conversation_id to start the call in that conversation, or omit it for a standalone call anyone can join with the returned join_url (subject to join_policy). The call starts empty: put an agent in it with POST /2/calls/:id/join. When the host joins a conversation call, the other members are rung. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.CreateCallAsync(new CreateCallRequest { ConversationId = "1500000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `GetCallAsync` + +GET `/2/calls/{id}` + +**Get a Call** + +Returns a call's title, join policy, host and participant count, and whether the authenticated user may join it without asking the host. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.GetCallAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Call fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetScheduledCallAsync` + +GET `/2/calls/scheduled/{id}` + +**Get a Scheduled Call** + +Returns a scheduled call the authenticated user organizes or is invited to, at its occurrence running now or its next one within a year: its time, call, recurrence and who is invited and how they answered. Changes can take a few seconds to show here. Use scheduled_call.fields to select which fields are returned. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.GetScheduledCallAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ScheduledCall fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Call fields to display. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` + +--- + +## `JoinCallAsync` + +POST `/2/calls/{id}/join` + +**Join a Call** + +Starts a media session that takes part in the call as the authenticated user. The response carries a media_url and a short-lived media_token: open a WebSocket to media_url with the token as a Bearer credential to exchange PCM16 audio and events with the call; the user enters the call when the WebSocket connects. On a closed or trusted call the session asks the host first (admission: requires_approval). + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.JoinCallAsync("1895000000000000000", new JoinCallRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `LeaveCallAsync` + +POST `/2/calls/{id}/leave` + +**Leave a Call** + +Ends the authenticated user's media session in the call (its WebSocket receives session.ended with reason left) and removes the user from the call. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.LeaveCallAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `ListScheduledAsync` + +GET `/2/calls/scheduled` + +**List Scheduled Calls** + +Returns the X calls on the authenticated user's calendar, earliest first: events on their X Calls calendar, and events on the Microsoft Outlook calendars they linked to X whose conference is an X call. Calls still running at start_time are included. The window defaults to the next 24 hours and may span at most 7 days. Use scheduled_call.fields to select which fields are returned. + +When both are provided, `start_time` must be earlier than `end_time`. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.ListScheduledAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + Calls still running at this time or starting after it (RFC 3339). Defaults to now. + + + + Calls starting before this time (RFC 3339). Defaults to 24 hours after start_time. + + + + The most calls to return. Defaults to 20. + + + + A comma separated list of ScheduledCall fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Call fields to display. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` + +--- + +## `RespondToScheduledCallAsync` + +POST `/2/calls/scheduled/{id}/rsvp` + +**Respond to a Scheduled Call** + +Accepts, declines or tentatively accepts an invitation to a scheduled call for the authenticated user. For a recurring call, scope and occurrence_start_time pick the occurrences the answer is for: all of them (the default), one, or one and every one after it. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.RespondToScheduledCallAsync( + "1895000000000000000", + new RespondToScheduledCallRequest { Response = "accepted" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `ScheduleCallAsync` + +POST `/2/calls/scheduled` + +**Schedule a Call** + +Puts an X call on the authenticated user's X Calls calendar, with them as its organizer, and invites people to it. The call exists right away: share its join_url, or put an agent in it at start time with POST /2/calls/:id/join. A recurrence (an RFC 5545 RRULE) repeats it. Invitees get an email unless notify_invitees is false. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.ScheduleCallAsync(new ScheduleCallRequest { StartTime = "2026-01-01T00:00:00Z" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateScheduledCallAsync` + +PUT `/2/calls/scheduled/{id}` + +**Update a Scheduled Call** + +Moves, renames or re-invites a scheduled call the authenticated user organizes. Only the fields sent change. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Calls.UpdateScheduledCallAsync( + "1895000000000000000", + new UpdateScheduledCallRequest { OccurrenceStartTime = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + At least one of `start_time`, `duration_minutes`, `title`, `description`, `invitee_ids`, `recurrence`, `time_zone` is required. + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/chat.mdx b/xdks/csharp/reference/clients/chat.mdx new file mode 100644 index 000000000..7dd7bcf5b --- /dev/null +++ b/xdks/csharp/reference/clients/chat.mdx @@ -0,0 +1,1844 @@ +--- +title: "ChatClient (C# XDK)" +sidebarTitle: "Chat" +description: "C# XDK ChatClient reference — 45 methods for X API v2 Chat endpoints." +--- + +Access **Chat** endpoints via `client.Chat` (`ChatClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`AcceptMessageRequestAsync`](#acceptmessagerequestasync) | `POST /2/chat/message_requests/{id}/accept` | Standard | Accept a Chat Message Request | +| [`AddConversationKeysAsync`](#addconversationkeysasync) | `POST /2/chat/conversations/{id}/keys` | Standard | Add Conversation Keys | +| [`AddGroupAdminsAsync`](#addgroupadminsasync) | `POST /2/chat/conversations/{id}/admins` | Standard | Add Admins to a Chat Group Conversation | +| [`AddGroupMembersAsync`](#addgroupmembersasync) | `POST /2/chat/conversations/{id}/members` | Standard | Add Members to a Chat Group Conversation | +| [`AddUserPublicKeyAsync`](#adduserpublickeyasync) | `POST /2/users/{id}/public_keys` | Standard | Add Public Key | +| [`ApproveGroupAdminRequestAsync`](#approvegroupadminrequestasync) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/approve` | Standard | Approve an Admin Request in a Chat Group Conversation | +| [`ArchiveConversationAsync`](#archiveconversationasync) | `POST /2/chat/conversations/{id}/archive` | Standard | Archive a Chat Conversation | +| [`CreateConversationAsync`](#createconversationasync) | `POST /2/chat/conversations/group` | Standard | Create Chat Group Conversation | +| [`CreateGroupAdminRequestAsync`](#creategroupadminrequestasync) | `POST /2/chat/conversations/{id}/admin_requests` | Standard | Request Admin Permissions in a Chat Group Conversation | +| [`CreateGroupJoinRequestAsync`](#creategroupjoinrequestasync) | `POST /2/chat/conversations/{id}/join_requests` | Standard | Request to Join a Chat Group | +| [`DeleteConversationAsync`](#deleteconversationasync) | `DELETE /2/chat/conversations/{id}` | Standard | Delete a Chat Conversation | +| [`DeleteConversationMessageTtlAsync`](#deleteconversationmessagettlasync) | `DELETE /2/chat/conversations/{id}/message_ttl` | Standard | Turn Off Disappearing Messages in a Chat Conversation | +| [`DeleteMessagesAsync`](#deletemessagesasync) | `POST /2/chat/conversations/{id}/messages/delete` | Standard | Delete Chat Messages | +| [`DisableGroupInviteAsync`](#disablegroupinviteasync) | `DELETE /2/chat/conversations/{id}/invite` | Standard | Disable a Chat Group Invite Link | +| [`EnableGroupInviteAsync`](#enablegroupinviteasync) | `POST /2/chat/conversations/{id}/invite` | Standard | Enable a Chat Group Invite Link | +| [`GetConversationAsync`](#getconversationasync) | `GET /2/chat/conversations/{id}` | Standard | Get Chat Conversation | +| [`GetConversationEventsAsync`](#getconversationeventsasync) | `GET /2/chat/conversations/{id}/events` | Paginated | Get Chat Conversation Events | +| [`GetConversationPinnedMessagesAsync`](#getconversationpinnedmessagesasync) | `GET /2/chat/conversations/{id}/pinned_messages` | Paginated | Get Chat Conversation Pinned Messages | +| [`GetConversationsAsync`](#getconversationsasync) | `GET /2/chat/conversations` | Paginated | Get Chat Conversations | +| [`GetGroupAdminRequestsAsync`](#getgroupadminrequestsasync) | `GET /2/chat/conversations/{id}/admin_requests` | Paginated | Get Pending Admin Requests for a Chat Group Conversation | +| [`GetGroupInviteAsync`](#getgroupinviteasync) | `GET /2/chat/conversations/{id}/invites/{token}` | Standard | Get a Chat Group Invite Link | +| [`GetMessageRequestAsync`](#getmessagerequestasync) | `GET /2/chat/message_requests/{id}` | Standard | Get Chat Message Request | +| [`GetMessageRequestsAsync`](#getmessagerequestsasync) | `GET /2/chat/message_requests` | Paginated | Get Chat Message Requests | +| [`GetSettingsAsync`](#getsettingsasync) | `GET /2/chat/settings` | Standard | Get Chat Settings | +| [`InitializeGroupAsync`](#initializegroupasync) | `POST /2/chat/conversations/group/initialize` | Standard | Initialize Chat Group | +| [`MarkConversationReadAsync`](#markconversationreadasync) | `POST /2/chat/conversations/{id}/read` | Standard | Mark Conversation as Read | +| [`MarkConversationUnreadAsync`](#markconversationunreadasync) | `POST /2/chat/conversations/{id}/unread` | Standard | Mark Conversation as Unread | +| [`MediaDownloadAsync`](#mediadownloadasync) | `GET /2/chat/media/{id}/{media_hash_key}` | Standard | Download Chat Media | +| [`MediaUploadAppendAsync`](#mediauploadappendasync) | `POST /2/chat/media/upload/{id}/append` | Standard | Append Chat Media Upload | +| [`MediaUploadFinalizeAsync`](#mediauploadfinalizeasync) | `POST /2/chat/media/upload/{id}/finalize` | Standard | Finalize Chat Media Upload | +| [`MediaUploadInitializeAsync`](#mediauploadinitializeasync) | `POST /2/chat/media/upload/initialize` | Standard | Initialize Chat Media Upload | +| [`MuteConversationAsync`](#muteconversationasync) | `POST /2/chat/conversations/{id}/mute` | Standard | Mute a Chat Conversation | +| [`RejectGroupAdminRequestAsync`](#rejectgroupadminrequestasync) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/reject` | Standard | Reject an Admin Request in a Chat Group Conversation | +| [`RejectGroupJoinRequestsAsync`](#rejectgroupjoinrequestsasync) | `POST /2/chat/conversations/{id}/join_requests/reject` | Standard | Reject Join Requests for a Chat Group Conversation | +| [`RemoveGroupAdminsAsync`](#removegroupadminsasync) | `POST /2/chat/conversations/{id}/admins/remove` | Standard | Remove Admins from a Chat Group Conversation | +| [`RemoveGroupMembersAsync`](#removegroupmembersasync) | `POST /2/chat/conversations/{id}/members/remove` | Standard | Remove Members from a Chat Group Conversation | +| [`SendMessageAsync`](#sendmessageasync) | `POST /2/chat/conversations/{id}/messages` | Standard | Send Chat Message | +| [`SendTypingIndicatorAsync`](#sendtypingindicatorasync) | `POST /2/chat/conversations/{id}/typing` | Standard | Send Typing Indicator | +| [`UnarchiveConversationAsync`](#unarchiveconversationasync) | `DELETE /2/chat/conversations/{id}/archive` | Standard | Unarchive a Chat Conversation | +| [`UnmuteConversationAsync`](#unmuteconversationasync) | `DELETE /2/chat/conversations/{id}/mute` | Standard | Unmute a Chat Conversation | +| [`UpdateConversationMessageTtlAsync`](#updateconversationmessagettlasync) | `PUT /2/chat/conversations/{id}/message_ttl` | Standard | Turn On Disappearing Messages in a Chat Conversation | +| [`UpdateConversationScreenCaptureAsync`](#updateconversationscreencaptureasync) | `PUT /2/chat/conversations/{id}/screen_capture` | Standard | Update Screen Capture Settings for a Chat Conversation | +| [`UpdateGroupAsync`](#updategroupasync) | `PUT /2/chat/conversations/{id}` | Standard | Update a Chat Group Conversation | +| [`UpdateGroupAdminSettingsAsync`](#updategroupadminsettingsasync) | `PUT /2/chat/conversations/{id}/admin_settings` | Standard | Update the Admin-Only Settings of a Chat Group Conversation | +| [`UpdateSettingsAsync`](#updatesettingsasync) | `PUT /2/chat/settings` | Standard | Update Chat Settings | + +## `AcceptMessageRequestAsync` + +POST `/2/chat/message_requests/{id}/accept` + +**Accept a Chat Message Request** + +Accepts the other user's pending message request in a 1:1 Chat conversation, which moves to the authenticated user's inbox. Without a pending request, including after a successful accept, the response is 404. Replying to a request does not accept it. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.AcceptMessageRequestAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + +**Returns:** `Task` + +--- + +## `AddConversationKeysAsync` + +POST `/2/chat/conversations/{id}/keys` + +**Add Conversation Keys** + +Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation id; the server constructs the canonical conversation ID from the authenticated user and recipient. The request body must contain the conversation key version and participant keys (the conversation key encrypted for each participant using their public key). + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.AddConversationKeysAsync( + "1895000000000000000", + new AddConversationKeysRequest { ConversationKeyVersion = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `AddGroupAdminsAsync` + +POST `/2/chat/conversations/{id}/admins` + +**Add Admins to a Chat Group Conversation** + +Grants admin rights to one or more members of an existing encrypted Chat group conversation. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.AddGroupAdminsAsync( + "1895000000000000000", + new AddChatGroupAdminsRequest { UserIds = new List { "2244994945" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `AddGroupMembersAsync` + +POST `/2/chat/conversations/{id}/members` + +**Add Members to a Chat Group Conversation** + +Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key. Adding a user who has a pending join request approves that request; approval needs the same key-rotation body as adding any member. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.AddGroupMembersAsync( + "1895000000000000000", + new AddChatGroupMembersRequest { UserIds = new List { "2244994945" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `AddUserPublicKeyAsync` + +POST `/2/users/{id}/public_keys` + +**Add Public Key** + +Registers a user's public key for X Chat encryption. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.AddUserPublicKeyAsync("2244994945", new AddUserPublicKeyRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `ApproveGroupAdminRequestAsync` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/approve` + +**Approve an Admin Request in a Chat Group Conversation** + +Makes the user who requested admin permissions an admin of an encrypted Chat group conversation. Only a group admin can approve. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.ApproveGroupAdminRequestAsync( + "1895000000000000000", + "2244994945", + new ApproveChatGroupAdminRequestRequest() +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `ArchiveConversationAsync` + +POST `/2/chat/conversations/{id}/archive` + +**Archive a Chat Conversation** + +Archives a Chat conversation for the authenticated user only. Archiving an archived conversation changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.ArchiveConversationAsync("1895000000000000000", new ArchiveChatConversationRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateConversationAsync` + +POST `/2/chat/conversations/group` + +**Create Chat Group Conversation** + +Creates a new encrypted Chat group conversation on behalf of the authenticated user. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.CreateConversationAsync( + new CreateChatConversationRequest { ConversationId = "1500000000000000000", ConversationKeyVersion = "example", GroupMembers = new List { "example" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateGroupAdminRequestAsync` + +POST `/2/chat/conversations/{id}/admin_requests` + +**Request Admin Permissions in a Chat Group Conversation** + +Asks the admins of an encrypted Chat group conversation to make the authenticated user an admin. An admin approves or rejects the request. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.CreateGroupAdminRequestAsync("1895000000000000000", new CreateChatGroupAdminRequestRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateGroupJoinRequestAsync` + +POST `/2/chat/conversations/{id}/join_requests` + +**Request to Join a Chat Group** + +Asks to join an encrypted Chat group conversation through its invite link. The request stays pending until a group admin adds the user to the group. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.CreateGroupJoinRequestAsync( + "1895000000000000000", + new CreateChatGroupJoinRequestRequest { Token = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteConversationAsync` + +DELETE `/2/chat/conversations/{id}` + +**Delete a Chat Conversation** + +Deletes a Chat conversation for the authenticated user only; other participants keep it. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Deleting a pending message request's conversation deletes the request, like Delete in the X app. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.DeleteConversationAsync("1895000000000000000", new DeleteChatConversationRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteConversationMessageTtlAsync` + +DELETE `/2/chat/conversations/{id}/message_ttl` + +**Turn Off Disappearing Messages in a Chat Conversation** + +Stops new messages in a 1:1 or group Chat conversation from disappearing, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.DeleteConversationMessageTtlAsync("1895000000000000000", new DeleteChatConversationMessageTtlRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteMessagesAsync` + +POST `/2/chat/conversations/{id}/messages/delete` + +**Delete Chat Messages** + +Deletes one or more messages from a Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Delete for all removes a message you sent (or, in groups you administer, any message) for every participant; delete for self removes any message only from your own view. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.DeleteMessagesAsync( + "1895000000000000000", + new DeleteChatMessagesRequest { SequenceIds = new List { "1895000000000000000" }, DeleteMessageAction = "delete_for_all" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DisableGroupInviteAsync` + +DELETE `/2/chat/conversations/{id}/invite` + +**Disable a Chat Group Invite Link** + +Turns off the invite link for an encrypted Chat group conversation. The existing link stops working. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.DisableGroupInviteAsync("1895000000000000000", new DisableChatGroupInviteRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `EnableGroupInviteAsync` + +POST `/2/chat/conversations/{id}/invite` + +**Enable a Chat Group Invite Link** + +Turns on the invite link for an encrypted Chat group conversation and returns the link details. The client builds the link and sends it as invite_url, in the form https://x.com/i/chat/group_join/<conversation_id>/<token>, where the token is exactly 10 letters, digits, '-' or '_'. invite_url is required when action_signatures is sent. To make the link expire, send validity_duration_msec or validity_expiry_timestamp_msec. With action_signatures, send validity_expiry_timestamp_msec, because the signed payload carries the expiry. The group name and avatar sent here are stored unencrypted and shown to anyone who opens the link. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.EnableGroupInviteAsync( + "1895000000000000000", + new EnableChatGroupInviteRequest { AffiliateUserId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `GetConversationAsync` + +GET `/2/chat/conversations/{id}` + +**Get Chat Conversation** + +Returns metadata for a Chat conversation including type, muted status, group details, and your unread state. For the unread state, request chat_conversation.fields=unread,last_read_event_id,newest_event_id: those fields give your read state, computed from your latest read receipt and the conversation's latest notifying message. Use chat_conversation.fields to select which fields are returned. Use expansions to hydrate member, admin, or participant user objects. Use user.fields to control which profile fields are returned for expanded users; in a 1:1 chat, user.fields=receives_your_chat on the participant says how you can message them: encrypted, unencrypted, or none. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.GetConversationAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ChatConversation fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetConversationEventsAsync` + +GET `/2/chat/conversations/{id}/events` Paginated + +**Get Chat Conversation Events** + +Retrieves the events of a specific Chat conversation, newest first, with pagination support: messages, key changes, group changes, and read receipts. Events with an id above the conversation's last_read_event_id are unread: they come after the point you read up to. To collect them, page until an event's id is at or below it. Only `id` and `encoded_event` are always present. Events are either end-to-end encrypted or unencrypted, such as messages sent before the conversation was encrypted. Encrypted events carry `conversation_key_version`, and usually `conversation_token` and `message_event_signature`; treat an encrypted event without `message_event_signature` as unverified. An event without `conversation_key_version` is unencrypted. Decode each `encoded_event` client-side, and decrypt it with the conversation key named by `conversation_key_version` when that is present. A page holds up to `max_results` events and can hold fewer while `has_more` is true. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Chat.GetConversationEventsPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of events to return. + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatMessageEvent fields to display. + + + + +**Returns:** `Task` (use `GetConversationEventsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetConversationPinnedMessagesAsync` + +GET `/2/chat/conversations/{id}/pinned_messages` Paginated + +**Get Chat Conversation Pinned Messages** + +Retrieves the pinned message events of a Chat conversation with pagination support. Each event is a Base64-encoded Thrift pin event whose contents are end-to-end encrypted; decode and decrypt it client-side. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Chat.GetConversationPinnedMessagesPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatPinnedMessage fields to display. + + + + +**Returns:** `Task` (use `GetConversationPinnedMessagesPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetConversationsAsync` + +GET `/2/chat/conversations` Paginated + +**Get Chat Conversations** + +Retrieves a list of Chat conversations for the authenticated user's inbox, newest first: the most recently active conversation comes first. To find the chat with a particular person, start with participant_query set to their @username or name; with expansions=participant_ids, user.fields=receives_your_chat says how you can message each match. The unread, last_read_event_id and newest_event_id fields give your read state, computed from your latest read receipt and each conversation's latest notifying message. Request them with chat_conversation.fields=unread,last_read_event_id,newest_event_id. + +The filters unread_only, type, is_archived, is_muted, participant_ids, participant_query, start_time and end_time are optional, and all filters must match (AND). participant_query keeps conversations where another participant's username, or a word of their display name, starts with the query, ignoring case and accents; with a leading @ it matches usernames only. It considers the 100 people who best match the query, uses only public profile information, and never matches group names, nicknames or messages. start_time and end_time apply to the time of each conversation's latest message. + +Each page covers max_results conversations and returns those that match, so a page can hold fewer than max_results, or none, while meta.next_token is set and has_more is true: keep paging, passing meta.next_token as pagination_token. Once a page reaches a conversation whose latest message is older than start_time, has_more is false. A pagination_token only works with the same filters as the request that returned it; with other filters, the request fails with a 400. + +When both are provided, `start_time` must be earlier than `end_time`. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Chat.GetConversationsPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + Conversations covered per page (1-1000, default 200). Filtered pages can return fewer. + + + + meta.next_token from the previous page. Send the same filters with it, or the request fails. + + + + Return only unread conversations. A page can be short; keep paging while has_more. + + + + Only direct (1:1) or only group conversations. Omit for both. + + + + true: only archived; false: only not archived. Omit for both. + + + + true: only muted; false: only not muted. Omit for both. + + + + Comma-separated numeric user IDs (1-10), all in the chat. Names or @handles: use participant_query. + + + + Start here to find someone's chat: their @username or a word of their name (1-50 chars). + + + + ISO 8601, e.g. 2026-10-16T00:00:00Z. Chats whose latest message is at or after this time. + + + + ISO 8601, e.g. 2026-10-17T00:00:00Z. Chats whose latest message is before this time. + + + + A comma separated list of ChatConversation fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` (use `GetConversationsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetGroupAdminRequestsAsync` + +GET `/2/chat/conversations/{id}/admin_requests` Paginated + +**Get Pending Admin Requests for a Chat Group Conversation** + +Returns the users who have asked to become admins of an encrypted Chat group conversation. Only a group admin can list admin requests. Use user.fields to select which profile fields are returned. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Chat.GetGroupAdminRequestsPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetGroupAdminRequestsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetGroupInviteAsync` + +GET `/2/chat/conversations/{id}/invites/{token}` + +**Get a Chat Group Invite Link** + +Returns the preview of an encrypted Chat group conversation from its invite link: group name, avatar, member count, and the authenticated user's join state. The conversation ID and the token both come from the invite link. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.GetGroupInviteAsync("1895000000000000000", "example"); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The 10-character invite token from the group's invite link. + + + + + + A comma separated list of ChatGroupInvite fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetMessageRequestAsync` + +GET `/2/chat/message_requests/{id}` + +**Get Chat Message Request** + +Retrieves the message request state of a 1:1 Chat conversation and its newest message events. Like opening the request in an X app, reading it marks the returned messages as delivered and updates the unread badge. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.GetMessageRequestAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + + + + + A comma separated list of ChatMessageRequestDetail fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetMessageRequestsAsync` + +GET `/2/chat/message_requests` Paginated + +**Get Chat Message Requests** + +Retrieves the authenticated user's pending Chat message requests from one inbox. Message contents are end-to-end encrypted unless the conversation is unencrypted. Accepting or deleting requests between pages can skip or repeat requests, and a page can be empty while `next_token` is set. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Chat.GetMessageRequestsPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + Which message request inbox to list: `you_may_know` (the apps' Priority tab) or `low_quality` (the apps' Hidden tab). + + + + The maximum number of message requests to return. + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatMessageRequest fields to display. + + + + +**Returns:** `Task` (use `GetMessageRequestsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetSettingsAsync` + +GET `/2/chat/settings` + +**Get Chat Settings** + +Returns the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.GetSettingsAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + A comma separated list of ChatSettings fields to display. + + + + +**Returns:** `Task` + +--- + +## `InitializeGroupAsync` + +POST `/2/chat/conversations/group/initialize` + +**Initialize Chat Group** + +Initializes a new Chat group conversation and returns a unique conversation ID. Use the returned conversation_id in a subsequent POST /chat/conversations/group call to fully create and configure the group. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.InitializeGroupAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `MarkConversationReadAsync` + +POST `/2/chat/conversations/{id}/read` + +**Mark Conversation as Read** + +Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Without action_signatures the conversation is marked read up to its newest event and the read receipt is unsigned. With one action signature over a MarkConversationReadEvent, the server sends that signed read receipt, marking the conversation read up to the event it names. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.MarkConversationReadAsync("1895000000000000000", new MarkChatConversationReadRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `MarkConversationUnreadAsync` + +POST `/2/chat/conversations/{id}/unread` + +**Mark Conversation as Unread** + +Marks a specific Chat conversation as unread on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.MarkConversationUnreadAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `MediaDownloadAsync` + +GET `/2/chat/media/{id}/{media_hash_key}` + +**Download Chat Media** + +Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. A media item too large to return in one response fails with a 413 problem of type `https://api.x.com/2/problems/response-too-large`, and a retry fails the same way. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.MediaDownloadAsync("1895000000000000000", "example"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `media_hash_key` (path parameter). + + +**Returns:** `Task` + +--- + +## `MediaUploadAppendAsync` + +POST `/2/chat/media/upload/{id}/append` + +**Append Chat Media Upload** + +Appends media data to an XChat upload session. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.MediaUploadAppendAsync( + "1895000000000000000", + new ChatMediaUploadAppendRequest { Media = "example", SegmentIndex = 1, ConversationId = "1500000000000000000", MediaHashKey = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `MediaUploadFinalizeAsync` + +POST `/2/chat/media/upload/{id}/finalize` + +**Finalize Chat Media Upload** + +Finalizes an XChat media upload session. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.MediaUploadFinalizeAsync( + "1895000000000000000", + new ChatMediaUploadFinalizeRequest { ConversationId = "1500000000000000000", MediaHashKey = "example", NumParts = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `MediaUploadInitializeAsync` + +POST `/2/chat/media/upload/initialize` + +**Initialize Chat Media Upload** + +Initializes an XChat media upload session. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.MediaUploadInitializeAsync( + new ChatMediaUploadInitializeRequest { ConversationId = "1500000000000000000", TotalBytes = 1 } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `MuteConversationAsync` + +POST `/2/chat/conversations/{id}/mute` + +**Mute a Chat Conversation** + +Mutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.MuteConversationAsync("1895000000000000000", new MuteChatConversationRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `RejectGroupAdminRequestAsync` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/reject` + +**Reject an Admin Request in a Chat Group Conversation** + +Declines a user's pending request for admin permissions in an encrypted Chat group conversation. Only a group admin can reject. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.RejectGroupAdminRequestAsync( + "1895000000000000000", + "2244994945", + new RejectChatGroupAdminRequestRequest() +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `RejectGroupJoinRequestsAsync` + +POST `/2/chat/conversations/{id}/join_requests/reject` + +**Reject Join Requests for a Chat Group Conversation** + +Rejects pending requests to join an encrypted Chat group conversation. Only group admins can reject requests. To approve a request instead, add the requesting users with addChatGroupMembers; adding a user clears their pending request. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.RejectGroupJoinRequestsAsync( + "1895000000000000000", + new RejectChatGroupJoinRequestsRequest { UserIds = new List { "2244994945" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `RemoveGroupAdminsAsync` + +POST `/2/chat/conversations/{id}/admins/remove` + +**Remove Admins from a Chat Group Conversation** + +Revokes admin rights from one or more admins of an existing encrypted Chat group conversation. They stay members of the group. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.RemoveGroupAdminsAsync( + "1895000000000000000", + new RemoveChatGroupAdminsRequest { UserIds = new List { "2244994945" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `RemoveGroupMembersAsync` + +POST `/2/chat/conversations/{id}/members/remove` + +**Remove Members from a Chat Group Conversation** + +Removes one or more members from an existing encrypted Chat group conversation. To leave a group, pass your own user ID. Leaving does not delete the conversation for the caller. When the removal rotates the conversation key, send group_key_rotation_data and the action signatures for the removal and the key change, in that order. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.RemoveGroupMembersAsync( + "1895000000000000000", + new RemoveChatGroupMembersRequest { UserIds = new List { "2244994945" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `SendMessageAsync` + +POST `/2/chat/conversations/{id}/messages` + +**Send Chat Message** + +Sends a message or reaction to a Chat conversation, which you can find with `participant_query` on Get Chat Conversations. Send it end-to-end encrypted by default: `encoded_message_create_event`, built with the Chat XDK. Plaintext `content` is only a fallback for a 1:1 chat that X Chat can't encrypt: use it only when the recipient's `receives_your_chat` user field (`user.fields=receives_your_chat`) is `unencrypted`. When `content` is refused, nothing is sent and the problem's `detail` says why; HTTP 400 https://api.x.com/2/problems/encryption-required means the chat can be encrypted or is a group, so send it encrypted instead. A recipient you can't message (closed inbox, system account, or a block) returns HTTP 403 https://api.x.com/2/problems/recipient-not-messageable. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.SendMessageAsync( + "1895000000000000000", + new SendChatMessageRequest { MessageId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + A conversation's id from Get Chat Conversations, or the recipient's user ID for a 1:1 chat. + + + + At least one of `encoded_message_create_event`, `content` is required. + + +**Returns:** `Task` + +--- + +## `SendTypingIndicatorAsync` + +POST `/2/chat/conversations/{id}/typing` + +**Send Typing Indicator** + +Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.SendTypingIndicatorAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UnarchiveConversationAsync` + +DELETE `/2/chat/conversations/{id}/archive` + +**Unarchive a Chat Conversation** + +Unarchives a Chat conversation for the authenticated user only. Unarchiving a conversation that is not archived changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.UnarchiveConversationAsync("1895000000000000000", new UnarchiveChatConversationRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UnmuteConversationAsync` + +DELETE `/2/chat/conversations/{id}/mute` + +**Unmute a Chat Conversation** + +Unmutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.UnmuteConversationAsync("1895000000000000000", new UnmuteChatConversationRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateConversationMessageTtlAsync` + +PUT `/2/chat/conversations/{id}/message_ttl` + +**Turn On Disappearing Messages in a Chat Conversation** + +Sets how long new messages in a 1:1 or group Chat conversation last before they disappear, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.UpdateConversationMessageTtlAsync( + "1895000000000000000", + new UpdateChatConversationMessageTtlRequest { MessageTtlMs = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateConversationScreenCaptureAsync` + +PUT `/2/chat/conversations/{id}/screen_capture` + +**Update Screen Capture Settings for a Chat Conversation** + +Turns screenshot blocking or screenshot detection on or off in a Chat conversation, for every participant. In a group conversation, only admins can change these settings. Each request changes one setting: send either blocking or detection. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.UpdateConversationScreenCaptureAsync( + "1895000000000000000", + new UpdateChatConversationScreenCaptureRequest() +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + At least one of `blocking`, `detection` is required. + + +**Returns:** `Task` + +--- + +## `UpdateGroupAsync` + +PUT `/2/chat/conversations/{id}` + +**Update a Chat Group Conversation** + +Renames an encrypted Chat group conversation, changes its avatar, or sets its description. The client encrypts each value with the conversation key and lists the values it changed in modified_fields. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.UpdateGroupAsync( + "1895000000000000000", + new UpdateChatGroupRequest { ModifiedFields = new List { "group_name" }, ConversationKeyVersion = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateGroupAdminSettingsAsync` + +PUT `/2/chat/conversations/{id}/admin_settings` + +**Update the Admin-Only Settings of a Chat Group Conversation** + +Sets which actions only admins can perform in an existing encrypted Chat group conversation. A setting set to true restricts that action to admins, and false opens it to all members. Setting `send_message` to true makes the group announcement-only. Omitted settings keep their stored value. When sending `action_signatures`, sign over the full merged settings: the stored values with this request's changes applied, not only the settings in the request. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.UpdateGroupAdminSettingsAsync( + "1895000000000000000", + new UpdateChatGroupAdminSettingsRequest { BlockScreenCapture = true } +); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + At least one of `add_member`, `edit_group_info`, `send_message`, `start_call`, `edit_message_ttl`, `block_screen_capture` is required. + + +**Returns:** `Task` + +--- + +## `UpdateSettingsAsync` + +PUT `/2/chat/settings` + +**Update Chat Settings** + +Updates the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. allow_dms_from, dm_receipt_settings, and dm_quality_filter accept only their listed values, matched exactly and case-sensitively; anything else is a 400. av_settings must set at least one of its settings. Whether settings omitted from a partial av_settings keep their values or are reset is not yet confirmed; send every av_settings field you want to keep. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Chat.UpdateSettingsAsync( + new UpdateChatSettingsRequest { AlwaysAllowDmsFromSubscribers = true } +); +Console.WriteLine(response); +``` + +### Parameters + + + At least one of `allow_dms_from`, `always_allow_dms_from_subscribers`, `dm_quality_filter`, `dm_receipt_settings`, `av_settings` is required. + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/communities.mdx b/xdks/csharp/reference/clients/communities.mdx new file mode 100644 index 000000000..58e8f8415 --- /dev/null +++ b/xdks/csharp/reference/clients/communities.mdx @@ -0,0 +1,107 @@ +--- +title: "CommunitiesClient (C# XDK)" +sidebarTitle: "Communities" +description: "C# XDK CommunitiesClient reference — 2 methods for X API v2 Communities endpoints." +--- + +Access **Communities** endpoints via `client.Communities` (`CommunitiesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`GetByIdAsync`](#getbyidasync) | `GET /2/communities/{id}` | Standard | Get Community by ID | +| [`SearchAsync`](#searchasync) | `GET /2/communities/search` | Paginated | Search Communities | + +## `GetByIdAsync` + +GET `/2/communities/{id}` + +**Get Community by ID** + +Retrieves details of a specific Community by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Communities.GetByIdAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Community fields to display. + + + + +**Returns:** `Task` + +--- + +## `SearchAsync` + +GET `/2/communities/search` Paginated + +**Search Communities** + +Retrieves a list of Communities matching the specified search query. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Communities.SearchPages("from:XDevelopers")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Community fields to display. + + + + +**Returns:** `Task` (use `SearchPages(...)` for `IAsyncEnumerable` page iteration) + +--- + diff --git a/xdks/csharp/reference/clients/community-notes.mdx b/xdks/csharp/reference/clients/community-notes.mdx new file mode 100644 index 000000000..fdbded4a8 --- /dev/null +++ b/xdks/csharp/reference/clients/community-notes.mdx @@ -0,0 +1,239 @@ +--- +title: "CommunityNotesClient (C# XDK)" +sidebarTitle: "Community Notes" +description: "C# XDK CommunityNotesClient reference — 5 methods for X API v2 Community Notes endpoints." +--- + +Access **Community Notes** endpoints via `client.CommunityNotes` (`CommunityNotesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateAsync`](#createasync) | `POST /2/notes` | Standard | Create a Community Note | +| [`DeleteAsync`](#deleteasync) | `DELETE /2/notes/{id}` | Standard | Delete a Community Note | +| [`EvaluateAsync`](#evaluateasync) | `POST /2/notes/evaluate` | Standard | Evaluate a Community Note | +| [`SearchEligiblePostsAsync`](#searcheligiblepostsasync) | `GET /2/notes/search/posts_eligible_for_notes` | Paginated | Search for Posts Eligible for Community Notes | +| [`SearchWrittenAsync`](#searchwrittenasync) | `GET /2/notes/search/notes_written` | Paginated | Search for Community Notes Written | + +## `CreateAsync` + +POST `/2/notes` + +**Create a Community Note** + +Creates a Community Note on a Post. With test_mode set to true, the note is only for testing and is not publicly visible. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.CommunityNotes.CreateAsync( + new CreateCommunityNotesRequest { TestMode = true, PostId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteAsync` + +DELETE `/2/notes/{id}` + +**Delete a Community Note** + +Deletes a community note. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.CommunityNotes.DeleteAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `EvaluateAsync` + +POST `/2/notes/evaluate` + +**Evaluate a Community Note** + +Evaluates the text of a proposed Community Note on a Post and returns its claim-opinion score. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.CommunityNotes.EvaluateAsync( + new EvaluateCommunityNotesRequest { PostId = "1895000000000000000", NoteText = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `SearchEligiblePostsAsync` + +GET `/2/notes/search/posts_eligible_for_notes` Paginated + +**Search for Posts Eligible for Community Notes** + +Retrieves Posts that are eligible for Community Notes. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.CommunityNotes.SearchEligiblePostsPages(true)) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + `post_selection` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `SearchEligiblePostsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `SearchWrittenAsync` + +GET `/2/notes/search/notes_written` Paginated + +**Search for Community Notes Written** + +Retrieves the Community Notes written by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.CommunityNotes.SearchWrittenPages(true)) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Note fields to display. + + + + +**Returns:** `Task` (use `SearchWrittenPages(...)` for `IAsyncEnumerable` page iteration) + +--- + diff --git a/xdks/csharp/reference/clients/compliance.mdx b/xdks/csharp/reference/clients/compliance.mdx new file mode 100644 index 000000000..23fd4bc98 --- /dev/null +++ b/xdks/csharp/reference/clients/compliance.mdx @@ -0,0 +1,270 @@ +--- +title: "ComplianceClient (C# XDK)" +sidebarTitle: "Compliance" +description: "C# XDK ComplianceClient reference — 6 methods for X API v2 Compliance endpoints." +--- + +Access **Compliance** endpoints via `client.Compliance` (`ComplianceClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateJobsAsync`](#createjobsasync) | `POST /2/compliance/jobs` | Standard | Create Compliance Job | +| [`DeleteJobsByIdAsync`](#deletejobsbyidasync) | `DELETE /2/compliance/jobs/{id}` | Standard | Cancel Compliance Job | +| [`DownloadJobResultsAsync`](#downloadjobresultsasync) | `GET /2/compliance/jobs/{id}/download` | Standard | Download Compliance Job Results | +| [`GetJobsAsync`](#getjobsasync) | `GET /2/compliance/jobs` | Standard | Get Compliance Jobs | +| [`GetJobsByIdAsync`](#getjobsbyidasync) | `GET /2/compliance/jobs/{id}` | Standard | Get Compliance Job by ID | +| [`UploadJobSubmissionAsync`](#uploadjobsubmissionasync) | `PUT /2/compliance/jobs/{id}/upload` | Standard | Upload Compliance Job Submission | + +## `CreateJobsAsync` + +POST `/2/compliance/jobs` + +**Create Compliance Job** + +Creates a new Compliance Job for the specified job type. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Compliance.CreateJobsAsync(new CreateComplianceJobsRequest { Type = "tweets" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Task` + +--- + +## `DeleteJobsByIdAsync` + +DELETE `/2/compliance/jobs/{id}` + +**Cancel Compliance Job** + +Cancels a Compliance Job that has not finished processing; its status becomes failed and a new job of the same type can be created. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Compliance.DeleteJobsByIdAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Task` + +--- + +## `DownloadJobResultsAsync` + +GET `/2/compliance/jobs/{id}/download` + +**Download Compliance Job Results** + +Downloads the results file of a completed Compliance Job using the signed URL returned at job creation. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Compliance.DownloadJobResultsAsync("1895000000000000000", "example"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Signed download token from the job's download_url. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetJobsAsync` + +GET `/2/compliance/jobs` + +**Get Compliance Jobs** + +Retrieves a list of Compliance Jobs filtered by job type and optional status. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Compliance.GetJobsAsync("tweets"); +Console.WriteLine(response); +``` + +### Parameters + + + `type` (query parameter). + + + + + + `status` (query parameter). + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetJobsByIdAsync` + +GET `/2/compliance/jobs/{id}` + +**Get Compliance Job by ID** + +Retrieves details of a specific Compliance Job by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Compliance.GetJobsByIdAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Task` + +--- + +## `UploadJobSubmissionAsync` + +PUT `/2/compliance/jobs/{id}/upload` + +**Upload Compliance Job Submission** + +Uploads the newline-delimited ID file for a Compliance Job using the signed URL returned at job creation. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Compliance.UploadJobSubmissionAsync("1895000000000000000", "example", Array.Empty()); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Signed upload token from the job's upload_url. + + + + Request payload. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/connections.mdx b/xdks/csharp/reference/clients/connections.mdx new file mode 100644 index 000000000..0c0c48533 --- /dev/null +++ b/xdks/csharp/reference/clients/connections.mdx @@ -0,0 +1,161 @@ +--- +title: "ConnectionsClient (C# XDK)" +sidebarTitle: "Connections" +description: "C# XDK ConnectionsClient reference — 4 methods for X API v2 Connections endpoints." +--- + +Access **Connections** endpoints via `client.Connections` (`ConnectionsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`DeleteAllAsync`](#deleteallasync) | `DELETE /2/connections/all` | Standard | Terminate All Connections | +| [`DeleteByEndpointAsync`](#deletebyendpointasync) | `DELETE /2/connections/{endpoint_id}` | Standard | Terminate Connections by Endpoint | +| [`DeleteByUuidsAsync`](#deletebyuuidsasync) | `DELETE /2/connections` | Standard | Terminate Multiple Connections | +| [`GetConnectionHistoryAsync`](#getconnectionhistoryasync) | `GET /2/connections` | Paginated | Get Connection History | + +## `DeleteAllAsync` + +DELETE `/2/connections/all` + +**Terminate All Connections** + +Terminates all active streaming connections for the authenticated application. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Connections.DeleteAllAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `DeleteByEndpointAsync` + +DELETE `/2/connections/{endpoint_id}` + +**Terminate Connections by Endpoint** + +Terminates all streaming connections for a specific endpoint ID for the authenticated application. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Connections.DeleteByEndpointAsync("filtered_stream"); +Console.WriteLine(response); +``` + +### Parameters + + + `endpoint_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DeleteByUuidsAsync` + +DELETE `/2/connections` + +**Terminate Multiple Connections** + +Terminates multiple streaming connections by their UUIDs for the authenticated application. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Connections.DeleteByUuidsAsync( + new DeleteConnectionsByUuidsRequest { Uuids = new List { "example" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `GetConnectionHistoryAsync` + +GET `/2/connections` Paginated + +**Get Connection History** + +Returns active and historical streaming connections with disconnect reasons for the authenticated application. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Connections.GetConnectionHistoryPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + `status` (query parameter). + + + + `endpoints` (query parameter). + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Connection fields to display. + + + + +**Returns:** `Task` (use `GetConnectionHistoryPages(...)` for `IAsyncEnumerable` page iteration) + +--- + diff --git a/xdks/csharp/reference/clients/direct-messages.mdx b/xdks/csharp/reference/clients/direct-messages.mdx new file mode 100644 index 000000000..41ed0265b --- /dev/null +++ b/xdks/csharp/reference/clients/direct-messages.mdx @@ -0,0 +1,467 @@ +--- +title: "DirectMessagesClient (C# XDK)" +sidebarTitle: "Direct Messages" +description: "C# XDK DirectMessagesClient reference — 9 methods for X API v2 Direct Messages endpoints." +--- + +Access **Direct Messages** endpoints via `client.DirectMessages` (`DirectMessagesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateByConversationIdAsync`](#createbyconversationidasync) | `POST /2/dm_conversations/{dm_conversation_id}/messages` | Standard | Create DM Message by Conversation ID | +| [`CreateByParticipantIdAsync`](#createbyparticipantidasync) | `POST /2/dm_conversations/with/{participant_id}/messages` | Standard | Create DM Message by Participant ID | +| [`CreateConversationAsync`](#createconversationasync) | `POST /2/dm_conversations` | Standard | Create DM Conversation | +| [`DeleteEventsAsync`](#deleteeventsasync) | `DELETE /2/dm_events/{event_id}` | Standard | Delete DM Event | +| [`DmConversationsMediaDownloadAsync`](#dmconversationsmediadownloadasync) | `GET /2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` | Standard | Download DM Media | +| [`GetEventsAsync`](#geteventsasync) | `GET /2/dm_events` | Paginated | Get DM Events | +| [`GetEventsByConversationIdAsync`](#geteventsbyconversationidasync) | `GET /2/dm_conversations/{id}/dm_events` | Paginated | Get DM Events by Conversation ID | +| [`GetEventsByIdAsync`](#geteventsbyidasync) | `GET /2/dm_events/{event_id}` | Standard | Get DM Event by ID | +| [`GetEventsByParticipantIdAsync`](#geteventsbyparticipantidasync) | `GET /2/dm_conversations/with/{participant_id}/dm_events` | Paginated | Get DM Events by Participant ID | + +## `CreateByConversationIdAsync` + +POST `/2/dm_conversations/{dm_conversation_id}/messages` + +**Create DM Message by Conversation ID** + +Sends a new direct message to a specific conversation by its ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.DirectMessages.CreateByConversationIdAsync( + "1500000000000000000", + new CreateDirectMessagesByConversationIdRequest { Text = "Hello from XDK!" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `dm_conversation_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `Task` + +--- + +## `CreateByParticipantIdAsync` + +POST `/2/dm_conversations/with/{participant_id}/messages` + +**Create DM Message by Participant ID** + +Sends a new direct message to a specific participant by their ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.DirectMessages.CreateByParticipantIdAsync( + "2244994945", + new CreateDirectMessagesByParticipantIdRequest { Text = "Hello from XDK!" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `participant_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `Task` + +--- + +## `CreateConversationAsync` + +POST `/2/dm_conversations` + +**Create DM Conversation** + +Initiates a new direct message conversation with specified participants. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.DirectMessages.CreateConversationAsync( + new CreateDirectMessagesConversationRequest { ConversationType = "Group", ParticipantIds = new List { "2244994945" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteEventsAsync` + +DELETE `/2/dm_events/{event_id}` + +**Delete DM Event** + +Deletes a specific direct message event by its ID, if owned by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.DirectMessages.DeleteEventsAsync("1600000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `event_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DmConversationsMediaDownloadAsync` + +GET `/2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` + +**Download DM Media** + +Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.DirectMessages.DmConversationsMediaDownloadAsync( + "1895000000000000000", + "3_1895000000000000000", + "1895000000000000000" +); +Console.WriteLine(response); +``` + +### Parameters + + + `dm_id` (path parameter). + + + + `media_id` (path parameter). + + + + `resource_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetEventsAsync` + +GET `/2/dm_events` Paginated + +**Get DM Events** + +Retrieves a list of recent direct message events across all conversations. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.DirectMessages.GetEventsPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Task` (use `GetEventsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetEventsByConversationIdAsync` + +GET `/2/dm_conversations/{id}/dm_events` Paginated + +**Get DM Events by Conversation ID** + +Retrieves direct message events for a specific conversation by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.DirectMessages.GetEventsByConversationIdPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Task` (use `GetEventsByConversationIdPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetEventsByIdAsync` + +GET `/2/dm_events/{event_id}` + +**Get DM Event by ID** + +Retrieves details of a specific direct message event by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.DirectMessages.GetEventsByIdAsync("1600000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `event_id` (path parameter). + + + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetEventsByParticipantIdAsync` + +GET `/2/dm_conversations/with/{participant_id}/dm_events` Paginated + +**Get DM Events by Participant ID** + +Retrieves direct message events for the one-to-one conversation between the authenticated user and a specific participant. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.DirectMessages.GetEventsByParticipantIdPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `participant_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Task` (use `GetEventsByParticipantIdPages(...)` for `IAsyncEnumerable` page iteration) + +--- + diff --git a/xdks/csharp/reference/clients/general.mdx b/xdks/csharp/reference/clients/general.mdx new file mode 100644 index 000000000..404973994 --- /dev/null +++ b/xdks/csharp/reference/clients/general.mdx @@ -0,0 +1,39 @@ +--- +title: "GeneralClient (C# XDK)" +sidebarTitle: "General" +description: "C# XDK GeneralClient reference — 1 methods for X API v2 General endpoints." +--- + +Access **General** endpoints via `client.General` (`GeneralClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`GetOpenApiSpecAsync`](#getopenapispecasync) | `GET /2/openapi.json` | Standard | Get OpenAPI Spec | + +## `GetOpenApiSpecAsync` + +GET `/2/openapi.json` + +**Get OpenAPI Spec** + +Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md) + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.General.GetOpenApiSpecAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task>` + +--- + diff --git a/xdks/csharp/reference/clients/lists.mdx b/xdks/csharp/reference/clients/lists.mdx new file mode 100644 index 000000000..768b22f72 --- /dev/null +++ b/xdks/csharp/reference/clients/lists.mdx @@ -0,0 +1,425 @@ +--- +title: "ListsClient (C# XDK)" +sidebarTitle: "Lists" +description: "C# XDK ListsClient reference — 9 methods for X API v2 Lists endpoints." +--- + +Access **Lists** endpoints via `client.Lists` (`ListsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`AddMemberAsync`](#addmemberasync) | `POST /2/lists/{id}/members` | Standard | Add List Member | +| [`CreateAsync`](#createasync) | `POST /2/lists` | Standard | Create List | +| [`DeleteAsync`](#deleteasync) | `DELETE /2/lists/{id}` | Standard | Delete List | +| [`GetByIdAsync`](#getbyidasync) | `GET /2/lists/{id}` | Standard | Get List by ID | +| [`GetFollowersAsync`](#getfollowersasync) | `GET /2/lists/{id}/followers` | Paginated | Get List Followers | +| [`GetMembersAsync`](#getmembersasync) | `GET /2/lists/{id}/members` | Paginated | Get List Members | +| [`GetPostsAsync`](#getpostsasync) | `GET /2/lists/{id}/tweets` | Paginated | Get List Posts | +| [`RemoveMemberByUserIdAsync`](#removememberbyuseridasync) | `DELETE /2/lists/{id}/members/{user_id}` | Standard | Remove List Member | +| [`UpdateAsync`](#updateasync) | `PUT /2/lists/{id}` | Standard | Update List | + +## `AddMemberAsync` + +POST `/2/lists/{id}/members` + +**Add List Member** + +Adds a User to a specific List by its ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Lists.AddMemberAsync( + "1450000000000000000", + new AddListsMemberRequest { UserId = "2244994945" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateAsync` + +POST `/2/lists` + +**Create List** + +Creates a new List for the authenticated user. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Lists.CreateAsync(new CreateListsRequest { Name = "My List" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteAsync` + +DELETE `/2/lists/{id}` + +**Delete List** + +Deletes a specific List owned by the authenticated user by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Lists.DeleteAsync("1450000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetByIdAsync` + +GET `/2/lists/{id}` + +**Get List by ID** + +Retrieves details of a specific List by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Lists.GetByIdAsync("1450000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetFollowersAsync` + +GET `/2/lists/{id}/followers` Paginated + +**Get List Followers** + +Retrieves a list of Users who follow a specific List by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Lists.GetFollowersPages("1450000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetFollowersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetMembersAsync` + +GET `/2/lists/{id}/members` Paginated + +**Get List Members** + +Retrieves a list of Users who are members of a specific List by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Lists.GetMembersPages("1450000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetMembersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetPostsAsync` + +GET `/2/lists/{id}/tweets` Paginated + +**Get List Posts** + +Retrieves a list of Posts associated with a specific List by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Lists.GetPostsPages("1450000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetPostsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `RemoveMemberByUserIdAsync` + +DELETE `/2/lists/{id}/members/{user_id}` + +**Remove List Member** + +Removes a User from a List by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Lists.RemoveMemberByUserIdAsync("1450000000000000000", "2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UpdateAsync` + +PUT `/2/lists/{id}` + +**Update List** + +Updates the details of a specific List owned by the authenticated user by its ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Lists.UpdateAsync("1450000000000000000", new UpdateListsRequest { Name = "My List" }); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/media.mdx b/xdks/csharp/reference/clients/media.mdx new file mode 100644 index 000000000..3e77bb461 --- /dev/null +++ b/xdks/csharp/reference/clients/media.mdx @@ -0,0 +1,706 @@ +--- +title: "MediaClient (C# XDK)" +sidebarTitle: "Media" +description: "C# XDK MediaClient reference — 19 methods for X API v2 Media endpoints." +--- + +Access **Media** endpoints via `client.Media` (`MediaClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`AddPostToAmplifyProgramsAsync`](#addposttoamplifyprogramsasync) | `POST /2/media/amplify/posts` | Standard | Add Post to Amplify Programs | +| [`AddToLibraryAsync`](#addtolibraryasync) | `POST /2/media/library` | Standard | Add Media to Library | +| [`AppendUploadAsync`](#appenduploadasync) | `POST /2/media/upload/{id}/append` | Standard | Append Media Upload | +| [`CreateMetadataAsync`](#createmetadataasync) | `POST /2/media/metadata` | Standard | Create Media Metadata | +| [`CreateSubtitlesAsync`](#createsubtitlesasync) | `POST /2/media/subtitles` | Standard | Create Media Subtitles | +| [`DeleteSubtitlesAsync`](#deletesubtitlesasync) | `DELETE /2/media/subtitles` | Standard | Delete Media Subtitles | +| [`FinalizeUploadAsync`](#finalizeuploadasync) | `POST /2/media/upload/{id}/finalize` | Standard | Finalize Media Upload | +| [`GetAmplifyProgramAsync`](#getamplifyprogramasync) | `GET /2/media/amplify/programs/{program_id}` | Standard | Get Amplify Program | +| [`GetAmplifyProgramPostsAsync`](#getamplifyprogrampostsasync) | `GET /2/media/amplify/programs/{program_id}/posts` | Standard | Get Amplify Program Posts | +| [`GetAmplifyProgramsAsync`](#getamplifyprogramsasync) | `GET /2/media/amplify/programs` | Standard | Get Amplify Programs | +| [`GetAnalyticsAsync`](#getanalyticsasync) | `GET /2/media/analytics` | Standard | Get Media Analytics | +| [`GetByKeyAsync`](#getbykeyasync) | `GET /2/media/{media_key}` | Standard | Get Media by Media Key | +| [`GetByKeysAsync`](#getbykeysasync) | `GET /2/media` | Standard | Get Media by Media Keys | +| [`GetLibraryCategoriesAsync`](#getlibrarycategoriesasync) | `GET /2/media/library/categories` | Standard | Get Media Library Categories | +| [`GetUploadStatusAsync`](#getuploadstatusasync) | `GET /2/media/upload` | Standard | Get Media Upload Status | +| [`InitializeUploadAsync`](#initializeuploadasync) | `POST /2/media/upload/initialize` | Standard | Initialize Media Upload | +| [`RemoveFromLibraryAsync`](#removefromlibraryasync) | `DELETE /2/media/library/{media_key}` | Standard | Remove Media Library Item | +| [`UpdateInLibraryAsync`](#updateinlibraryasync) | `PUT /2/media/library/{media_key}` | Standard | Update Media Library Item | +| [`UploadAsync`](#uploadasync) | `POST /2/media/upload` | Standard | Upload Media | + +## `AddPostToAmplifyProgramsAsync` + +POST `/2/media/amplify/posts` + +**Add Post to Amplify Programs** + +Publishes one of the authenticated user's video posts into one or more active Amplify pre-roll programs the user is enrolled in as a publisher. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.AddPostToAmplifyProgramsAsync( + new AddPostToAmplifyProgramsRequest { PostId = "1895000000000000000", ProgramIds = new List { "1895000000000000000" } } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `AddToLibraryAsync` + +POST `/2/media/library` + +**Add Media to Library** + +Adds previously uploaded media to the authenticated user's Media Library with its library metadata. The user must own the media. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.AddToLibraryAsync(new AddMediaToLibraryRequest { MediaKey = "3_1895000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `AppendUploadAsync` + +POST `/2/media/upload/{id}/append` + +**Append Media Upload** + +Appends one segment of the file to a chunked upload. Send the segment base64-encoded in media (raw bytes in multipart bodies) and its position in the file in segment_index, counting from 0. A segment can be up to 8 MB; in a JSON body keep it to 4 MB or less, because base64 adds a third. After the last segment, call Finalize Media Upload. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.AppendUploadAsync( + "1895000000000000000", + new AppendMediaUploadRequest { Media = "example", SegmentIndex = 1 } +); +Console.WriteLine(response); +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateMetadataAsync` + +POST `/2/media/metadata` + +**Create Media Metadata** + +Creates metadata for a Media file. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.CreateMetadataAsync(new CreateMediaMetadataRequest { Id = "1895000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateSubtitlesAsync` + +POST `/2/media/subtitles` + +**Create Media Subtitles** + +Creates subtitles for a specific Media file. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.CreateSubtitlesAsync( + new CreateMediaSubtitlesRequest { Id = "1895000000000000000", MediaCategory = "AmplifyVideo" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteSubtitlesAsync` + +DELETE `/2/media/subtitles` + +**Delete Media Subtitles** + +Deletes subtitles for a specific Media file. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.DeleteSubtitlesAsync( + new DeleteMediaSubtitlesRequest { Id = "1895000000000000000", MediaCategory = "example", LanguageCode = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `FinalizeUploadAsync` + +POST `/2/media/upload/{id}/finalize` + +**Finalize Media Upload** + +Completes a chunked upload once every segment is appended. For video the result carries processing_info: the media can go on a Post only when its state is succeeded, so call Get Media Upload Status until it is. A result without processing_info is ready to use. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.FinalizeUploadAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + +**Returns:** `Task` + +--- + +## `GetAmplifyProgramAsync` + +GET `/2/media/amplify/programs/{program_id}` + +**Get Amplify Program** + +Returns one Amplify pre-roll program the authenticated user is enrolled in as a publisher. A program the user is not enrolled in is reported as not found. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.GetAmplifyProgramAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `Task` + +--- + +## `GetAmplifyProgramPostsAsync` + +GET `/2/media/amplify/programs/{program_id}/posts` + +**Get Amplify Program Posts** + +Returns the posts published into an Amplify pre-roll program the authenticated user is enrolled in as a publisher. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.GetAmplifyProgramPostsAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `Task` + +--- + +## `GetAmplifyProgramsAsync` + +GET `/2/media/amplify/programs` + +**Get Amplify Programs** + +Returns the Amplify pre-roll programs the authenticated user is enrolled in as a publisher. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.GetAmplifyProgramsAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `GetAnalyticsAsync` + +GET `/2/media/analytics` + +**Get Media Analytics** + +Retrieves analytics data for media. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.GetAnalyticsAsync( + new List { "3_1895000000000000000" }, + "2026-01-01T00:00:00Z", + "2026-01-02T00:00:00Z" +); +Console.WriteLine(response); +``` + +### Parameters + + + `media_keys` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + + + A comma separated list of MediaAnalytics fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByKeyAsync` + +GET `/2/media/{media_key}` + +**Get Media by Media Key** + +Retrieves details of a specific Media file by its media key. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Media.GetByKeyAsync("3_1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `media_key` (path parameter). + + + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByKeysAsync` + +GET `/2/media` + +**Get Media by Media Keys** + +Retrieves details of Media files by their media keys. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Media.GetByKeysAsync(new List { "3_1895000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + `media_keys` (query parameter). + + + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetLibraryCategoriesAsync` + +GET `/2/media/library/categories` + +**Get Media Library Categories** + +Returns the video categories a publisher can assign to a media library item and the advertiser categories whose ads can be blocked from running against it. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.GetLibraryCategoriesAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + Language tag for category descriptions, e.g. `en` or `pt-BR`. + + + + +**Returns:** `Task` + +--- + +## `GetUploadStatusAsync` + +GET `/2/media/upload` + +**Get Media Upload Status** + +Returns how far X has processed an uploaded media file, in processing_info.state: pending, in_progress, succeeded or failed. Call it after Finalize Media Upload returns processing_info, waiting check_after_secs between calls, until the state is succeeded. A failed state means the media can't be used. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.GetUploadStatusAsync("3_1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + The media id from Initialize Media Upload. + + + + + + Always STATUS; can be left out. + + + + +**Returns:** `Task` + +--- + +## `InitializeUploadAsync` + +POST `/2/media/upload/initialize` + +**Initialize Media Upload** + +Starts a chunked media upload and returns its id. Use it for video and for other files too large for one request. For a video on a Post, set media_category to tweet_video, media_type to the file's type (for example video/mp4) and total_bytes to the file's size. Send the file with Append Media Upload, call Finalize Media Upload, then pass the id in media.media_ids on Create or Edit Post. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.InitializeUploadAsync(new InitializeMediaUploadRequest { MediaCategory = "amplify_video" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `RemoveFromLibraryAsync` + +DELETE `/2/media/library/{media_key}` + +**Remove Media Library Item** + +Removes an item from the authenticated user's Media Library. Posts scheduled through the API that have not yet been published and still use the media are cancelled. Published posts and the underlying media are not affected. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.RemoveFromLibraryAsync("3_1895000000000000000", new RemoveMediaFromLibraryRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + The media key of the library item to remove. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UpdateInLibraryAsync` + +PUT `/2/media/library/{media_key}` + +**Update Media Library Item** + +Updates the library metadata of an item in the authenticated user's Media Library. Only the fields sent are changed; the others keep their values. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.UpdateInLibraryAsync( + "3_1895000000000000000", + new UpdateMediaInLibraryRequest { Name = "My List" } +); +Console.WriteLine(response); +``` + +### Parameters + + + The media key of the library item to update. + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `UploadAsync` + +POST `/2/media/upload` + +**Upload Media** + +Uploads a media file in one request and returns its id. Send the file base64-encoded in media (raw bytes in multipart bodies). For a Post, set media_category to tweet_image (JPG, PNG, GIF or WEBP, up to 5 MB) or tweet_gif, then pass the returned id in media.media_ids on Create or Edit Post. DM media uses dm_image or dm_gif. For video, use Initialize Media Upload. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Media.UploadAsync( + new MediaUploadRequest { Media = "example", MediaCategory = "tweet_image" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/news.mdx b/xdks/csharp/reference/clients/news.mdx new file mode 100644 index 000000000..2f6708a32 --- /dev/null +++ b/xdks/csharp/reference/clients/news.mdx @@ -0,0 +1,101 @@ +--- +title: "NewsClient (C# XDK)" +sidebarTitle: "News" +description: "C# XDK NewsClient reference — 2 methods for X API v2 News endpoints." +--- + +Access **News** endpoints via `client.News` (`NewsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`GetAsync`](#getasync) | `GET /2/news/{id}` | Standard | Get News Stories by ID | +| [`SearchAsync`](#searchasync) | `GET /2/news/search` | Standard | Search News | + +## `GetAsync` + +GET `/2/news/{id}` + +**Get News Stories by ID** + +Retrieves news story by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.News.GetAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of News fields to display. + + + + +**Returns:** `Task` + +--- + +## `SearchAsync` + +GET `/2/news/search` + +**Search News** + +Retrieves a list of News stories matching the specified search query. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.News.SearchAsync("from:XDevelopers"); +Console.WriteLine(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `max_age_hours` (query parameter). + + + + A comma separated list of News fields to display. + + + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/posts.mdx b/xdks/csharp/reference/clients/posts.mdx new file mode 100644 index 000000000..9e1130a6d --- /dev/null +++ b/xdks/csharp/reference/clients/posts.mdx @@ -0,0 +1,996 @@ +--- +title: "PostsClient (C# XDK)" +sidebarTitle: "Posts" +description: "C# XDK PostsClient reference — 17 methods for X API v2 Posts endpoints." +--- + +Access **Posts** endpoints via `client.Posts` (`PostsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateAsync`](#createasync) | `POST /2/tweets` | Standard | Create or Edit Post | +| [`CreatePostDraftAsync`](#createpostdraftasync) | `POST /2/posts/drafts` | Standard | Create Post Draft | +| [`DeleteAsync`](#deleteasync) | `DELETE /2/tweets/{id}` | Standard | Delete Post | +| [`DeletePostDraftAsync`](#deletepostdraftasync) | `DELETE /2/posts/drafts/{id}` | Standard | Delete Post Draft | +| [`GetAnalyticsAsync`](#getanalyticsasync) | `GET /2/tweets/analytics` | Standard | Get Post Analytics | +| [`GetByIdAsync`](#getbyidasync) | `GET /2/tweets/{id}` | Standard | Get Post by ID | +| [`GetByIdsAsync`](#getbyidsasync) | `GET /2/tweets` | Standard | Get Posts by IDs | +| [`GetCountsAllAsync`](#getcountsallasync) | `GET /2/tweets/counts/all` | Paginated | Get Count of All Posts | +| [`GetCountsRecentAsync`](#getcountsrecentasync) | `GET /2/tweets/counts/recent` | Paginated | Get Count of Recent Posts | +| [`GetLikingUsersAsync`](#getlikingusersasync) | `GET /2/tweets/{id}/liking_users` | Paginated | Get Liking Users | +| [`GetPostDraftsAsync`](#getpostdraftsasync) | `GET /2/posts/drafts` | Paginated | Get Post Drafts | +| [`GetQuotedAsync`](#getquotedasync) | `GET /2/tweets/{id}/quote_tweets` | Paginated | Get Quoted Posts | +| [`GetRepostedByAsync`](#getrepostedbyasync) | `GET /2/tweets/{id}/retweeted_by` | Paginated | Get Reposted By | +| [`GetRepostsAsync`](#getrepostsasync) | `GET /2/tweets/{id}/retweets` | Paginated | Get Reposts | +| [`HideReplyAsync`](#hidereplyasync) | `PUT /2/tweets/{tweet_id}/hidden` | Standard | Hide Reply | +| [`SearchAllAsync`](#searchallasync) | `GET /2/tweets/search/all` | Paginated | Search All Posts | +| [`SearchRecentAsync`](#searchrecentasync) | `GET /2/tweets/search/recent` | Paginated | Search Recent Posts | + +## `CreateAsync` + +POST `/2/tweets` + +**Create or Edit Post** + +Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Media in media.media_ids is attached in the order given; get the ids by uploading each image with Upload Media, or a video with Initialize Media Upload. Supports paid partnership disclosure via the paid_partnership field. To share a clip of another Post's video, set clip to that Post's id and a range of 5 to 60 seconds. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Posts.CreateAsync(new CreatePostsRequest { Text = "Hello from XDK!" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreatePostDraftAsync` + +POST `/2/posts/drafts` + +**Create Post Draft** + +Saves a Post draft to the authenticated user's X account without publishing it. Takes the body of Create or Edit Post, of which a draft stores text, media with tagged users, a reply and the AI and paid partnership disclosures. Any other field that is set is a 400 that names it. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Posts.CreatePostDraftAsync(new CreatePostDraftRequest { Text = "Hello from XDK!" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteAsync` + +DELETE `/2/tweets/{id}` + +**Delete Post** + +Deletes a specific Post by its ID, if owned by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Posts.DeleteAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DeletePostDraftAsync` + +DELETE `/2/posts/drafts/{id}` + +**Delete Post Draft** + +Deletes one of the authenticated user's Post drafts by its ID. The whole draft is deleted, including any part Get Post Drafts does not list, and cannot be restored. An ID that is not one of the user's drafts also returns deleted: true. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Posts.DeletePostDraftAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + The ID of the draft to delete. + + +**Returns:** `Task` + +--- + +## `GetAnalyticsAsync` + +GET `/2/tweets/analytics` + +**Get Post Analytics** + +Retrieves analytics data for specified Posts within a defined time range. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Posts.GetAnalyticsAsync( + new List { "1895000000000000000" }, + "2026-01-01T00:00:00Z", + "2026-01-02T00:00:00Z" +); +Console.WriteLine(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + + + A comma separated list of Analytics fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByIdAsync` + +GET `/2/tweets/{id}` + +**Get Post by ID** + +Retrieves details of a specific Post by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Posts.GetByIdAsync("1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByIdsAsync` + +GET `/2/tweets` + +**Get Posts by IDs** + +Retrieves details of multiple Posts by their IDs. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Posts.GetByIdsAsync(new List { "1895000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetCountsAllAsync` + +GET `/2/tweets/counts/all` Paginated + +**Get Count of All Posts** + +Retrieves the count of Posts matching a search query from the full archive. + +At most one of `pagination_token`, `next_token` may be provided. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Posts.GetCountsAllPages("from:XDevelopers")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Task` (use `GetCountsAllPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetCountsRecentAsync` + +GET `/2/tweets/counts/recent` Paginated + +**Get Count of Recent Posts** + +Retrieves the count of Posts from the last 7 days matching a search query. + +At most one of `pagination_token`, `next_token` may be provided. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Posts.GetCountsRecentPages("from:XDevelopers")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Task` (use `GetCountsRecentPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetLikingUsersAsync` + +GET `/2/tweets/{id}/liking_users` Paginated + +**Get Liking Users** + +Retrieves a list of Users who liked a specific Post by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Posts.GetLikingUsersPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetLikingUsersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetPostDraftsAsync` + +GET `/2/posts/drafts` Paginated + +**Get Post Drafts** + +Returns the authenticated user's Post drafts, newest first, in the fields of the Create or Edit Post body. thread holds the Posts after the first. A draft with unsupported_content is not listed in full: do not publish it from this list or delete it unless the user asks. Needs the tweet.write scope. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Posts.GetPostDraftsPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + The maximum number of drafts to return. + + + + The meta.next_token of the previous page. + + + + +**Returns:** `Task` (use `GetPostDraftsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetQuotedAsync` + +GET `/2/tweets/{id}/quote_tweets` Paginated + +**Get Quoted Posts** + +Retrieves a list of Posts that quote a specific Post by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Posts.GetQuotedPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetQuotedPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetRepostedByAsync` + +GET `/2/tweets/{id}/retweeted_by` Paginated + +**Get Reposted By** + +Retrieves a list of Users who reposted a specific Post by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Posts.GetRepostedByPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetRepostedByPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetRepostsAsync` + +GET `/2/tweets/{id}/retweets` Paginated + +**Get Reposts** + +Retrieves a list of Posts that repost a specific Post by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Posts.GetRepostsPages("1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetRepostsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `HideReplyAsync` + +PUT `/2/tweets/{tweet_id}/hidden` + +**Hide Reply** + +Hides or unhides a reply to a conversation owned by the authenticated user. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Posts.HideReplyAsync("1895000000000000000", new HidePostsReplyRequest { Hidden = true }); +Console.WriteLine(response); +``` + +### Parameters + + + `tweet_id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `SearchAllAsync` + +GET `/2/tweets/search/all` Paginated + +**Search All Posts** + +Retrieves Posts from the full archive matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Posts.SearchAllPages("from:XDevelopers")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `sort_order` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `SearchAllPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `SearchRecentAsync` + +GET `/2/tweets/search/recent` Paginated + +**Search Recent Posts** + +Retrieves Posts from the last 7 days matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Posts.SearchRecentPages("from:XDevelopers")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `sort_order` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `SearchRecentPages(...)` for `IAsyncEnumerable` page iteration) + +--- + diff --git a/xdks/csharp/reference/clients/spaces.mdx b/xdks/csharp/reference/clients/spaces.mdx new file mode 100644 index 000000000..94ef49b46 --- /dev/null +++ b/xdks/csharp/reference/clients/spaces.mdx @@ -0,0 +1,359 @@ +--- +title: "SpacesClient (C# XDK)" +sidebarTitle: "Spaces" +description: "C# XDK SpacesClient reference — 6 methods for X API v2 Spaces endpoints." +--- + +Access **Spaces** endpoints via `client.Spaces` (`SpacesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`GetBuyersAsync`](#getbuyersasync) | `GET /2/spaces/{id}/buyers` | Paginated | Get Space Ticket Buyers | +| [`GetByCreatorIdsAsync`](#getbycreatoridsasync) | `GET /2/spaces/by/creator_ids` | Standard | Get Spaces by Creator IDs | +| [`GetByIdAsync`](#getbyidasync) | `GET /2/spaces/{id}` | Standard | Get Space by ID | +| [`GetByIdsAsync`](#getbyidsasync) | `GET /2/spaces` | Standard | Get Spaces by IDs | +| [`GetPostsAsync`](#getpostsasync) | `GET /2/spaces/{id}/tweets` | Paginated | Get Space Posts | +| [`SearchAsync`](#searchasync) | `GET /2/spaces/search` | Standard | Search Spaces | + +## `GetBuyersAsync` + +GET `/2/spaces/{id}/buyers` Paginated + +**Get Space Ticket Buyers** + +Retrieves a list of Users who purchased tickets to a specific Space by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Spaces.GetBuyersPages("1YqKDqWLPPlGV")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetBuyersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetByCreatorIdsAsync` + +GET `/2/spaces/by/creator_ids` + +**Get Spaces by Creator IDs** + +Retrieves details of Spaces created by specified User IDs. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Spaces.GetByCreatorIdsAsync(new List { "2244994945" }); +Console.WriteLine(response); +``` + +### Parameters + + + `user_ids` (query parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByIdAsync` + +GET `/2/spaces/{id}` + +**Get Space by ID** + +Retrieves details of a specific Space by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Spaces.GetByIdAsync("1YqKDqWLPPlGV"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByIdsAsync` + +GET `/2/spaces` + +**Get Spaces by IDs** + +Retrieves details of multiple Spaces by their IDs. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Spaces.GetByIdsAsync(new List { "1YqKDqWLPPlGV" }); +Console.WriteLine(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetPostsAsync` + +GET `/2/spaces/{id}/tweets` Paginated + +**Get Space Posts** + +Retrieves a list of Posts shared in a specific Space by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Spaces.GetPostsPages("1YqKDqWLPPlGV")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetPostsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `SearchAsync` + +GET `/2/spaces/search` + +**Search Spaces** + +Retrieves a list of Spaces matching the specified search query. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Spaces.SearchAsync("from:XDevelopers"); +Console.WriteLine(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `state` (query parameter). + + + + `max_results` (query parameter). + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/stream.mdx b/xdks/csharp/reference/clients/stream.mdx new file mode 100644 index 000000000..d2580d743 --- /dev/null +++ b/xdks/csharp/reference/clients/stream.mdx @@ -0,0 +1,1109 @@ +--- +title: "StreamClient (C# XDK)" +sidebarTitle: "Stream" +description: "C# XDK StreamClient reference — 18 methods for X API v2 Stream endpoints." +--- + +Access **Stream** endpoints via `client.Stream` (`StreamClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`ActivityStream`](#activitystream) | `GET /2/activity/stream` | Streaming | Activity Stream | +| [`GetRuleCountsAsync`](#getrulecountsasync) | `GET /2/tweets/search/stream/rules/counts` | Standard | Get Stream Rule Counts | +| [`GetRulesAsync`](#getrulesasync) | `GET /2/tweets/search/stream/rules` | Paginated | Get Stream Rules | +| [`LabelsComplianceStream`](#labelscompliancestream) | `GET /2/tweets/label/stream` | Streaming | Stream Post Labels | +| [`LikesComplianceStream`](#likescompliancestream) | `GET /2/likes/compliance/stream` | Streaming | Stream Likes Compliance Data | +| [`LikesFirehoseStream`](#likesfirehosestream) | `GET /2/likes/firehose/stream` | Streaming | Stream All Likes | +| [`LikesSample10Stream`](#likessample10stream) | `GET /2/likes/sample10/stream` | Streaming | Stream Sampled Likes | +| [`PostsStream`](#postsstream) | `GET /2/tweets/search/stream` | Streaming | Stream Filtered Posts | +| [`PostsComplianceStream`](#postscompliancestream) | `GET /2/tweets/compliance/stream` | Streaming | Stream Posts Compliance Data | +| [`PostsFirehoseStream`](#postsfirehosestream) | `GET /2/tweets/firehose/stream` | Streaming | Stream All Posts | +| [`PostsFirehoseEnStream`](#postsfirehoseenstream) | `GET /2/tweets/firehose/stream/lang/en` | Streaming | Stream English Posts | +| [`PostsFirehoseJaStream`](#postsfirehosejastream) | `GET /2/tweets/firehose/stream/lang/ja` | Streaming | Stream Japanese Posts | +| [`PostsFirehoseKoStream`](#postsfirehosekostream) | `GET /2/tweets/firehose/stream/lang/ko` | Streaming | Stream Korean Posts | +| [`PostsFirehosePtStream`](#postsfirehoseptstream) | `GET /2/tweets/firehose/stream/lang/pt` | Streaming | Stream Portuguese Posts | +| [`PostsSampleStream`](#postssamplestream) | `GET /2/tweets/sample/stream` | Streaming | Stream Sampled Posts | +| [`PostsSample10Stream`](#postssample10stream) | `GET /2/tweets/sample10/stream` | Streaming | Stream 10% Sampled Posts | +| [`UpdateRulesAsync`](#updaterulesasync) | `POST /2/tweets/search/stream/rules` | Standard | Update Stream Rules | +| [`UsersComplianceStream`](#userscompliancestream) | `GET /2/users/compliance/stream` | Streaming | Stream Users Compliance Data | + +## `ActivityStream` + +GET `/2/activity/stream` Streaming + +**Activity Stream** + +Stream of X Activities + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.ActivityStream(); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the activities will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the activities will be provided. + + + + +**Returns:** `Task>` + +--- + +## `GetRuleCountsAsync` + +GET `/2/tweets/search/stream/rules/counts` + +**Get Stream Rule Counts** + +Retrieves the count of rules in the active rule set for the filtered stream. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Stream.GetRuleCountsAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + `rules_count.fields` (query parameter). + + + + +**Returns:** `Task` + +--- + +## `GetRulesAsync` + +GET `/2/tweets/search/stream/rules` Paginated + +**Get Stream Rules** + +Returns the active filtered-stream rules for the authenticated app. Provide `ids` to fetch specific rules; omit it to list all rules. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Stream.GetRulesPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + `ids` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 8 bytes. + + + + +**Returns:** `Task` (use `GetRulesPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `LabelsComplianceStream` + +GET `/2/tweets/label/stream` Streaming + +**Stream Post Labels** + +Streams all labeling events applied to Posts. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.LabelsComplianceStream(); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. + + + + +**Returns:** `Task>` + +--- + +## `LikesComplianceStream` + +GET `/2/likes/compliance/stream` Streaming + +**Stream Likes Compliance Data** + +Streams all compliance data related to Likes for Users. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.LikesComplianceStream(); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided. + + + + +**Returns:** `Task>` + +--- + +## `LikesFirehoseStream` + +GET `/2/likes/firehose/stream` Streaming + +**Stream All Likes** + +Streams all public Likes in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.LikesFirehoseStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of LikeWithTweetAuthor fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Tweet fields to display. + + + + +**Returns:** `Task>` + +--- + +## `LikesSample10Stream` + +GET `/2/likes/sample10/stream` Streaming + +**Stream Sampled Likes** + +Streams a 10% sample of public Likes in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.LikesSample10Stream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of LikeWithTweetAuthor fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Tweet fields to display. + + + + +**Returns:** `Task>` + +--- + +## `PostsStream` + +GET `/2/tweets/search/stream` Streaming + +**Stream Filtered Posts** + +Streams Posts in real-time matching the active rule set. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsStream(); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task>` + +--- + +## `PostsComplianceStream` + +GET `/2/tweets/compliance/stream` Streaming + +**Stream Posts Compliance Data** + +Streams all compliance data related to Posts. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsComplianceStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post Compliance events will be provided. + + + + +**Returns:** `Task>` + +--- + +## `PostsFirehoseStream` + +GET `/2/tweets/firehose/stream` Streaming + +**Stream All Posts** + +Streams all public Posts in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsFirehoseStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Task>` + +--- + +## `PostsFirehoseEnStream` + +GET `/2/tweets/firehose/stream/lang/en` Streaming + +**Stream English Posts** + +Streams all public English-language Posts in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsFirehoseEnStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Task>` + +--- + +## `PostsFirehoseJaStream` + +GET `/2/tweets/firehose/stream/lang/ja` Streaming + +**Stream Japanese Posts** + +Streams all public Japanese-language Posts in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsFirehoseJaStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Task>` + +--- + +## `PostsFirehoseKoStream` + +GET `/2/tweets/firehose/stream/lang/ko` Streaming + +**Stream Korean Posts** + +Streams all public Korean-language Posts in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsFirehoseKoStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Task>` + +--- + +## `PostsFirehosePtStream` + +GET `/2/tweets/firehose/stream/lang/pt` Streaming + +**Stream Portuguese Posts** + +Streams all public Portuguese-language Posts in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsFirehosePtStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Task>` + +--- + +## `PostsSampleStream` + +GET `/2/tweets/sample/stream` Streaming + +**Stream Sampled Posts** + +Streams a 1% sample of public Posts in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsSampleStream(); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task>` + +--- + +## `PostsSample10Stream` + +GET `/2/tweets/sample10/stream` Streaming + +**Stream 10% Sampled Posts** + +Streams a 10% sample of public Posts in real-time. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.PostsSample10Stream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Task>` + +--- + +## `UpdateRulesAsync` + +POST `/2/tweets/search/stream/rules` + +**Update Stream Rules** + +Adds or deletes rules from the active rule set for the filtered stream. Exactly one of `add`, `delete`, or `?delete_all=true` must be specified. Use `?dry_run=true` to validate without committing. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Stream.UpdateRulesAsync(new UpdateRulesRequest()); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + + + + + `dry_run` (query parameter). + + + + `delete_all` (query parameter). + + + + +**Returns:** `Task` + +--- + +## `UsersComplianceStream` + +GET `/2/users/compliance/stream` Streaming + +**Stream Users Compliance Data** + +Streams all compliance data related to Users. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await using var stream = await client.Stream.UsersComplianceStream(1); +await foreach (var item in stream) +{ + Console.WriteLine(item); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided. + + + + +**Returns:** `Task>` + +--- + diff --git a/xdks/csharp/reference/clients/trends.mdx b/xdks/csharp/reference/clients/trends.mdx new file mode 100644 index 000000000..f54a36e20 --- /dev/null +++ b/xdks/csharp/reference/clients/trends.mdx @@ -0,0 +1,129 @@ +--- +title: "TrendsClient (C# XDK)" +sidebarTitle: "Trends" +description: "C# XDK TrendsClient reference — 3 methods for X API v2 Trends endpoints." +--- + +Access **Trends** endpoints via `client.Trends` (`TrendsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`GetByWoeidAsync`](#getbywoeidasync) | `GET /2/trends/by/woeid/{woeid}` | Standard | Get Trends by WOEID | +| [`GetLocationsAsync`](#getlocationsasync) | `GET /2/trends/locations` | Standard | Get Trend Locations | +| [`GetPersonalizedAsync`](#getpersonalizedasync) | `GET /2/users/personalized_trends` | Standard | Get Personalized Trends | + +## `GetByWoeidAsync` + +GET `/2/trends/by/woeid/{woeid}` + +**Get Trends by WOEID** + +Retrieves trending topics for a specific location identified by its WOEID. `meta.location` describes that location: its `woeid` and `name`, and when they are known its `country`, `country_code`, `place_type` (`town`, `country` or `supername`) and `parent_id`, the WOEID of the place that contains it. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Trends.GetByWoeidAsync(1); +Console.WriteLine(response); +``` + +### Parameters + + + `woeid` (path parameter). + + + + + + `max_trends` (query parameter). + + + + A comma separated list of Trend fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetLocationsAsync` + +GET `/2/trends/locations` + +**Get Trend Locations** + +Retrieves every location that has trends. Each location has a WOEID to pass to `GET /2/trends/by/woeid/{woeid}`. The list is short and is returned whole, so the route takes no paging parameters. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Trends.GetLocationsAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + A comma separated list of TrendLocation fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetPersonalizedAsync` + +GET `/2/users/personalized_trends` + +**Get Personalized Trends** + +Retrieves personalized trending topics for the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Trends.GetPersonalizedAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + A comma separated list of PersonalizedTrend fields to display. + + + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/usage.mdx b/xdks/csharp/reference/clients/usage.mdx new file mode 100644 index 000000000..9a64b7474 --- /dev/null +++ b/xdks/csharp/reference/clients/usage.mdx @@ -0,0 +1,79 @@ +--- +title: "UsageClient (C# XDK)" +sidebarTitle: "Usage" +description: "C# XDK UsageClient reference — 2 methods for X API v2 Usage endpoints." +--- + +Access **Usage** endpoints via `client.Usage` (`UsageClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`GetAsync`](#getasync) | `GET /2/usage/tweets` | Standard | Get Usage | +| [`GetCreditsAsync`](#getcreditsasync) | `GET /2/usage/credits` | Standard | Get Usage Credits | + +## `GetAsync` + +GET `/2/usage/tweets` + +**Get Usage** + +Retrieves usage statistics for Posts over a specified number of days. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Usage.GetAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + `days` (query parameter). + + + + A comma separated list of Usage fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetCreditsAsync` + +GET `/2/usage/credits` + +**Get Usage Credits** + +Returns the payer's developer-platform credit balance in USD. total_balance is max(0, prepaid_balance + free_balance); prepaid_balance may be negative. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Usage.GetCreditsAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/users.mdx b/xdks/csharp/reference/clients/users.mdx new file mode 100644 index 000000000..a937dd928 --- /dev/null +++ b/xdks/csharp/reference/clients/users.mdx @@ -0,0 +1,2291 @@ +--- +title: "UsersClient (C# XDK)" +sidebarTitle: "Users" +description: "C# XDK UsersClient reference — 46 methods for X API v2 Users endpoints." +--- + +Access **Users** endpoints via `client.Users` (`UsersClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`BlockDmsAsync`](#blockdmsasync) | `POST /2/users/{id}/dm/block` | Standard | Block DMs | +| [`CreateBookmarkAsync`](#createbookmarkasync) | `POST /2/users/{id}/bookmarks` | Standard | Create Bookmark | +| [`CreateBookmarkFolderAsync`](#createbookmarkfolderasync) | `POST /2/users/{id}/bookmarks/folders` | Standard | Create Bookmark Folder | +| [`DeleteBookmarkAsync`](#deletebookmarkasync) | `DELETE /2/users/{id}/bookmarks/{tweet_id}` | Standard | Delete Bookmark | +| [`FollowListAsync`](#followlistasync) | `POST /2/users/{id}/followed_lists` | Standard | Follow List | +| [`FollowUserAsync`](#followuserasync) | `POST /2/users/{id}/following` | Standard | Follow User | +| [`GetAffiliatesAsync`](#getaffiliatesasync) | `GET /2/users/{id}/affiliates` | Paginated | Get Affiliates | +| [`GetBlockingAsync`](#getblockingasync) | `GET /2/users/{id}/blocking` | Paginated | Get Blocked Users | +| [`GetBookmarkFoldersAsync`](#getbookmarkfoldersasync) | `GET /2/users/{id}/bookmarks/folders` | Paginated | Get Bookmark Folders | +| [`GetBookmarksAsync`](#getbookmarksasync) | `GET /2/users/{id}/bookmarks` | Paginated | Get Bookmarks | +| [`GetBookmarksByFolderIdAsync`](#getbookmarksbyfolderidasync) | `GET /2/users/{id}/bookmarks/folders/{folder_id}` | Paginated | Get Bookmarks by Folder ID | +| [`GetByIdAsync`](#getbyidasync) | `GET /2/users/{id}` | Standard | Get User by ID | +| [`GetByIdsAsync`](#getbyidsasync) | `GET /2/users` | Standard | Get Users by IDs | +| [`GetByUsernameAsync`](#getbyusernameasync) | `GET /2/users/by/username/{username}` | Standard | Get User by Username | +| [`GetByUsernamesAsync`](#getbyusernamesasync) | `GET /2/users/by` | Standard | Get Users by Usernames | +| [`GetFollowedListsAsync`](#getfollowedlistsasync) | `GET /2/users/{id}/followed_lists` | Paginated | Get Followed Lists | +| [`GetFollowersAsync`](#getfollowersasync) | `GET /2/users/{id}/followers` | Paginated | Get Followers | +| [`GetFollowingAsync`](#getfollowingasync) | `GET /2/users/{id}/following` | Paginated | Get Following | +| [`GetLikedPostsAsync`](#getlikedpostsasync) | `GET /2/users/{id}/liked_tweets` | Paginated | Get Liked Posts | +| [`GetListMembershipsAsync`](#getlistmembershipsasync) | `GET /2/users/{id}/list_memberships` | Paginated | Get List Memberships | +| [`GetMeAsync`](#getmeasync) | `GET /2/users/me` | Standard | Get My User | +| [`GetMeFollowersAsync`](#getmefollowersasync) | `GET /2/users/me/followers` | Paginated | Get the Authenticated User's Followers | +| [`GetMeFollowingAsync`](#getmefollowingasync) | `GET /2/users/me/following` | Paginated | Get the Users the Authenticated User Follows | +| [`GetMentionsAsync`](#getmentionsasync) | `GET /2/users/{id}/mentions` | Paginated | Get Mentions | +| [`GetMutingAsync`](#getmutingasync) | `GET /2/users/{id}/muting` | Paginated | Get Muting | +| [`GetOwnedListsAsync`](#getownedlistsasync) | `GET /2/users/{id}/owned_lists` | Paginated | Get Owned Lists | +| [`GetPinnedListsAsync`](#getpinnedlistsasync) | `GET /2/users/{id}/pinned_lists` | Standard | Get Pinned Lists | +| [`GetPostsAsync`](#getpostsasync) | `GET /2/users/{id}/tweets` | Paginated | Get Posts | +| [`GetPublicKeyAsync`](#getpublickeyasync) | `GET /2/users/{id}/public_keys` | Standard | Get User Public Keys | +| [`GetPublicKeysAsync`](#getpublickeysasync) | `GET /2/users/public_keys` | Standard | Get Public Keys for Multiple Users | +| [`GetRepostsOfMeAsync`](#getrepostsofmeasync) | `GET /2/users/reposts_of_me` | Paginated | Get Reposts of Me | +| [`GetTimelineAsync`](#gettimelineasync) | `GET /2/users/{id}/timelines/reverse_chronological` | Paginated | Get Timeline | +| [`IdBlockAsync`](#idblockasync) | `POST /2/users/{id}/blocking` | Standard | Block User | +| [`IdUnblockAsync`](#idunblockasync) | `DELETE /2/users/{source_user_id}/blocking/{target_user_id}` | Standard | Unblock User | +| [`LikePostAsync`](#likepostasync) | `POST /2/users/{id}/likes` | Standard | Like Post | +| [`MuteUserAsync`](#muteuserasync) | `POST /2/users/{id}/muting` | Standard | Mute User | +| [`PinListAsync`](#pinlistasync) | `POST /2/users/{id}/pinned_lists` | Standard | Pin List | +| [`RepostPostAsync`](#repostpostasync) | `POST /2/users/{id}/retweets` | Standard | Repost Post | +| [`SearchAsync`](#searchasync) | `GET /2/users/search` | Paginated | Search Users | +| [`UnblockDmsAsync`](#unblockdmsasync) | `POST /2/users/{id}/dm/unblock` | Standard | Unblock DMs | +| [`UnfollowListAsync`](#unfollowlistasync) | `DELETE /2/users/{id}/followed_lists/{list_id}` | Standard | Unfollow List | +| [`UnfollowUserAsync`](#unfollowuserasync) | `DELETE /2/users/{source_user_id}/following/{target_user_id}` | Standard | Unfollow User | +| [`UnlikePostAsync`](#unlikepostasync) | `DELETE /2/users/{id}/likes/{tweet_id}` | Standard | Unlike Post | +| [`UnmuteUserAsync`](#unmuteuserasync) | `DELETE /2/users/{source_user_id}/muting/{target_user_id}` | Standard | Unmute User | +| [`UnpinListAsync`](#unpinlistasync) | `DELETE /2/users/{id}/pinned_lists/{list_id}` | Standard | Unpin List | +| [`UnrepostPostAsync`](#unrepostpostasync) | `DELETE /2/users/{id}/retweets/{source_tweet_id}` | Standard | Unrepost Post | + +## `BlockDmsAsync` + +POST `/2/users/{id}/dm/block` + +**Block DMs** + +Blocks direct messages to or from a specific User by their ID for the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.BlockDmsAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `CreateBookmarkAsync` + +POST `/2/users/{id}/bookmarks` + +**Create Bookmark** + +Adds one or more Posts to the authenticated user's Bookmarks. Supply `tweet_id` for a single Post, or `tweet_ids` (at most 25) to bookmark several in one request. Optional `folder_id` applies to every Post in the request. Billing and rate limits still apply per HTTP request. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.CreateBookmarkAsync( + "2244994945", + new CreateUsersBookmarkRequest { TweetId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + At least one of `tweet_id`, `tweet_ids` is required. + + +**Returns:** `Task` + +--- + +## `CreateBookmarkFolderAsync` + +POST `/2/users/{id}/bookmarks/folders` + +**Create Bookmark Folder** + +Creates a new Bookmark folder for the authenticated user. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.CreateBookmarkFolderAsync( + "2244994945", + new CreateUsersBookmarkFolderRequest { Name = "My List" } +); +Console.WriteLine(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteBookmarkAsync` + +DELETE `/2/users/{id}/bookmarks/{tweet_id}` + +**Delete Bookmark** + +Removes a Post from the authenticated user's Bookmarks by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.DeleteBookmarkAsync("2244994945", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `tweet_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `FollowListAsync` + +POST `/2/users/{id}/followed_lists` + +**Follow List** + +Causes the authenticated user to follow a specific List by its ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.FollowListAsync( + "2244994945", + new FollowListRequest { ListId = "1450000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `FollowUserAsync` + +POST `/2/users/{id}/following` + +**Follow User** + +Causes the authenticated user to follow a specific User by their ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.FollowUserAsync("2244994945", new FollowUserRequest { TargetUserId = "2244994945" }); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `GetAffiliatesAsync` + +GET `/2/users/{id}/affiliates` Paginated + +**Get Affiliates** + +Retrieves a list of Users who are affiliated with a specific organization User by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetAffiliatesPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetAffiliatesPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetBlockingAsync` + +GET `/2/users/{id}/blocking` Paginated + +**Get Blocked Users** + +Returns the Users that the given User is blocking. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetBlockingPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetBlockingPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetBookmarkFoldersAsync` + +GET `/2/users/{id}/bookmarks/folders` Paginated + +**Get Bookmark Folders** + +Retrieves a list of Bookmark folders created by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetBookmarkFoldersPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Task` (use `GetBookmarkFoldersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetBookmarksAsync` + +GET `/2/users/{id}/bookmarks` Paginated + +**Get Bookmarks** + +Retrieves a list of Posts bookmarked by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetBookmarksPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetBookmarksPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetBookmarksByFolderIdAsync` + +GET `/2/users/{id}/bookmarks/folders/{folder_id}` Paginated + +**Get Bookmarks by Folder ID** + +Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetBookmarksByFolderIdPages("2244994945", "1895000000000000000")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `folder_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Task` (use `GetBookmarksByFolderIdPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetByIdAsync` + +GET `/2/users/{id}` + +**Get User by ID** + +Retrieves details of a specific User by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Users.GetByIdAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByIdsAsync` + +GET `/2/users` + +**Get Users by IDs** + +Retrieves details of multiple Users by their IDs. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Users.GetByIdsAsync(new List { "2244994945" }); +Console.WriteLine(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByUsernameAsync` + +GET `/2/users/by/username/{username}` + +**Get User by Username** + +Retrieves details of a specific User by their username. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Users.GetByUsernameAsync("XDevelopers"); +Console.WriteLine(response); +``` + +### Parameters + + + `username` (path parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetByUsernamesAsync` + +GET `/2/users/by` + +**Get Users by Usernames** + +Retrieves details of multiple Users by their usernames. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Users.GetByUsernamesAsync(new List { "XDevelopers" }); +Console.WriteLine(response); +``` + +### Parameters + + + `usernames` (query parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetFollowedListsAsync` + +GET `/2/users/{id}/followed_lists` Paginated + +**Get Followed Lists** + +Retrieves a list of Lists followed by a specific User by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetFollowedListsPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` (use `GetFollowedListsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetFollowersAsync` + +GET `/2/users/{id}/followers` Paginated + +**Get Followers** + +Retrieves a list of Users who follow a specific User by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetFollowersPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetFollowersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetFollowingAsync` + +GET `/2/users/{id}/following` Paginated + +**Get Following** + +Retrieves a list of Users followed by a specific User by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetFollowingPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetFollowingPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetLikedPostsAsync` + +GET `/2/users/{id}/liked_tweets` Paginated + +**Get Liked Posts** + +Retrieves a list of Posts liked by a specific User by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetLikedPostsPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetLikedPostsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetListMembershipsAsync` + +GET `/2/users/{id}/list_memberships` Paginated + +**Get List Memberships** + +Retrieves a list of Lists that a specific User is a member of by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetListMembershipsPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` (use `GetListMembershipsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetMeAsync` + +GET `/2/users/me` + +**Get My User** + +Retrieves details of the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.GetMeAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetMeFollowersAsync` + +GET `/2/users/me/followers` Paginated + +**Get the Authenticated User's Followers** + +Returns the Users who follow the authenticated user. Same results as `GET /2/users/{id}/followers` with your own user ID, without looking it up. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetMeFollowersPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetMeFollowersPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetMeFollowingAsync` + +GET `/2/users/me/following` Paginated + +**Get the Users the Authenticated User Follows** + +Returns the Users the authenticated user follows. Same results as `GET /2/users/{id}/following` with your own user ID, without looking it up. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetMeFollowingPages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetMeFollowingPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetMentionsAsync` + +GET `/2/users/{id}/mentions` Paginated + +**Get Mentions** + +Retrieves a list of Posts that mention a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetMentionsPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetMentionsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetMutingAsync` + +GET `/2/users/{id}/muting` Paginated + +**Get Muting** + +Retrieves a list of Users muted by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetMutingPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `GetMutingPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetOwnedListsAsync` + +GET `/2/users/{id}/owned_lists` Paginated + +**Get Owned Lists** + +Retrieves a list of Lists owned by a specific User by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetOwnedListsPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` (use `GetOwnedListsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetPinnedListsAsync` + +GET `/2/users/{id}/pinned_lists` + +**Get Pinned Lists** + +Retrieves a list of Lists pinned by the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.GetPinnedListsAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetPostsAsync` + +GET `/2/users/{id}/tweets` Paginated + +**Get Posts** + +Retrieves a list of Posts authored by a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.GetPostsPages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetPostsPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetPublicKeyAsync` + +GET `/2/users/{id}/public_keys` + +**Get User Public Keys** + +Returns a user's registered public keys for X Chat encryption. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version and juicebox_config. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.GetPublicKeyAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + Numeric user ID, not `me`. For your own keys, use the `id` from Get My User (`GET /2/users/me`). + + + + + + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetPublicKeysAsync` + +GET `/2/users/public_keys` + +**Get Public Keys for Multiple Users** + +Returns the public keys that up to 100 users registered for X Chat encryption, looked up by numeric user ID. Each key carries the user_id of the user it belongs to. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version, juicebox_config and user_id. + +```csharp +using System; +using System.Collections.Generic; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.GetPublicKeysAsync(new List { "2244994945" }); +Console.WriteLine(response); +``` + +### Parameters + + + Comma-separated numeric user IDs (1-100), not @usernames. + + + + + + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetRepostsOfMeAsync` + +GET `/2/users/reposts_of_me` Paginated + +**Get Reposts of Me** + +Retrieves a list of Posts that repost content from the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetRepostsOfMePages()) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetRepostsOfMePages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `GetTimelineAsync` + +GET `/2/users/{id}/timelines/reverse_chronological` Paginated + +**Get Timeline** + +Retrieves a reverse chronological list of Posts in the authenticated user's Timeline. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +await foreach (var page in client.Users.GetTimelinePages("2244994945")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Task` (use `GetTimelinePages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `IdBlockAsync` + +POST `/2/users/{id}/blocking` + +**Block User** + +Causes the source User to block the target User. A block also removes any follow between the two Users, in both directions, and unblocking does not restore it. Each call blocks one account: block only accounts the authenticated User named or approved, because finding or reviewing accounts is not approval to block them. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.IdBlockAsync( + "2244994945", + new UsersIdBlockRequest { TargetUserId = "2244994945" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `IdUnblockAsync` + +DELETE `/2/users/{source_user_id}/blocking/{target_user_id}` + +**Unblock User** + +Causes the source User to unblock the target User. Unblocking does not restore any follow the block removed, so blocking and then unblocking a follower removes them as a follower: do that only for followers the authenticated User approved removing. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.IdUnblockAsync("2244994945", "2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `LikePostAsync` + +POST `/2/users/{id}/likes` + +**Like Post** + +Causes the authenticated user to like a specific Post by its ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.LikePostAsync( + "2244994945", + new LikePostRequest { TweetId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `MuteUserAsync` + +POST `/2/users/{id}/muting` + +**Mute User** + +Causes the authenticated user to mute a specific User by their ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.MuteUserAsync("2244994945", new MuteUserRequest { TargetUserId = "2244994945" }); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `PinListAsync` + +POST `/2/users/{id}/pinned_lists` + +**Pin List** + +Causes the authenticated user to pin a specific List by its ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.PinListAsync("2244994945", new PinListRequest { ListId = "1450000000000000000" }); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `RepostPostAsync` + +POST `/2/users/{id}/retweets` + +**Repost Post** + +Causes the authenticated user to repost a specific Post by its ID. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.RepostPostAsync( + "2244994945", + new RepostPostRequest { TweetId = "1895000000000000000" } +); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Task` + +--- + +## `SearchAsync` + +GET `/2/users/search` Paginated + +**Search Users** + +Retrieves a list of Users matching a search query. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +await foreach (var page in client.Users.SearchPages("from:XDevelopers")) +{ + Console.WriteLine(page); +} +``` + +### Parameters + + + A name or @username (1-50 chars): letters and digits in any language, spaces, and _ ' . - @ & " + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Task` (use `SearchPages(...)` for `IAsyncEnumerable` page iteration) + +--- + +## `UnblockDmsAsync` + +POST `/2/users/{id}/dm/unblock` + +**Unblock DMs** + +Unblocks direct messages to or from a specific User by their ID for the authenticated user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.UnblockDmsAsync("2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UnfollowListAsync` + +DELETE `/2/users/{id}/followed_lists/{list_id}` + +**Unfollow List** + +Causes the authenticated user to unfollow a List by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.UnfollowListAsync("2244994945", "1450000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UnfollowUserAsync` + +DELETE `/2/users/{source_user_id}/following/{target_user_id}` + +**Unfollow User** + +Causes the authenticated user to unfollow a specific user by their ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.UnfollowUserAsync("2244994945", "2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UnlikePostAsync` + +DELETE `/2/users/{id}/likes/{tweet_id}` + +**Unlike Post** + +Causes the authenticated user to unlike a specific Post by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.UnlikePostAsync("2244994945", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `tweet_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UnmuteUserAsync` + +DELETE `/2/users/{source_user_id}/muting/{target_user_id}` + +**Unmute User** + +Causes the authenticated user to unmute the target user. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.UnmuteUserAsync("2244994945", "2244994945"); +Console.WriteLine(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UnpinListAsync` + +DELETE `/2/users/{id}/pinned_lists/{list_id}` + +**Unpin List** + +Causes the authenticated user to unpin a List by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.UnpinListAsync("2244994945", "1450000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `UnrepostPostAsync` + +DELETE `/2/users/{id}/retweets/{source_tweet_id}` + +**Unrepost Post** + +Causes the authenticated user to unrepost a specific Post by its ID. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + AccessToken = Environment.GetEnvironmentVariable("X_ACCESS_TOKEN"), +}); + +var response = await client.Users.UnrepostPostAsync("2244994945", "1895000000000000000"); +Console.WriteLine(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_tweet_id` (path parameter). + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/clients/webhooks.mdx b/xdks/csharp/reference/clients/webhooks.mdx new file mode 100644 index 000000000..c86bff426 --- /dev/null +++ b/xdks/csharp/reference/clients/webhooks.mdx @@ -0,0 +1,271 @@ +--- +title: "WebhooksClient (C# XDK)" +sidebarTitle: "Webhooks" +description: "C# XDK WebhooksClient reference — 8 methods for X API v2 Webhooks endpoints." +--- + +Access **Webhooks** endpoints via `client.Webhooks` (`WebhooksClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`CreateAsync`](#createasync) | `POST /2/webhooks` | Standard | Create Webhook | +| [`CreateStreamLinkAsync`](#createstreamlinkasync) | `POST /2/tweets/search/webhooks/{webhook_id}` | Standard | Create Stream Link | +| [`CreateWebhookReplayJobAsync`](#createwebhookreplayjobasync) | `POST /2/webhooks/replay` | Standard | Create Replay Job for Webhook | +| [`DeleteAsync`](#deleteasync) | `DELETE /2/webhooks/{webhook_id}` | Standard | Delete Webhook | +| [`DeleteStreamLinkAsync`](#deletestreamlinkasync) | `DELETE /2/tweets/search/webhooks/{webhook_id}` | Standard | Delete Stream Link | +| [`GetAsync`](#getasync) | `GET /2/webhooks` | Standard | Get Webhook | +| [`GetStreamLinksAsync`](#getstreamlinksasync) | `GET /2/tweets/search/webhooks` | Standard | Get Stream Links | +| [`ValidateAsync`](#validateasync) | `PUT /2/webhooks/{webhook_id}` | Standard | Validate Webhook | + +## `CreateAsync` + +POST `/2/webhooks` + +**Create Webhook** + +Creates a new webhook configuration. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.CreateAsync(new CreateWebhooksRequest { Url = "https://example.com/webhook" }); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `CreateStreamLinkAsync` + +POST `/2/tweets/search/webhooks/{webhook_id}` + +**Create Stream Link** + +Creates a link to deliver FilteredStream events to the given webhook. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.CreateStreamLinkAsync("1234567890"); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `CreateWebhookReplayJobAsync` + +POST `/2/webhooks/replay` + +**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. + +```csharp +using System; +using Xdk; +using Xdk.Models; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.CreateWebhookReplayJobAsync( + new CreateWebhookReplayJobRequest { WebhookId = "1234567890", FromDate = "example", ToDate = "example" } +); +Console.WriteLine(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Task` + +--- + +## `DeleteAsync` + +DELETE `/2/webhooks/{webhook_id}` + +**Delete Webhook** + +Deletes an existing webhook configuration. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.DeleteAsync("1234567890"); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `DeleteStreamLinkAsync` + +DELETE `/2/tweets/search/webhooks/{webhook_id}` + +**Delete Stream Link** + +Deletes the link delivering FilteredStream events to the given webhook. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.DeleteStreamLinkAsync("1234567890"); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Task` + +--- + +## `GetAsync` + +GET `/2/webhooks` + +**Get Webhook** + +Get a list of webhook configs associated with a client app. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.GetAsync(); +Console.WriteLine(response); +``` + +### Parameters + + + + + A comma separated list of WebhookConfig fields to display. + + + + +**Returns:** `Task` + +--- + +## `GetStreamLinksAsync` + +GET `/2/tweets/search/webhooks` + +**Get Stream Links** + +Get a list of webhook links associated with a filtered stream ruleset. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.GetStreamLinksAsync(); +Console.WriteLine(response); +``` + +**Returns:** `Task` + +--- + +## `ValidateAsync` + +PUT `/2/webhooks/{webhook_id}` + +**Validate Webhook** + +Triggers a CRC check for a given webhook. + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Webhooks.ValidateAsync("1234567890"); +Console.WriteLine(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Task` + +--- + diff --git a/xdks/csharp/reference/overview.mdx b/xdks/csharp/reference/overview.mdx new file mode 100644 index 000000000..c3a684e68 --- /dev/null +++ b/xdks/csharp/reference/overview.mdx @@ -0,0 +1,79 @@ +--- +title: "C# XDK API Reference" +sidebarTitle: "Overview" +description: "Complete API reference for the official C# XDK (XDevPlatform.Xdk v0.1.2) across all X API v2 resource clients." +--- + +The official **C# XDK** (`XDevPlatform.Xdk`, `v0.1.2`) provides typed resource clients, authentication helpers, automatic pagination, and real-time streaming for the X API v2. + + + + Install `XDevPlatform.Xdk` (`v0.1.2`) — requires .NET 8.0+. + + + Source code, release notes, and issue tracker for `XDevPlatform.Xdk`. + + + +## Installation + +```bash +dotnet add package XDevPlatform.Xdk +``` + +## `XClient` Initialization + +```csharp +using System; +using Xdk; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); +``` + + + OAuth 2.0 Bearer Token for app-only endpoints. + + + OAuth 2.0 user-context access token. + + + `OAuth2Pkce` instance supporting PKCE code exchange and token refresh. + + + `OAuth1` instance for OAuth 1.0a HMAC-SHA1 signing. + + + Base URL for X API requests (`XClient` implements `IDisposable`). + + +## Resource Clients + +| Resource | Accessor | Client Class | Operations | +| :--- | :--- | :--- | ---: | +| [Account](/xdks/csharp/reference/clients/account) | `client.Account` | `AccountClient` | 2 | +| [Account Activity](/xdks/csharp/reference/clients/account-activity) | `client.AccountActivity` | `AccountActivityClient` | 5 | +| [Activity](/xdks/csharp/reference/clients/activity) | `client.Activity` | `ActivityClient` | 5 | +| [Articles](/xdks/csharp/reference/clients/articles) | `client.Articles` | `ArticlesClient` | 2 | +| [Bots](/xdks/csharp/reference/clients/bots) | `client.Bots` | `BotsClient` | 6 | +| [Broadcasts](/xdks/csharp/reference/clients/broadcasts) | `client.Broadcasts` | `BroadcastsClient` | 41 | +| [Calls](/xdks/csharp/reference/clients/calls) | `client.Calls` | `CallsClient` | 10 | +| [Chat](/xdks/csharp/reference/clients/chat) | `client.Chat` | `ChatClient` | 45 | +| [Communities](/xdks/csharp/reference/clients/communities) | `client.Communities` | `CommunitiesClient` | 2 | +| [Community Notes](/xdks/csharp/reference/clients/community-notes) | `client.CommunityNotes` | `CommunityNotesClient` | 5 | +| [Compliance](/xdks/csharp/reference/clients/compliance) | `client.Compliance` | `ComplianceClient` | 6 | +| [Connections](/xdks/csharp/reference/clients/connections) | `client.Connections` | `ConnectionsClient` | 4 | +| [Direct Messages](/xdks/csharp/reference/clients/direct-messages) | `client.DirectMessages` | `DirectMessagesClient` | 9 | +| [General](/xdks/csharp/reference/clients/general) | `client.General` | `GeneralClient` | 1 | +| [Lists](/xdks/csharp/reference/clients/lists) | `client.Lists` | `ListsClient` | 9 | +| [Media](/xdks/csharp/reference/clients/media) | `client.Media` | `MediaClient` | 19 | +| [News](/xdks/csharp/reference/clients/news) | `client.News` | `NewsClient` | 2 | +| [Posts](/xdks/csharp/reference/clients/posts) | `client.Posts` | `PostsClient` | 17 | +| [Spaces](/xdks/csharp/reference/clients/spaces) | `client.Spaces` | `SpacesClient` | 6 | +| [Stream](/xdks/csharp/reference/clients/stream) | `client.Stream` | `StreamClient` | 18 | +| [Trends](/xdks/csharp/reference/clients/trends) | `client.Trends` | `TrendsClient` | 3 | +| [Usage](/xdks/csharp/reference/clients/usage) | `client.Usage` | `UsageClient` | 2 | +| [Users](/xdks/csharp/reference/clients/users) | `client.Users` | `UsersClient` | 46 | +| [Webhooks](/xdks/csharp/reference/clients/webhooks) | `client.Webhooks` | `WebhooksClient` | 8 | diff --git a/xdks/csharp/streaming.mdx b/xdks/csharp/streaming.mdx new file mode 100644 index 000000000..c633fdfd6 --- /dev/null +++ b/xdks/csharp/streaming.mdx @@ -0,0 +1,59 @@ +--- +title: C# Streaming +sidebarTitle: Streaming +description: Consume real-time X API v2 streams in C# using EventStream (IAsyncEnumerable and IAsyncDisposable) with automatic reconnection. +--- + +Streaming endpoints on `client.Stream` return `EventStream`, which implements both `IAsyncEnumerable` and `IAsyncDisposable`. Use `await using` together with `await foreach` to consume events in real time and release the HTTP connection cleanly when done. + +## Consuming Filtered & Sampled Streams + +```csharp +using System; +using System.Collections.Generic; +using System.Threading; +using Xdk; +using Xdk.Clients; + +using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(5)); +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var options = new StreamClient.PostsOptions +{ + TweetFields = new List { "created_at", "author_id", "public_metrics" }, +}; + +await using var stream = await client.Stream.PostsStream(options, cts.Token); +int received = 0; +await foreach (var item in stream.WithCancellation(cts.Token)) +{ + Console.WriteLine(item.Data); + if (++received >= 25) + { + break; + } +} +``` + +## Managing Filtered Stream Rules + +Add or remove rules using `client.Stream.UpdateRulesAsync(...)` and inspect active rules with `client.Stream.GetRulesPages()`: + +```csharp +using System.Text.Json; + +using var addDoc = JsonDocument.Parse( + """{"add":[{"value":"from:XDevelopers -is:retweet","tag":"xdevs"}]}""" +); +await client.Stream.UpdateRulesAsync(addDoc.RootElement); + +await foreach (var page in client.Stream.GetRulesPages()) +{ + Console.WriteLine(page.Data); +} +``` + +See [Build a Rule](/x-api/posts/filtered-stream/integrate/build-a-rule) for the full Filtered Stream operator reference. diff --git a/xdks/java/authentication.mdx b/xdks/java/authentication.mdx new file mode 100644 index 000000000..da24dd9d2 --- /dev/null +++ b/xdks/java/authentication.mdx @@ -0,0 +1,92 @@ +--- +title: Java Authentication +sidebarTitle: Authentication +description: Authenticate the Java XDK (com.x:xdk) using Bearer Tokens, OAuth 2.0 PKCE with token refresh, or OAuth 1.0a user context. +--- + +`XClient` supports all three X API v2 authentication modes: + +1. **Bearer Token (App-Only)** — Public read, search, and filtered/sample streaming endpoints. +2. **OAuth 2.0 User Context with PKCE** — Scoped user-authorized calls (`POST /2/tweets`, bookmarks, DMs, X Chat) with refresh token support. +3. **OAuth 1.0a User Context** — HMAC-SHA1 request signing. + +## 1. Bearer Token (App-Only) + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var user = client.users().getByUsername("XDevelopers"); +``` + +## 2. OAuth 2.0 User Context with PKCE + +If you already hold an OAuth 2.0 user access token: + +```java +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var me = client.users().getMe(); +``` + +To run the full RFC 7636 PKCE authorization flow and enable token refresh via `OAuth2Pkce`: + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import com.x.xdk.auth.OAuth2Pkce; +import com.x.xdk.auth.OAuth2Token; +import java.util.List; + +OAuth2Pkce oauth2 = new OAuth2Pkce( + System.getenv("X_CLIENT_ID"), + System.getenv("X_CLIENT_SECRET"), // null for public clients + "http://localhost:8080/callback", + List.of("tweet.read", "tweet.write", "users.read", "offline.access") +); + +// 1. Redirect the user to authorize your app +String authorizationUrl = oauth2.getAuthorizationUrl("random-csrf-state"); + +// 2. Exchange the callback `code` parameter for tokens +OAuth2Token token = oauth2.exchangeCode(callbackCode); + +// 3. Build XClient attached to the OAuth2Pkce manager +XClient client = XClient.builder() + .oauth2(oauth2) + .build(); + +Schemas.CreatePostsResponse created = client.posts().create( + new Schemas.CreatePostsRequest().text("Hello from Java XDK!") +); + +// Refresh tokens explicitly when needed (requires offline.access scope) +client.refreshToken(); +``` + +## 3. OAuth 1.0a User Context + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import com.x.xdk.auth.OAuth1; + +OAuth1 oauth1 = new OAuth1( + System.getenv("X_API_KEY"), + System.getenv("X_API_SECRET"), + "oob", + System.getenv("X_ACCESS_TOKEN"), + System.getenv("X_ACCESS_TOKEN_SECRET") +); + +XClient client = XClient.builder() + .oauth1(oauth1) + .build(); + +Schemas.GetUsersMeResponse me = client.users().getMe(); +``` diff --git a/xdks/java/install.mdx b/xdks/java/install.mdx new file mode 100644 index 000000000..6e28b1406 --- /dev/null +++ b/xdks/java/install.mdx @@ -0,0 +1,52 @@ +--- +title: Install Java XDK +sidebarTitle: Install +description: Add the official Java XDK (com.x:xdk) to your Maven or Gradle project for Java 17+ and Kotlin. +--- + +Install `com.x:xdk` from [Maven Central](https://central.sonatype.com/artifact/com.x/xdk). + +## Prerequisites + +- **JDK 17+** (tested on JDK 17 and JDK 21) +- Maven 3.8+ or Gradle 8+ + +## Add Dependency + + + +```xml Maven (pom.xml) + + com.x + xdk + 0.1.2 + +``` + +```kotlin Gradle (build.gradle.kts) +dependencies { + implementation("com.x:xdk:0.1.2") +} +``` + +```groovy Gradle (build.gradle) +dependencies { + implementation 'com.x:xdk:0.1.2' +} +``` + + + +## Build from Source + +```bash +git clone https://github.com/xdevplatform/xdk-java.git +cd xdk-java +mvn test +``` + +## Next Steps + +- [Quickstart](/xdks/java/quickstart) — Make your first request +- [Authentication](/xdks/java/authentication) — Configure Bearer Token, OAuth 2.0 PKCE, or OAuth 1.0a +- [API Reference](/xdks/java/reference/overview) — Explore all 24 resource clients diff --git a/xdks/java/llms.txt b/xdks/java/llms.txt new file mode 100644 index 000000000..3677f45f5 --- /dev/null +++ b/xdks/java/llms.txt @@ -0,0 +1,40 @@ +# Java XDK (`com.x:xdk` v0.1.2) + +> Official Java SDK for the X API v2 (Java 17+). Install with `implementation("com.x:xdk:0.1.2")`. + +## Guides + +- [Java overview](https://docs.x.com/xdks/java/overview.md): Architecture, capabilities, and client overview +- [Java install](https://docs.x.com/xdks/java/install.md): Package installation and runtime requirements +- [Java quickstart](https://docs.x.com/xdks/java/quickstart.md): First authenticated X API v2 request in under 2 minutes +- [Java authentication](https://docs.x.com/xdks/java/authentication.md): Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a user-context setup +- [Java pagination](https://docs.x.com/xdks/java/pagination.md): Automatic cursor iteration across multi-page endpoints +- [Java streaming](https://docs.x.com/xdks/java/streaming.md): Real-time event streams with reconnection and lifecycle handling + +## Client Reference + +- [Reference Overview](https://docs.x.com/xdks/java/reference/overview.md): Main client options and resource client directory +- [`AccountClient` (Account)](https://docs.x.com/xdks/java/reference/clients/account.md): 2 methods via `client.account()` +- [`AccountActivityClient` (Account Activity)](https://docs.x.com/xdks/java/reference/clients/account-activity.md): 5 methods via `client.accountActivity()` +- [`ActivityClient` (Activity)](https://docs.x.com/xdks/java/reference/clients/activity.md): 5 methods via `client.activity()` +- [`ArticlesClient` (Articles)](https://docs.x.com/xdks/java/reference/clients/articles.md): 2 methods via `client.articles()` +- [`BotsClient` (Bots)](https://docs.x.com/xdks/java/reference/clients/bots.md): 6 methods via `client.bots()` +- [`BroadcastsClient` (Broadcasts)](https://docs.x.com/xdks/java/reference/clients/broadcasts.md): 41 methods via `client.broadcasts()` +- [`CallsClient` (Calls)](https://docs.x.com/xdks/java/reference/clients/calls.md): 10 methods via `client.calls()` +- [`ChatClient` (Chat)](https://docs.x.com/xdks/java/reference/clients/chat.md): 45 methods via `client.chat()` +- [`CommunitiesClient` (Communities)](https://docs.x.com/xdks/java/reference/clients/communities.md): 2 methods via `client.communities()` +- [`CommunityNotesClient` (Community Notes)](https://docs.x.com/xdks/java/reference/clients/community-notes.md): 5 methods via `client.communityNotes()` +- [`ComplianceClient` (Compliance)](https://docs.x.com/xdks/java/reference/clients/compliance.md): 6 methods via `client.compliance()` +- [`ConnectionsClient` (Connections)](https://docs.x.com/xdks/java/reference/clients/connections.md): 4 methods via `client.connections()` +- [`DirectMessagesClient` (Direct Messages)](https://docs.x.com/xdks/java/reference/clients/direct-messages.md): 9 methods via `client.directMessages()` +- [`GeneralClient` (General)](https://docs.x.com/xdks/java/reference/clients/general.md): 1 methods via `client.general()` +- [`ListsClient` (Lists)](https://docs.x.com/xdks/java/reference/clients/lists.md): 9 methods via `client.lists()` +- [`MediaClient` (Media)](https://docs.x.com/xdks/java/reference/clients/media.md): 19 methods via `client.media()` +- [`NewsClient` (News)](https://docs.x.com/xdks/java/reference/clients/news.md): 2 methods via `client.news()` +- [`PostsClient` (Posts)](https://docs.x.com/xdks/java/reference/clients/posts.md): 17 methods via `client.posts()` +- [`SpacesClient` (Spaces)](https://docs.x.com/xdks/java/reference/clients/spaces.md): 6 methods via `client.spaces()` +- [`StreamClient` (Stream)](https://docs.x.com/xdks/java/reference/clients/stream.md): 18 methods via `client.stream()` +- [`TrendsClient` (Trends)](https://docs.x.com/xdks/java/reference/clients/trends.md): 3 methods via `client.trends()` +- [`UsageClient` (Usage)](https://docs.x.com/xdks/java/reference/clients/usage.md): 2 methods via `client.usage()` +- [`UsersClient` (Users)](https://docs.x.com/xdks/java/reference/clients/users.md): 46 methods via `client.users()` +- [`WebhooksClient` (Webhooks)](https://docs.x.com/xdks/java/reference/clients/webhooks.md): 8 methods via `client.webhooks()` diff --git a/xdks/java/overview.mdx b/xdks/java/overview.mdx new file mode 100644 index 000000000..60c73953d --- /dev/null +++ b/xdks/java/overview.mdx @@ -0,0 +1,71 @@ +--- +title: Java XDK +sidebarTitle: Overview +description: Official Java SDK (com.x:xdk) for the X API v2 targeting Java 17+, Kotlin, and JVM services with fluent builders, OAuth 2.0 PKCE, Paginator, and EventStream. +--- + +The **Java XDK** (`com.x:xdk`) is X's official JVM client library for the X API v2, generated directly from the [official OpenAPI specification](https://api.x.com/2/openapi.json) and published to Maven Central. + + + + `com.x:xdk:0.1.2` — Java 17+. + + + Source code, runnable examples, and issue tracker. + + + +## Key Features + +- **Modern JVM Design**: Built on `java.net.http.HttpClient` and Jackson (`com.fasterxml.jackson`) for Java 17+, Java 21 virtual threads, Kotlin, and Scala. +- **Fluent Builders**: Configure `XClient.builder()`, typed request models (`new Schemas.CreatePostsRequest().text("...")`), and per-endpoint `*Options.builder()`. +- **Authentication**: App-only Bearer Token, OAuth 2.0 User Context with PKCE (`OAuth2Pkce`) and automatic refresh, and OAuth 1.0a HMAC-SHA1 (`OAuth1`). +- **Lazy Cursor Pagination**: Every paginated operation exposes a `*Pages(...)` method returning `Paginator` (`Iterable`). +- **Resilient Streaming**: Streaming endpoints return `EventStream` (`Iterable` & `AutoCloseable`) with incremental UTF-8 line framing and exponential backoff reconnection. + +## Quick Example + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import com.x.xdk.clients.UsersClient; +import java.util.List; + +public class Example { + public static void main(String[] args) { + XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + + Schemas.GetUsersByUsernameResponse response = client.users().getByUsername( + "XDevelopers", + UsersClient.GetByUsernameOptions.builder() + .userFields(List.of("created_at", "public_metrics")) + ); + System.out.println(response.getData()); + } +} +``` + +## Guides & Reference + + + + Add `com.x:xdk` with Maven or Gradle. + + + Make your first X API v2 request in Java. + + + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a setup. + + + Iterate pages lazily with `Paginator`. + + + Consume live NDJSON streams with `EventStream`. + + + Full method & parameter reference for all 24 clients. + + diff --git a/xdks/java/pagination.mdx b/xdks/java/pagination.mdx new file mode 100644 index 000000000..c60e8321a --- /dev/null +++ b/xdks/java/pagination.mdx @@ -0,0 +1,60 @@ +--- +title: Java Pagination +sidebarTitle: Pagination +description: Automatically iterate paginated X API v2 endpoints in Java using Paginator and *Pages(...) methods. +--- + +Every paginated endpoint in the Java XDK exposes a companion `*Pages(...)` method returning `Paginator` (`Iterable`), which lazily fetches subsequent pages using `meta.next_token` as you iterate. + +## Automatic Pagination (`*Pages`) + +```java +import com.x.xdk.Paginator; +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import com.x.xdk.clients.PostsClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +Paginator pages = + client.posts().searchRecentPages( + "from:XDevelopers -is:retweet", + PostsClient.SearchRecentOptions.builder() + .maxResults(50) + .postFields(List.of("created_at", "public_metrics")) + ); + +int pageCount = 0; +for (Schemas.SearchPostsRecentResponse page : pages) { + if (page.getData() != null) { + System.out.println("Fetched " + page.getData().size() + " posts"); + } + if (++pageCount >= 5) { + break; // Stop early at any point; no extra HTTP requests are made + } +} +``` + +## Manual Cursor Control + +If you prefer to store and pass cursors across stateless HTTP requests, call the single-page method directly with `.paginationToken(...)`: + +```java +Schemas.SearchPostsRecentResponse firstPage = client.posts().searchRecent( + "from:XDevelopers", + PostsClient.SearchRecentOptions.builder().maxResults(25) +); + +String nextToken = firstPage.getMeta() != null ? firstPage.getMeta().getNextToken() : null; +if (nextToken != null) { + Schemas.SearchPostsRecentResponse secondPage = client.posts().searchRecent( + "from:XDevelopers", + PostsClient.SearchRecentOptions.builder() + .maxResults(25) + .paginationToken(nextToken) + ); +} +``` diff --git a/xdks/java/quickstart.mdx b/xdks/java/quickstart.mdx new file mode 100644 index 000000000..14b49ac20 --- /dev/null +++ b/xdks/java/quickstart.mdx @@ -0,0 +1,61 @@ +--- +title: Java Quickstart +sidebarTitle: Quickstart +description: Make your first X API v2 request in Java using com.x:xdk and an app-only Bearer Token. +--- + +Make your first authenticated X API v2 call with `com.x:xdk` in minutes. + + + +```xml + + com.x + xdk + 0.1.2 + +``` + + + Generate a **Bearer Token** in the [X Developer Console](https://console.x.com) and set it in your environment: + +```bash +export X_BEARER_TOKEN="your_bearer_token_here" +``` + + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import com.x.xdk.clients.PostsClient; +import java.util.List; + +public class Quickstart { + public static void main(String[] args) { + XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + + Schemas.GetUsersByUsernameResponse user = + client.users().getByUsername("XDevelopers"); + System.out.println("User: " + user.getData()); + + Schemas.SearchPostsRecentResponse posts = client.posts().searchRecent( + "from:XDevelopers -is:retweet", + PostsClient.SearchRecentOptions.builder() + .maxResults(10) + .postFields(List.of("created_at", "public_metrics")) + ); + System.out.println("Posts: " + posts.getData()); + } +} +``` + + + +## Next Steps + +- [Authentication](/xdks/java/authentication) — Act on behalf of users with OAuth 2.0 PKCE or OAuth 1.0a +- [Pagination](/xdks/java/pagination) — Iterate multi-page results with `Paginator` +- [Streaming](/xdks/java/streaming) — Subscribe to live streams with `EventStream` +- [Client Reference](/xdks/java/reference/overview) — Browse all 24 resource clients diff --git a/xdks/java/reference/clients/account-activity.mdx b/xdks/java/reference/clients/account-activity.mdx new file mode 100644 index 000000000..cb9336f1b --- /dev/null +++ b/xdks/java/reference/clients/account-activity.mdx @@ -0,0 +1,166 @@ +--- +title: "AccountActivityClient (Java XDK)" +sidebarTitle: "Account Activity" +description: "Java XDK AccountActivityClient reference — 5 methods for X API v2 Account Activity endpoints." +--- + +Access **Account Activity** endpoints via `client.accountActivity()` (`AccountActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createSubscription`](#createsubscription) | `POST /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Create Subscription | +| [`deleteSubscription`](#deletesubscription) | `DELETE /2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` | Standard | Delete Subscription | +| [`getSubscriptionCount`](#getsubscriptioncount) | `GET /2/account_activity/subscriptions/count` | Standard | Get Subscription Count | +| [`getSubscriptions`](#getsubscriptions) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` | Standard | Get Subscriptions | +| [`validateSubscription`](#validatesubscription) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Validate Subscription | + +## `createSubscription` + +POST `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Create Subscription** + +Creates an Account Activity subscription for the user and the given webhook. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.accountActivity().createSubscription("1234567890", new Schemas.CreateAccountActivitySubscriptionRequest()); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.CreateAccountActivitySubscriptionResponse` + +--- + +## `deleteSubscription` + +DELETE `/2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` + +**Delete Subscription** + +Deletes an Account Activity subscription for the given webhook and user ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.accountActivity().deleteSubscription("1234567890", "2244994945"); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `Schemas.DeleteAccountActivitySubscriptionResponse` + +--- + +## `getSubscriptionCount` + +GET `/2/account_activity/subscriptions/count` + +**Get Subscription Count** + +Retrieves a count of currently active Account Activity subscriptions. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.accountActivity().getSubscriptionCount(); +System.out.println(response); +``` + +**Returns:** `Schemas.GetAccountActivitySubscriptionCountResponse` + +--- + +## `getSubscriptions` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` + +**Get Subscriptions** + +Retrieves a list of all active subscriptions for a given webhook. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.accountActivity().getSubscriptions("1234567890"); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Schemas.GetAccountActivitySubscriptionsResponse` + +--- + +## `validateSubscription` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Validate Subscription** + +Checks a user's Account Activity subscription for a given webhook. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.accountActivity().validateSubscription("1234567890"); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Schemas.ValidateAccountActivitySubscriptionResponse` + +--- + diff --git a/xdks/java/reference/clients/account.mdx b/xdks/java/reference/clients/account.mdx new file mode 100644 index 000000000..fe76f05d2 --- /dev/null +++ b/xdks/java/reference/clients/account.mdx @@ -0,0 +1,68 @@ +--- +title: "AccountClient (Java XDK)" +sidebarTitle: "Account" +description: "Java XDK AccountClient reference — 2 methods for X API v2 Account endpoints." +--- + +Access **Account** endpoints via `client.account()` (`AccountClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`ensure`](#ensure) | `POST /2/account` | Standard | Ensure Developer Account | +| [`getDeveloper`](#getdeveloper) | `GET /2/account` | Standard | Get Developer Account | + +## `ensure` + +POST `/2/account` + +**Ensure Developer Account** + +Creates an X Developer Platform account for the authenticated user if they do not already have one, and returns it. Idempotent: when the user already has an account it is returned unchanged with `created` false. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.account().ensure(new Schemas.EnsureAccountRequest().metadata("example")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.EnsureAccountResponse` + +--- + +## `getDeveloper` + +GET `/2/account` + +**Get Developer Account** + +Returns the X Developer Platform account that is billed for the authenticated user's API access. A user with no such account gets a resource-not-found error entry. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.account().getDeveloper(); +System.out.println(response); +``` + +**Returns:** `Schemas.GetDeveloperAccountResponse` + +--- + diff --git a/xdks/java/reference/clients/activity.mdx b/xdks/java/reference/clients/activity.mdx new file mode 100644 index 000000000..47a59a20b --- /dev/null +++ b/xdks/java/reference/clients/activity.mdx @@ -0,0 +1,188 @@ +--- +title: "ActivityClient (Java XDK)" +sidebarTitle: "Activity" +description: "Java XDK ActivityClient reference — 5 methods for X API v2 Activity endpoints." +--- + +Access **Activity** endpoints via `client.activity()` (`ActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createSubscription`](#createsubscription) | `POST /2/activity/subscriptions` | Standard | Create X Activity Subscription | +| [`deleteSubscription`](#deletesubscription) | `DELETE /2/activity/subscriptions/{subscription_id}` | Standard | Delete X Activity Subscription | +| [`deleteSubscriptionsByIds`](#deletesubscriptionsbyids) | `DELETE /2/activity/subscriptions` | Standard | Delete X Activity Subscriptions by IDs | +| [`getSubscriptions`](#getsubscriptions) | `GET /2/activity/subscriptions` | Paginated | Get X Activity Subscriptions | +| [`updateSubscription`](#updatesubscription) | `PUT /2/activity/subscriptions/{subscription_id}` | Standard | Update X Activity Subscription | + +## `createSubscription` + +POST `/2/activity/subscriptions` + +**Create X Activity Subscription** + +Creates a subscription for an X activity event. OAuth2 user-context tokens must hold the scope matching the requested event_type: dm.read for chat.* and dm.* events, like.read for like.* events, mute.read for mute.* events, block.read for block.* events, follows.read for subscriptions.* events, and tweet.read for all other event types. Mute and block subscriptions are actor-only: filter.user_id must identify the authenticated user and direction is not supported. subscriptions.* events require a user-context token and filter.user_id must identify the authenticated user. Optional filter.qualifiers further narrow supported chat, follow, unfollow, like, subscriptions, and trends events. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.activity().createSubscription( + new Schemas.CreateActivitySubscriptionRequest().eventType("profile.update.bio") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateActivitySubscriptionResponse` + +--- + +## `deleteSubscription` + +DELETE `/2/activity/subscriptions/{subscription_id}` + +**Delete X Activity Subscription** + +Deletes a subscription for an X activity event + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.activity().deleteSubscription("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `subscription_id` (path parameter). + + +**Returns:** `Schemas.DeleteActivitySubscriptionResponse` + +--- + +## `deleteSubscriptionsByIds` + +DELETE `/2/activity/subscriptions` + +**Delete X Activity Subscriptions by IDs** + +Deletes multiple subscriptions for X activity events by their IDs + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.activity().deleteSubscriptionsByIds(List.of("1895000000000000000")); +System.out.println(response); +``` + +### Parameters + + + `ids` (query parameter). + + +**Returns:** `Schemas.DeleteActivitySubscriptionsByIdsResponse` + +--- + +## `getSubscriptions` + +GET `/2/activity/subscriptions` Paginated + +**Get X Activity Subscriptions** + +Get a list of active subscriptions for XAA. Optional user_id narrows the list to subscriptions whose filter.user_id matches; with a user-context token it must identify the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.activity().getSubscriptionsPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 9 bytes. + + + + Only return subscriptions whose filter.user_id matches. + + + + +**Returns:** `Schemas.GetActivitySubscriptionsResponse` (use `getSubscriptionsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `updateSubscription` + +PUT `/2/activity/subscriptions/{subscription_id}` + +**Update X Activity Subscription** + +Updates a subscription for an X activity event + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.activity().updateSubscription( + "1895000000000000000", + new Schemas.UpdateActivitySubscriptionRequest().tag("example") +); +System.out.println(response); +``` + +### Parameters + + + `subscription_id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateActivitySubscriptionResponse` + +--- + diff --git a/xdks/java/reference/clients/articles.mdx b/xdks/java/reference/clients/articles.mdx new file mode 100644 index 000000000..fe561f288 --- /dev/null +++ b/xdks/java/reference/clients/articles.mdx @@ -0,0 +1,74 @@ +--- +title: "ArticlesClient (Java XDK)" +sidebarTitle: "Articles" +description: "Java XDK ArticlesClient reference — 2 methods for X API v2 Articles endpoints." +--- + +Access **Articles** endpoints via `client.articles()` (`ArticlesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`articleCreateDraft`](#articlecreatedraft) | `POST /2/articles/draft` | Standard | Create Draft Article | +| [`articlePublish`](#articlepublish) | `POST /2/articles/{article_id}/publish` | Standard | Publish Article | + +## `articleCreateDraft` + +POST `/2/articles/draft` + +**Create Draft Article** + +Creates a new Article draft that can later be published. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.articles().articleCreateDraft(new Schemas.ArticleCreateDraftRequest().title("example")); +System.out.println(response); +``` + +### Parameters + + + Create a draft Article. + + +**Returns:** `Schemas.ArticleCreateDraftResponse` + +--- + +## `articlePublish` + +POST `/2/articles/{article_id}/publish` + +**Publish Article** + +Publishes a draft Article, making it publicly visible. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.articles().articlePublish("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `article_id` (path parameter). + + +**Returns:** `Schemas.ArticlePublishResponse` + +--- + diff --git a/xdks/java/reference/clients/bots.mdx b/xdks/java/reference/clients/bots.mdx new file mode 100644 index 000000000..4d68e3a45 --- /dev/null +++ b/xdks/java/reference/clients/bots.mdx @@ -0,0 +1,223 @@ +--- +title: "BotsClient (Java XDK)" +sidebarTitle: "Bots" +description: "Java XDK BotsClient reference — 6 methods for X API v2 Bots endpoints." +--- + +Access **Bots** endpoints via `client.bots()` (`BotsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createBot`](#createbot) | `POST /2/bots` | Standard | Create a Bot | +| [`deleteBot`](#deletebot) | `DELETE /2/bots/{id}` | Standard | Delete Bot | +| [`get`](#get) | `GET /2/bots` | Standard | Get Bots | +| [`revokeBotToken`](#revokebottoken) | `DELETE /2/bots/{id}/token` | Standard | Revoke Bot Token | +| [`rotateBotToken`](#rotatebottoken) | `POST /2/bots/{id}/token` | Standard | Rotate Bot Token | +| [`updateBot`](#updatebot) | `PUT /2/bots/{id}` | Standard | Update Bot | + +## `createBot` + +POST `/2/bots` + +**Create a Bot** + +Creates a bot account in the calling app's project and returns its bearer token. Idempotent on handle: repeating the request for a handle that already names one of the project's bots returns that bot with a freshly minted token, revoking the previous one — safe to retry when a response was lost, since the replaced token was never seen. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is created in the user's project instead; its token is still minted for the calling app. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.bots().createBot(new Schemas.CreateBotRequest().handle("example")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateBotResponse` + +--- + +## `deleteBot` + +DELETE `/2/bots/{id}` + +**Delete Bot** + +Deletes a bot account from the calling app's project. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is deleted from the user's project instead. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.bots().deleteBot("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.DeleteBotResponse` + +--- + +## `get` + +GET `/2/bots` + +**Get Bots** + +Retrieves the bot accounts in the calling app's project. meta.max_bots is the most bots the project can have. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.bots().get(); +System.out.println(response); +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetBotsResponse` + +--- + +## `revokeBotToken` + +DELETE `/2/bots/{id}/token` + +**Revoke Bot Token** + +Revokes a bot's bearer token. The bot account is kept, and rotating its token mints a new one. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.bots().revokeBotToken("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.RevokeBotTokenResponse` + +--- + +## `rotateBotToken` + +POST `/2/bots/{id}/token` + +**Rotate Bot Token** + +Mints a new bearer token for a bot and invalidates every token previously issued for it. The new token is returned only once. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.bots().rotateBotToken( + "1895000000000000000", + new Schemas.RotateBotTokenRequest().scopes(List.of("example")) +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.RotateBotTokenResponse` + +--- + +## `updateBot` + +PUT `/2/bots/{id}` + +**Update Bot** + +Updates a bot's handle, display name, or who may send it Direct Messages. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.bots().updateBot( + "1895000000000000000", + new Schemas.UpdateBotRequest().handle("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateBotResponse` + +--- + diff --git a/xdks/java/reference/clients/broadcasts.mdx b/xdks/java/reference/clients/broadcasts.mdx new file mode 100644 index 000000000..4ff325ca8 --- /dev/null +++ b/xdks/java/reference/clients/broadcasts.mdx @@ -0,0 +1,1470 @@ +--- +title: "BroadcastsClient (Java XDK)" +sidebarTitle: "Broadcasts" +description: "Java XDK BroadcastsClient reference — 41 methods for X API v2 Broadcasts endpoints." +--- + +Access **Broadcasts** endpoints via `client.broadcasts()` (`BroadcastsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`addChatModerator`](#addchatmoderator) | `POST /2/broadcasts/chat/moderators` | Standard | Add a Chat Moderator | +| [`createBroadcast`](#createbroadcast) | `POST /2/broadcasts` | Standard | Go Live on a Source | +| [`createScheduledBroadcast`](#createscheduledbroadcast) | `POST /2/broadcasts/scheduled` | Standard | Create a Scheduled Broadcast | +| [`createSource`](#createsource) | `POST /2/sources` | Standard | Create a Stream Source | +| [`createUserBroadcast`](#createuserbroadcast) | `POST /2/users/{id}/broadcasts` | Standard | Create a Broadcast on a User's Source | +| [`createUserSource`](#createusersource) | `POST /2/users/{id}/sources` | Standard | Create a Stream Source for a User | +| [`deleteBroadcast`](#deletebroadcast) | `DELETE /2/broadcasts/{id}` | Standard | Delete a Broadcast | +| [`deleteBroadcastChatMessage`](#deletebroadcastchatmessage) | `DELETE /2/broadcasts/{id}/chat/{message_id}` | Standard | Remove a Chat Message from a Live Broadcast | +| [`deleteScheduledBroadcast`](#deletescheduledbroadcast) | `DELETE /2/broadcasts/scheduled/{id}` | Standard | Delete a Scheduled Broadcast | +| [`deleteSource`](#deletesource) | `DELETE /2/sources/{id}` | Standard | Delete a Stream Source | +| [`deleteUserBroadcast`](#deleteuserbroadcast) | `DELETE /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Delete a User's Broadcast | +| [`deleteUserSource`](#deleteusersource) | `DELETE /2/users/{id}/sources/{source_id}` | Standard | Delete a User's Stream Source | +| [`getBroadcast`](#getbroadcast) | `GET /2/broadcasts/{id}` | Standard | Get a Broadcast | +| [`getBroadcastChat`](#getbroadcastchat) | `GET /2/broadcasts/{id}/chat` | Paginated | Get Broadcast Chat History | +| [`getChatModerators`](#getchatmoderators) | `GET /2/broadcasts/chat/moderators` | Standard | Get Chat Moderators | +| [`getChatMutedUsers`](#getchatmutedusers) | `GET /2/broadcasts/chat/mutes` | Paginated | Get Muted Chat Users | +| [`getRegion`](#getregion) | `GET /2/region` | Standard | Get the Ingest Region | +| [`getScheduledBroadcast`](#getscheduledbroadcast) | `GET /2/broadcasts/scheduled/{id}` | Standard | Get a Scheduled Broadcast | +| [`getSource`](#getsource) | `GET /2/sources/{id}` | Standard | Get a Stream Source | +| [`getSourceStreamKey`](#getsourcestreamkey) | `GET /2/sources/{id}/stream_key` | Standard | Get a Stream Source's Stream Key | +| [`getUserBroadcast`](#getuserbroadcast) | `GET /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Get a User's Broadcast | +| [`getUserSource`](#getusersource) | `GET /2/users/{id}/sources/{source_id}` | Standard | Get a User's Stream Source | +| [`goLiveScheduledBroadcast`](#golivescheduledbroadcast) | `POST /2/broadcasts/scheduled/{id}/live` | Standard | Go Live on a Scheduled Broadcast | +| [`list`](#list) | `GET /2/broadcasts` | Paginated | List Broadcasts | +| [`listLiveCategories`](#listlivecategories) | `GET /2/broadcasts/categories` | Standard | List Live Categories | +| [`listScheduled`](#listscheduled) | `GET /2/broadcasts/scheduled` | Paginated | List Scheduled Broadcasts | +| [`listSources`](#listsources) | `GET /2/sources` | Standard | List Stream Sources | +| [`listUser`](#listuser) | `GET /2/users/{id}/broadcasts` | Paginated | List a User's Broadcasts | +| [`listUserSources`](#listusersources) | `GET /2/users/{id}/sources` | Standard | List a User's Stream Sources | +| [`muteBroadcastChatUser`](#mutebroadcastchatuser) | `POST /2/broadcasts/{id}/chat/mutes` | Standard | Mute or Time Out a User in a Broadcast Chat | +| [`muteChatUser`](#mutechatuser) | `POST /2/broadcasts/chat/mutes` | Standard | Mute or Time Out a User in Chat | +| [`removeChatModerator`](#removechatmoderator) | `DELETE /2/broadcasts/chat/moderators/{user_id}` | Standard | Remove a Chat Moderator | +| [`sendBroadcastChat`](#sendbroadcastchat) | `POST /2/broadcasts/{id}/chat` | Standard | Send a Chat Message to a Live Broadcast | +| [`unmuteBroadcastChatUser`](#unmutebroadcastchatuser) | `DELETE /2/broadcasts/{id}/chat/mutes/{user_id}` | Standard | Unmute a User in a Broadcast Chat | +| [`unmuteChatUser`](#unmutechatuser) | `DELETE /2/broadcasts/chat/mutes/{user_id}` | Standard | Unmute a User in Chat | +| [`updateBroadcast`](#updatebroadcast) | `PUT /2/broadcasts/{id}` | Standard | Update a Broadcast | +| [`updateBroadcastState`](#updatebroadcaststate) | `PUT /2/broadcasts/{id}/state` | Standard | End a Broadcast | +| [`updateScheduledBroadcast`](#updatescheduledbroadcast) | `PUT /2/broadcasts/scheduled/{id}` | Standard | Update a Scheduled Broadcast | +| [`updateSource`](#updatesource) | `PUT /2/sources/{id}` | Standard | Rename a Stream Source | +| [`updateUserBroadcastState`](#updateuserbroadcaststate) | `PUT /2/users/{id}/broadcasts/{broadcast_id}/state` | Standard | Publish or End a User's Broadcast | +| [`updateUserSource`](#updateusersource) | `PUT /2/users/{id}/sources/{source_id}` | Standard | Rename a User's Stream Source | + +## `addChatModerator` + +POST `/2/broadcasts/chat/moderators` + +**Add a Chat Moderator** + +Adds a moderator to the authenticated broadcaster's persistent list and returns the updated moderator user IDs. The list applies to all current and future broadcast chats. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().addChatModerator(new Schemas.AddChatModeratorRequest().userId("2244994945")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.AddChatModeratorResponse` + +--- + +## `createBroadcast` + +POST `/2/broadcasts` + +**Go Live on a Source** + +Takes one or more of the authenticated user's sources live and returns 201 with the new broadcast. Several sources (`source_id` plus `additional_source_ids`, one per video format) go live together as one broadcast; they must all be RTMP sources in one region, and when one of them is already live its broadcast is returned only if it holds every listed source. The broadcast goes live immediately (state `RUNNING`), even before the encoder sends video, and is ended (`TIMED_OUT`) if no video arrives within 5 minutes. It is announced in a Post unless `should_not_tweet` is true. When the source already has a live broadcast, returns 200 with that broadcast unchanged and ignores the request's `title`, `locale`, `chat_option` and `should_not_tweet`. A missing `tweet_id` means the Post hasn't been created yet, was suppressed with `should_not_tweet`, or could not be created; read it later with GET /2/broadcasts/:id. A 409 `conflict` means the source can't go live right now: either it can't take video before the encoder connects (external HLS sources, or regions where this isn't available), so retry once video is flowing, or another broadcast is live on it, so END that broadcast first. The `detail` says which, and names the live broadcast when known. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().createBroadcast(new Schemas.CreateBroadcastRequest().sourceId("1895000000000000000")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateBroadcastResponse` + +--- + +## `createScheduledBroadcast` + +POST `/2/broadcasts/scheduled` + +**Create a Scheduled Broadcast** + +Schedules a broadcast for the authenticated user on one of their sources: `source_id` is required. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().createScheduledBroadcast( + new Schemas.CreateScheduledBroadcastRequest().sourceId("1895000000000000000").scheduledStartMs("example") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateScheduledBroadcastResponse` + +--- + +## `createSource` + +POST `/2/sources` + +**Create a Stream Source** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. Push an encoder to `rtmps_url` with the returned `stream_key`. This is the only response that includes the stream key; read it later with GET /2/sources/:id/stream_key. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().createSource(new Schemas.CreateSourceRequest().name("My List").region("example")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateSourceResponse` + +--- + +## `createUserBroadcast` + +POST `/2/users/{id}/broadcasts` + +**Create a Broadcast on a User's Source** + +Creates a broadcast on one of the authenticated user's sources. `id` must be the authenticated user. The broadcast is `NOT_STARTED` and posts nothing until it is published with PUT /2/users/:id/broadcasts/:broadcast_id/state; one that is never published is deleted after 7 days. When the source already has a running broadcast, that broadcast is returned. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().createUserBroadcast( + "2244994945", + new Schemas.CreateUserBroadcastRequest().sourceId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.CreateUserBroadcastResponse` + +--- + +## `createUserSource` + +POST `/2/users/{id}/sources` + +**Create a Stream Source for a User** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. `id` must be the authenticated user. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().createUserSource("2244994945", new Schemas.CreateUserSourceRequest().name("My List")); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.CreateUserSourceResponse` + +--- + +## `deleteBroadcast` + +DELETE `/2/broadcasts/{id}` + +**Delete a Broadcast** + +Deletes one of the authenticated user's broadcasts, scheduled or ended, including its replay. A running broadcast must be ended first. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().deleteBroadcast("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.DeleteBroadcastResponse` + +--- + +## `deleteBroadcastChatMessage` + +DELETE `/2/broadcasts/{id}/chat/{message_id}` + +**Remove a Chat Message from a Live Broadcast** + +Removes a specific chat message from a running broadcast where the authenticated user is the host or a moderator. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().deleteBroadcastChatMessage("1895000000000000000", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `message_id` (path parameter). + + +**Returns:** `Schemas.DeleteBroadcastChatMessageResponse` + +--- + +## `deleteScheduledBroadcast` + +DELETE `/2/broadcasts/scheduled/{id}` + +**Delete a Scheduled Broadcast** + +Deletes a scheduled broadcast by its alphanumeric broadcast id. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().deleteScheduledBroadcast("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + Deprecated: recurring schedules are being retired and `true` will be rejected. + + + + +**Returns:** `Schemas.DeleteScheduledBroadcastResponse` + +--- + +## `deleteSource` + +DELETE `/2/sources/{id}` + +**Delete a Stream Source** + +Deletes one of the authenticated user's stream sources. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().deleteSource("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Schemas.DeleteSourceResponse` + +--- + +## `deleteUserBroadcast` + +DELETE `/2/users/{id}/broadcasts/{broadcast_id}` + +**Delete a User's Broadcast** + +Deletes one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use DELETE /2/broadcasts/:id. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().deleteUserBroadcast("2244994945", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `Schemas.DeleteUserBroadcastResponse` + +--- + +## `deleteUserSource` + +DELETE `/2/users/{id}/sources/{source_id}` + +**Delete a User's Stream Source** + +Deletes one of the authenticated user's stream sources. `id` must be the authenticated user. Success is an empty object. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().deleteUserSource("2244994945", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `Schemas.DeleteUserSourceResponse` + +--- + +## `getBroadcast` + +GET `/2/broadcasts/{id}` + +**Get a Broadcast** + +Returns a broadcast owned by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getBroadcast("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `Schemas.GetBroadcastResponse` + +--- + +## `getBroadcastChat` + +GET `/2/broadcasts/{id}/chat` Paginated + +**Get Broadcast Chat History** + +Returns newest-first chat messages for a broadcast owned by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.broadcasts().getBroadcastChatPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of BroadcastChatMessage fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetBroadcastChatResponse` (use `getBroadcastChatPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getChatModerators` + +GET `/2/broadcasts/chat/moderators` + +**Get Chat Moderators** + +Returns the authenticated broadcaster's persistent moderators as User resources. The list applies to all of their current and future broadcast chats. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getChatModerators(); +System.out.println(response); +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetChatModeratorsResponse` + +--- + +## `getChatMutedUsers` + +GET `/2/broadcasts/chat/mutes` Paginated + +**Get Muted Chat Users** + +Returns the users muted in the authenticated broadcaster's chat, with the expiry time of timed mutes. Mutes apply to all of their broadcasts. Expired timed mutes are omitted. Use `expansions=user_id` to include the muted users. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.broadcasts().getChatMutedUsersPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of BroadcastChatMute fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetChatMutedUsersResponse` (use `getChatMutedUsersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getRegion` + +GET `/2/region` + +**Get the Ingest Region** + +Returns the ingest region nearest the server handling the request. Pass it as `region` when creating a stream source to ingest there. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getRegion(); +System.out.println(response); +``` + +**Returns:** `Schemas.GetRegionResponse` + +--- + +## `getScheduledBroadcast` + +GET `/2/broadcasts/scheduled/{id}` + +**Get a Scheduled Broadcast** + +Returns a single scheduled broadcast by its alphanumeric broadcast id. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getScheduledBroadcast("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.GetScheduledBroadcastResponse` + +--- + +## `getSource` + +GET `/2/sources/{id}` + +**Get a Stream Source** + +Returns one of the authenticated user's stream sources. Poll it after starting an encoder and wait for `is_stream_active` before going live. The stream key is not included; read it with GET /2/sources/:id/stream_key. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getSource("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Schemas.GetSourceResponse` + +--- + +## `getSourceStreamKey` + +GET `/2/sources/{id}/stream_key` + +**Get a Stream Source's Stream Key** + +Returns the stream key of one of the authenticated user's stream sources. The stream key is a credential: anyone with it can stream to the source, so keep it out of logs, URLs and client-side code. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getSourceStreamKey("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Schemas.GetSourceStreamKeyResponse` + +--- + +## `getUserBroadcast` + +GET `/2/users/{id}/broadcasts/{broadcast_id}` + +**Get a User's Broadcast** + +Returns one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts/:id. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getUserBroadcast("2244994945", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `Schemas.GetUserBroadcastResponse` + +--- + +## `getUserSource` + +GET `/2/users/{id}/sources/{source_id}` + +**Get a User's Stream Source** + +Returns one of the authenticated user's stream sources. `id` must be the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().getUserSource("2244994945", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `Schemas.GetUserSourceResponse` + +--- + +## `goLiveScheduledBroadcast` + +POST `/2/broadcasts/scheduled/{id}/live` + +**Go Live on a Scheduled Broadcast** + +Publishes a schedule that was created or updated with `manual_publish: true`. Without that flag the coordinator auto-publishes at start and this call is rejected. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().goLiveScheduledBroadcast("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.GoLiveScheduledBroadcastResponse` + +--- + +## `list` + +GET `/2/broadcasts` Paginated + +**List Broadcasts** + +Returns the authenticated user's live-video broadcasts, or selected owned broadcasts when ids are provided. + +At most one of `ids`, `max_results` may be provided. At most one of `ids`, `pagination_token` may be provided. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.broadcasts().listPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + Comma-separated broadcast IDs to retrieve instead of listing broadcasts. + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `Schemas.ListBroadcastsResponse` (use `listPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `listLiveCategories` + +GET `/2/broadcasts/categories` + +**List Live Categories** + +Returns the live categories a host can pick when going live, in display order. Pass a category's `id` as `live_category_id` on POST /2/broadcasts. Ids are permanent; names can change, so store the id and show the current name. The whole list is returned in one response, without paging. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.broadcasts().listLiveCategories(); +System.out.println(response); +``` + +**Returns:** `Schemas.ListLiveCategoriesResponse` + +--- + +## `listScheduled` + +GET `/2/broadcasts/scheduled` Paginated + +**List Scheduled Broadcasts** + +Returns scheduled broadcasts owned by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.broadcasts().listScheduledPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `oldest_start_time` (query parameter). + + + + `newest_start_time` (query parameter). + + + + `pagination_token` (query parameter). + + + + +**Returns:** `Schemas.ListScheduledBroadcastsResponse` (use `listScheduledPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `listSources` + +GET `/2/sources` + +**List Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources. A source's `id` is the `source_id` that POST /2/broadcasts and scheduled broadcasts take. Stream keys are not included; read one with GET /2/sources/:id/stream_key. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().listSources(); +System.out.println(response); +``` + +**Returns:** `Schemas.ListSourcesResponse` + +--- + +## `listUser` + +GET `/2/users/{id}/broadcasts` Paginated + +**List a User's Broadcasts** + +Returns the authenticated user's broadcasts, 100 per page. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.broadcasts().listUserPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `next_token.offset` from the previous page. Empty reads the first page. + + + + +**Returns:** `Schemas.ListUserBroadcastsResponse` (use `listUserPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `listUserSources` + +GET `/2/users/{id}/sources` + +**List a User's Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources (empty array if none). `id` must be the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().listUserSources("2244994945"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.ListUserSourcesResponse` + +--- + +## `muteBroadcastChatUser` + +POST `/2/broadcasts/{id}/chat/mutes` + +**Mute or Time Out a User in a Broadcast Chat** + +Prevents a user from posting further messages in a running broadcast chat. When `end_at_ms` is provided, the mute expires at that time. The authenticated user must be the broadcast host or a moderator. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().muteBroadcastChatUser( + "1895000000000000000", + new Schemas.MuteBroadcastChatUserRequest().userId("2244994945") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.MuteBroadcastChatUserResponse` + +--- + +## `muteChatUser` + +POST `/2/broadcasts/chat/mutes` + +**Mute or Time Out a User in Chat** + +Prevents a user from posting messages in all of a broadcaster's chats. Without `broadcast_id`, the user is muted in the authenticated user's own chats. Moderators pass `broadcast_id` to mute the user in that broadcast host's chats. When `end_at_ms` is provided, the mute expires at that time. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().muteChatUser(new Schemas.MuteChatUserRequest().userId("2244994945")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.MuteChatUserResponse` + +--- + +## `removeChatModerator` + +DELETE `/2/broadcasts/chat/moderators/{user_id}` + +**Remove a Chat Moderator** + +Removes a moderator from the authenticated broadcaster's persistent list and returns the updated moderator user IDs. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().removeChatModerator("2244994945"); +System.out.println(response); +``` + +### Parameters + + + A 64-bit signed integer. + + +**Returns:** `Schemas.RemoveChatModeratorResponse` + +--- + +## `sendBroadcastChat` + +POST `/2/broadcasts/{id}/chat` + +**Send a Chat Message to a Live Broadcast** + +Posts a chat message to a running broadcast, attributed to the authenticated user. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().sendBroadcastChat( + "1895000000000000000", + new Schemas.SendBroadcastChatRequest().text("Hello from XDK!") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.SendBroadcastChatResponse` + +--- + +## `unmuteBroadcastChatUser` + +DELETE `/2/broadcasts/{id}/chat/mutes/{user_id}` + +**Unmute a User in a Broadcast Chat** + +Allows a muted user to post messages in a running broadcast chat again. The authenticated user must be the broadcast host or a moderator. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().unmuteBroadcastChatUser("1895000000000000000", "2244994945"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + A 64-bit signed integer. + + +**Returns:** `Schemas.UnmuteBroadcastChatUserResponse` + +--- + +## `unmuteChatUser` + +DELETE `/2/broadcasts/chat/mutes/{user_id}` + +**Unmute a User in Chat** + +Allows a muted user to post messages in a broadcaster's chats again. Without `broadcast_id`, the user is unmuted in the authenticated user's own chats. Moderators pass `broadcast_id` to unmute the user in that broadcast host's chats. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().unmuteChatUser("2244994945"); +System.out.println(response); +``` + +### Parameters + + + A 64-bit signed integer. + + + + + + A broadcast whose host's chats the user is unmuted in. + + + + +**Returns:** `Schemas.UnmuteChatUserResponse` + +--- + +## `updateBroadcast` + +PUT `/2/broadcasts/{id}` + +**Update a Broadcast** + +Changes the title, chat option or live category of one of the authenticated user's broadcasts and returns the broadcast. Send at least one of `title`, `chat_option` and `live_category_id`; fields left out keep their values. A broadcast can be updated before it starts, while it is live and after it has ended. A 409 `conflict` means the broadcast can't be edited, for example because it was deleted or moderated. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().updateBroadcast( + "1895000000000000000", + new Schemas.UpdateBroadcastRequest().liveCategoryId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateBroadcastResponse` + +--- + +## `updateBroadcastState` + +PUT `/2/broadcasts/{id}/state` + +**End a Broadcast** + +Ends one of the authenticated user's broadcasts. Only `state: END` is supported. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().updateBroadcastState( + "1895000000000000000", + new Schemas.UpdateBroadcastStateRequest().state("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateBroadcastStateResponse` + +--- + +## `updateScheduledBroadcast` + +PUT `/2/broadcasts/scheduled/{id}` + +**Update a Scheduled Broadcast** + +Updates a scheduled broadcast. Path `:id` is the broadcast id; the body must include `scheduled_broadcast_id`. Re-send every field that should be kept. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().updateScheduledBroadcast( + "1895000000000000000", + new Schemas.UpdateScheduledBroadcastRequest().scheduledBroadcastId("1895000000000000000").scheduledStartMs("example").scheduledEndMs("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateScheduledBroadcastResponse` + +--- + +## `updateSource` + +PUT `/2/sources/{id}` + +**Rename a Stream Source** + +Renames one of the authenticated user's stream sources. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().updateSource( + "1895000000000000000", + new Schemas.UpdateSourceRequest().name("My List") +); +System.out.println(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + + + Request payload. + + +**Returns:** `Schemas.UpdateSourceResponse` + +--- + +## `updateUserBroadcastState` + +PUT `/2/users/{id}/broadcasts/{broadcast_id}/state` + +**Publish or End a User's Broadcast** + +Publishes or ends one of the authenticated user's broadcasts. `id` must be the authenticated user. `PUBLISH` takes a broadcast created with POST /2/users/:id/broadcasts live once its source is receiving video, and posts it unless `should_not_tweet` is true. `END` ends the broadcast. Deprecated: use PUT /2/broadcasts/:id/state to end a broadcast. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().updateUserBroadcastState( + "2244994945", + "1895000000000000000", + new Schemas.UpdateUserBroadcastStateRequest().state("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateUserBroadcastStateResponse` + +--- + +## `updateUserSource` + +PUT `/2/users/{id}/sources/{source_id}` + +**Rename a User's Stream Source** + +Renames one of the authenticated user's stream sources. `id` must be the authenticated user. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.broadcasts().updateUserSource( + "2244994945", + "1895000000000000000", + new Schemas.UpdateUserSourceRequest().name("My List") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateUserSourceResponse` + +--- + diff --git a/xdks/java/reference/clients/calls.mdx b/xdks/java/reference/clients/calls.mdx new file mode 100644 index 000000000..755679538 --- /dev/null +++ b/xdks/java/reference/clients/calls.mdx @@ -0,0 +1,420 @@ +--- +title: "CallsClient (Java XDK)" +sidebarTitle: "Calls" +description: "Java XDK CallsClient reference — 10 methods for X API v2 Calls endpoints." +--- + +Access **Calls** endpoints via `client.calls()` (`CallsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`cancelScheduledCall`](#cancelscheduledcall) | `DELETE /2/calls/scheduled/{id}` | Standard | Cancel a Scheduled Call | +| [`createCall`](#createcall) | `POST /2/calls` | Standard | Create a Call | +| [`getCall`](#getcall) | `GET /2/calls/{id}` | Standard | Get a Call | +| [`getScheduledCall`](#getscheduledcall) | `GET /2/calls/scheduled/{id}` | Standard | Get a Scheduled Call | +| [`joinCall`](#joincall) | `POST /2/calls/{id}/join` | Standard | Join a Call | +| [`leaveCall`](#leavecall) | `POST /2/calls/{id}/leave` | Standard | Leave a Call | +| [`listScheduled`](#listscheduled) | `GET /2/calls/scheduled` | Standard | List Scheduled Calls | +| [`respondToScheduledCall`](#respondtoscheduledcall) | `POST /2/calls/scheduled/{id}/rsvp` | Standard | Respond to a Scheduled Call | +| [`scheduleCall`](#schedulecall) | `POST /2/calls/scheduled` | Standard | Schedule a Call | +| [`updateScheduledCall`](#updatescheduledcall) | `PUT /2/calls/scheduled/{id}` | Standard | Update a Scheduled Call | + +## `cancelScheduledCall` + +DELETE `/2/calls/scheduled/{id}` + +**Cancel a Scheduled Call** + +Cancels a scheduled call the authenticated user organizes, and takes it off invitees' calendars. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. Cancelling what is already cancelled succeeds. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().cancelScheduledCall("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + Which occurrences: all (the default without occurrence_start_time), this (the default with it), or this_and_following. + + + + Start of the occurrence that scope this or this_and_following refers to (RFC 3339). + + + + Whether invitees get an email about it. Defaults to true. + + + + +**Returns:** `Schemas.CancelScheduledCallResponse` + +--- + +## `createCall` + +POST `/2/calls` + +**Create a Call** + +Starts an X call hosted by the authenticated user (typically a bot). Pass an XChat conversation_id to start the call in that conversation, or omit it for a standalone call anyone can join with the returned join_url (subject to join_policy). The call starts empty: put an agent in it with POST /2/calls/:id/join. When the host joins a conversation call, the other members are rung. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().createCall( + new Schemas.CreateCallRequest().conversationId("1500000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateCallResponse` + +--- + +## `getCall` + +GET `/2/calls/{id}` + +**Get a Call** + +Returns a call's title, join policy, host and participant count, and whether the authenticated user may join it without asking the host. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().getCall("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Call fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetCallResponse` + +--- + +## `getScheduledCall` + +GET `/2/calls/scheduled/{id}` + +**Get a Scheduled Call** + +Returns a scheduled call the authenticated user organizes or is invited to, at its occurrence running now or its next one within a year: its time, call, recurrence and who is invited and how they answered. Changes can take a few seconds to show here. Use scheduled_call.fields to select which fields are returned. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().getScheduledCall("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ScheduledCall fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Call fields to display. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetScheduledCallResponse` + +--- + +## `joinCall` + +POST `/2/calls/{id}/join` + +**Join a Call** + +Starts a media session that takes part in the call as the authenticated user. The response carries a media_url and a short-lived media_token: open a WebSocket to media_url with the token as a Bearer credential to exchange PCM16 audio and events with the call; the user enters the call when the WebSocket connects. On a closed or trusted call the session asks the host first (admission: requires_approval). + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().joinCall("1895000000000000000", new Schemas.JoinCallRequest()); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.JoinCallResponse` + +--- + +## `leaveCall` + +POST `/2/calls/{id}/leave` + +**Leave a Call** + +Ends the authenticated user's media session in the call (its WebSocket receives session.ended with reason left) and removes the user from the call. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().leaveCall("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.LeaveCallResponse` + +--- + +## `listScheduled` + +GET `/2/calls/scheduled` + +**List Scheduled Calls** + +Returns the X calls on the authenticated user's calendar, earliest first: events on their X Calls calendar, and events on the Microsoft Outlook calendars they linked to X whose conference is an X call. Calls still running at start_time are included. The window defaults to the next 24 hours and may span at most 7 days. Use scheduled_call.fields to select which fields are returned. + +When both are provided, `start_time` must be earlier than `end_time`. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().listScheduled(); +System.out.println(response); +``` + +### Parameters + + + + + Calls still running at this time or starting after it (RFC 3339). Defaults to now. + + + + Calls starting before this time (RFC 3339). Defaults to 24 hours after start_time. + + + + The most calls to return. Defaults to 20. + + + + A comma separated list of ScheduledCall fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Call fields to display. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.ListScheduledCallsResponse` + +--- + +## `respondToScheduledCall` + +POST `/2/calls/scheduled/{id}/rsvp` + +**Respond to a Scheduled Call** + +Accepts, declines or tentatively accepts an invitation to a scheduled call for the authenticated user. For a recurring call, scope and occurrence_start_time pick the occurrences the answer is for: all of them (the default), one, or one and every one after it. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().respondToScheduledCall( + "1895000000000000000", + new Schemas.RespondToScheduledCallRequest().response("accepted") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.RespondToScheduledCallResponse` + +--- + +## `scheduleCall` + +POST `/2/calls/scheduled` + +**Schedule a Call** + +Puts an X call on the authenticated user's X Calls calendar, with them as its organizer, and invites people to it. The call exists right away: share its join_url, or put an agent in it at start time with POST /2/calls/:id/join. A recurrence (an RFC 5545 RRULE) repeats it. Invitees get an email unless notify_invitees is false. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().scheduleCall(new Schemas.ScheduleCallRequest().startTime("2026-01-01T00:00:00Z")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.ScheduleCallResponse` + +--- + +## `updateScheduledCall` + +PUT `/2/calls/scheduled/{id}` + +**Update a Scheduled Call** + +Moves, renames or re-invites a scheduled call the authenticated user organizes. Only the fields sent change. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.calls().updateScheduledCall( + "1895000000000000000", + new Schemas.UpdateScheduledCallRequest().occurrenceStartTime("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + At least one of `start_time`, `duration_minutes`, `title`, `description`, `invitee_ids`, `recurrence`, `time_zone` is required. + + +**Returns:** `Schemas.UpdateScheduledCallResponse` + +--- + diff --git a/xdks/java/reference/clients/chat.mdx b/xdks/java/reference/clients/chat.mdx new file mode 100644 index 000000000..eb396e6d8 --- /dev/null +++ b/xdks/java/reference/clients/chat.mdx @@ -0,0 +1,1758 @@ +--- +title: "ChatClient (Java XDK)" +sidebarTitle: "Chat" +description: "Java XDK ChatClient reference — 45 methods for X API v2 Chat endpoints." +--- + +Access **Chat** endpoints via `client.chat()` (`ChatClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`acceptMessageRequest`](#acceptmessagerequest) | `POST /2/chat/message_requests/{id}/accept` | Standard | Accept a Chat Message Request | +| [`addConversationKeys`](#addconversationkeys) | `POST /2/chat/conversations/{id}/keys` | Standard | Add Conversation Keys | +| [`addGroupAdmins`](#addgroupadmins) | `POST /2/chat/conversations/{id}/admins` | Standard | Add Admins to a Chat Group Conversation | +| [`addGroupMembers`](#addgroupmembers) | `POST /2/chat/conversations/{id}/members` | Standard | Add Members to a Chat Group Conversation | +| [`addUserPublicKey`](#adduserpublickey) | `POST /2/users/{id}/public_keys` | Standard | Add Public Key | +| [`approveGroupAdminRequest`](#approvegroupadminrequest) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/approve` | Standard | Approve an Admin Request in a Chat Group Conversation | +| [`archiveConversation`](#archiveconversation) | `POST /2/chat/conversations/{id}/archive` | Standard | Archive a Chat Conversation | +| [`createConversation`](#createconversation) | `POST /2/chat/conversations/group` | Standard | Create Chat Group Conversation | +| [`createGroupAdminRequest`](#creategroupadminrequest) | `POST /2/chat/conversations/{id}/admin_requests` | Standard | Request Admin Permissions in a Chat Group Conversation | +| [`createGroupJoinRequest`](#creategroupjoinrequest) | `POST /2/chat/conversations/{id}/join_requests` | Standard | Request to Join a Chat Group | +| [`deleteConversation`](#deleteconversation) | `DELETE /2/chat/conversations/{id}` | Standard | Delete a Chat Conversation | +| [`deleteConversationMessageTtl`](#deleteconversationmessagettl) | `DELETE /2/chat/conversations/{id}/message_ttl` | Standard | Turn Off Disappearing Messages in a Chat Conversation | +| [`deleteMessages`](#deletemessages) | `POST /2/chat/conversations/{id}/messages/delete` | Standard | Delete Chat Messages | +| [`disableGroupInvite`](#disablegroupinvite) | `DELETE /2/chat/conversations/{id}/invite` | Standard | Disable a Chat Group Invite Link | +| [`enableGroupInvite`](#enablegroupinvite) | `POST /2/chat/conversations/{id}/invite` | Standard | Enable a Chat Group Invite Link | +| [`getConversation`](#getconversation) | `GET /2/chat/conversations/{id}` | Standard | Get Chat Conversation | +| [`getConversationEvents`](#getconversationevents) | `GET /2/chat/conversations/{id}/events` | Paginated | Get Chat Conversation Events | +| [`getConversationPinnedMessages`](#getconversationpinnedmessages) | `GET /2/chat/conversations/{id}/pinned_messages` | Paginated | Get Chat Conversation Pinned Messages | +| [`getConversations`](#getconversations) | `GET /2/chat/conversations` | Paginated | Get Chat Conversations | +| [`getGroupAdminRequests`](#getgroupadminrequests) | `GET /2/chat/conversations/{id}/admin_requests` | Paginated | Get Pending Admin Requests for a Chat Group Conversation | +| [`getGroupInvite`](#getgroupinvite) | `GET /2/chat/conversations/{id}/invites/{token}` | Standard | Get a Chat Group Invite Link | +| [`getMessageRequest`](#getmessagerequest) | `GET /2/chat/message_requests/{id}` | Standard | Get Chat Message Request | +| [`getMessageRequests`](#getmessagerequests) | `GET /2/chat/message_requests` | Paginated | Get Chat Message Requests | +| [`getSettings`](#getsettings) | `GET /2/chat/settings` | Standard | Get Chat Settings | +| [`initializeGroup`](#initializegroup) | `POST /2/chat/conversations/group/initialize` | Standard | Initialize Chat Group | +| [`markConversationRead`](#markconversationread) | `POST /2/chat/conversations/{id}/read` | Standard | Mark Conversation as Read | +| [`markConversationUnread`](#markconversationunread) | `POST /2/chat/conversations/{id}/unread` | Standard | Mark Conversation as Unread | +| [`mediaDownload`](#mediadownload) | `GET /2/chat/media/{id}/{media_hash_key}` | Standard | Download Chat Media | +| [`mediaUploadAppend`](#mediauploadappend) | `POST /2/chat/media/upload/{id}/append` | Standard | Append Chat Media Upload | +| [`mediaUploadFinalize`](#mediauploadfinalize) | `POST /2/chat/media/upload/{id}/finalize` | Standard | Finalize Chat Media Upload | +| [`mediaUploadInitialize`](#mediauploadinitialize) | `POST /2/chat/media/upload/initialize` | Standard | Initialize Chat Media Upload | +| [`muteConversation`](#muteconversation) | `POST /2/chat/conversations/{id}/mute` | Standard | Mute a Chat Conversation | +| [`rejectGroupAdminRequest`](#rejectgroupadminrequest) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/reject` | Standard | Reject an Admin Request in a Chat Group Conversation | +| [`rejectGroupJoinRequests`](#rejectgroupjoinrequests) | `POST /2/chat/conversations/{id}/join_requests/reject` | Standard | Reject Join Requests for a Chat Group Conversation | +| [`removeGroupAdmins`](#removegroupadmins) | `POST /2/chat/conversations/{id}/admins/remove` | Standard | Remove Admins from a Chat Group Conversation | +| [`removeGroupMembers`](#removegroupmembers) | `POST /2/chat/conversations/{id}/members/remove` | Standard | Remove Members from a Chat Group Conversation | +| [`sendMessage`](#sendmessage) | `POST /2/chat/conversations/{id}/messages` | Standard | Send Chat Message | +| [`sendTypingIndicator`](#sendtypingindicator) | `POST /2/chat/conversations/{id}/typing` | Standard | Send Typing Indicator | +| [`unarchiveConversation`](#unarchiveconversation) | `DELETE /2/chat/conversations/{id}/archive` | Standard | Unarchive a Chat Conversation | +| [`unmuteConversation`](#unmuteconversation) | `DELETE /2/chat/conversations/{id}/mute` | Standard | Unmute a Chat Conversation | +| [`updateConversationMessageTtl`](#updateconversationmessagettl) | `PUT /2/chat/conversations/{id}/message_ttl` | Standard | Turn On Disappearing Messages in a Chat Conversation | +| [`updateConversationScreenCapture`](#updateconversationscreencapture) | `PUT /2/chat/conversations/{id}/screen_capture` | Standard | Update Screen Capture Settings for a Chat Conversation | +| [`updateGroup`](#updategroup) | `PUT /2/chat/conversations/{id}` | Standard | Update a Chat Group Conversation | +| [`updateGroupAdminSettings`](#updategroupadminsettings) | `PUT /2/chat/conversations/{id}/admin_settings` | Standard | Update the Admin-Only Settings of a Chat Group Conversation | +| [`updateSettings`](#updatesettings) | `PUT /2/chat/settings` | Standard | Update Chat Settings | + +## `acceptMessageRequest` + +POST `/2/chat/message_requests/{id}/accept` + +**Accept a Chat Message Request** + +Accepts the other user's pending message request in a 1:1 Chat conversation, which moves to the authenticated user's inbox. Without a pending request, including after a successful accept, the response is 404. Replying to a request does not accept it. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().acceptMessageRequest("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + +**Returns:** `Schemas.AcceptChatMessageRequestResponse` + +--- + +## `addConversationKeys` + +POST `/2/chat/conversations/{id}/keys` + +**Add Conversation Keys** + +Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation id; the server constructs the canonical conversation ID from the authenticated user and recipient. The request body must contain the conversation key version and participant keys (the conversation key encrypted for each participant using their public key). + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().addConversationKeys( + "1895000000000000000", + new Schemas.AddConversationKeysRequest().conversationKeyVersion("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.AddConversationKeysResponse` + +--- + +## `addGroupAdmins` + +POST `/2/chat/conversations/{id}/admins` + +**Add Admins to a Chat Group Conversation** + +Grants admin rights to one or more members of an existing encrypted Chat group conversation. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().addGroupAdmins( + "1895000000000000000", + new Schemas.AddChatGroupAdminsRequest().userIds(List.of("2244994945")) +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.AddChatGroupAdminsResponse` + +--- + +## `addGroupMembers` + +POST `/2/chat/conversations/{id}/members` + +**Add Members to a Chat Group Conversation** + +Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key. Adding a user who has a pending join request approves that request; approval needs the same key-rotation body as adding any member. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().addGroupMembers( + "1895000000000000000", + new Schemas.AddChatGroupMembersRequest().userIds(List.of("2244994945")) +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.AddChatGroupMembersResponse` + +--- + +## `addUserPublicKey` + +POST `/2/users/{id}/public_keys` + +**Add Public Key** + +Registers a user's public key for X Chat encryption. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().addUserPublicKey("2244994945", new Schemas.AddUserPublicKeyRequest()); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.AddUserPublicKeyResponse` + +--- + +## `approveGroupAdminRequest` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/approve` + +**Approve an Admin Request in a Chat Group Conversation** + +Makes the user who requested admin permissions an admin of an encrypted Chat group conversation. Only a group admin can approve. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().approveGroupAdminRequest( + "1895000000000000000", + "2244994945", + new Schemas.ApproveChatGroupAdminRequestRequest() +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `Schemas.ApproveChatGroupAdminRequestResponse` + +--- + +## `archiveConversation` + +POST `/2/chat/conversations/{id}/archive` + +**Archive a Chat Conversation** + +Archives a Chat conversation for the authenticated user only. Archiving an archived conversation changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().archiveConversation("1895000000000000000", new Schemas.ArchiveChatConversationRequest()); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Schemas.ArchiveChatConversationResponse` + +--- + +## `createConversation` + +POST `/2/chat/conversations/group` + +**Create Chat Group Conversation** + +Creates a new encrypted Chat group conversation on behalf of the authenticated user. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().createConversation( + new Schemas.CreateChatConversationRequest().conversationId("1500000000000000000").conversationKeyVersion("example").groupMembers(List.of("example")) +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateChatConversationResponse` + +--- + +## `createGroupAdminRequest` + +POST `/2/chat/conversations/{id}/admin_requests` + +**Request Admin Permissions in a Chat Group Conversation** + +Asks the admins of an encrypted Chat group conversation to make the authenticated user an admin. An admin approves or rejects the request. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().createGroupAdminRequest( + "1895000000000000000", + new Schemas.CreateChatGroupAdminRequestRequest() +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.CreateChatGroupAdminRequestResponse` + +--- + +## `createGroupJoinRequest` + +POST `/2/chat/conversations/{id}/join_requests` + +**Request to Join a Chat Group** + +Asks to join an encrypted Chat group conversation through its invite link. The request stays pending until a group admin adds the user to the group. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().createGroupJoinRequest( + "1895000000000000000", + new Schemas.CreateChatGroupJoinRequestRequest().token("example") +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.CreateChatGroupJoinRequestResponse` + +--- + +## `deleteConversation` + +DELETE `/2/chat/conversations/{id}` + +**Delete a Chat Conversation** + +Deletes a Chat conversation for the authenticated user only; other participants keep it. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Deleting a pending message request's conversation deletes the request, like Delete in the X app. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().deleteConversation("1895000000000000000", new Schemas.DeleteChatConversationRequest()); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Schemas.DeleteChatConversationResponse` + +--- + +## `deleteConversationMessageTtl` + +DELETE `/2/chat/conversations/{id}/message_ttl` + +**Turn Off Disappearing Messages in a Chat Conversation** + +Stops new messages in a 1:1 or group Chat conversation from disappearing, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().deleteConversationMessageTtl( + "1895000000000000000", + new Schemas.DeleteChatConversationMessageTtlRequest() +); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Schemas.DeleteChatConversationMessageTtlResponse` + +--- + +## `deleteMessages` + +POST `/2/chat/conversations/{id}/messages/delete` + +**Delete Chat Messages** + +Deletes one or more messages from a Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Delete for all removes a message you sent (or, in groups you administer, any message) for every participant; delete for self removes any message only from your own view. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().deleteMessages( + "1895000000000000000", + new Schemas.DeleteChatMessagesRequest().sequenceIds(List.of("1895000000000000000")).deleteMessageAction("delete_for_all") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.DeleteChatMessagesResponse` + +--- + +## `disableGroupInvite` + +DELETE `/2/chat/conversations/{id}/invite` + +**Disable a Chat Group Invite Link** + +Turns off the invite link for an encrypted Chat group conversation. The existing link stops working. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().disableGroupInvite("1895000000000000000", new Schemas.DisableChatGroupInviteRequest()); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.DisableChatGroupInviteResponse` + +--- + +## `enableGroupInvite` + +POST `/2/chat/conversations/{id}/invite` + +**Enable a Chat Group Invite Link** + +Turns on the invite link for an encrypted Chat group conversation and returns the link details. The client builds the link and sends it as invite_url, in the form https://x.com/i/chat/group_join/<conversation_id>/<token>, where the token is exactly 10 letters, digits, '-' or '_'. invite_url is required when action_signatures is sent. To make the link expire, send validity_duration_msec or validity_expiry_timestamp_msec. With action_signatures, send validity_expiry_timestamp_msec, because the signed payload carries the expiry. The group name and avatar sent here are stored unencrypted and shown to anyone who opens the link. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().enableGroupInvite( + "1895000000000000000", + new Schemas.EnableChatGroupInviteRequest().affiliateUserId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.EnableChatGroupInviteResponse` + +--- + +## `getConversation` + +GET `/2/chat/conversations/{id}` + +**Get Chat Conversation** + +Returns metadata for a Chat conversation including type, muted status, group details, and your unread state. For the unread state, request chat_conversation.fields=unread,last_read_event_id,newest_event_id: those fields give your read state, computed from your latest read receipt and the conversation's latest notifying message. Use chat_conversation.fields to select which fields are returned. Use expansions to hydrate member, admin, or participant user objects. Use user.fields to control which profile fields are returned for expanded users; in a 1:1 chat, user.fields=receives_your_chat on the participant says how you can message them: encrypted, unencrypted, or none. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().getConversation("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ChatConversation fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetChatConversationResponse` + +--- + +## `getConversationEvents` + +GET `/2/chat/conversations/{id}/events` Paginated + +**Get Chat Conversation Events** + +Retrieves the events of a specific Chat conversation, newest first, with pagination support: messages, key changes, group changes, and read receipts. Events with an id above the conversation's last_read_event_id are unread: they come after the point you read up to. To collect them, page until an event's id is at or below it. Only `id` and `encoded_event` are always present. Events are either end-to-end encrypted or unencrypted, such as messages sent before the conversation was encrypted. Encrypted events carry `conversation_key_version`, and usually `conversation_token` and `message_event_signature`; treat an encrypted event without `message_event_signature` as unverified. An event without `conversation_key_version` is unencrypted. Decode each `encoded_event` client-side, and decrypt it with the conversation key named by `conversation_key_version` when that is present. A page holds up to `max_results` events and can hold fewer while `has_more` is true. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.chat().getConversationEventsPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of events to return. + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatMessageEvent fields to display. + + + + +**Returns:** `Schemas.GetChatConversationEventsResponse` (use `getConversationEventsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getConversationPinnedMessages` + +GET `/2/chat/conversations/{id}/pinned_messages` Paginated + +**Get Chat Conversation Pinned Messages** + +Retrieves the pinned message events of a Chat conversation with pagination support. Each event is a Base64-encoded Thrift pin event whose contents are end-to-end encrypted; decode and decrypt it client-side. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.chat().getConversationPinnedMessagesPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatPinnedMessage fields to display. + + + + +**Returns:** `Schemas.GetChatConversationPinnedMessagesResponse` (use `getConversationPinnedMessagesPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getConversations` + +GET `/2/chat/conversations` Paginated + +**Get Chat Conversations** + +Retrieves a list of Chat conversations for the authenticated user's inbox, newest first: the most recently active conversation comes first. To find the chat with a particular person, start with participant_query set to their @username or name; with expansions=participant_ids, user.fields=receives_your_chat says how you can message each match. The unread, last_read_event_id and newest_event_id fields give your read state, computed from your latest read receipt and each conversation's latest notifying message. Request them with chat_conversation.fields=unread,last_read_event_id,newest_event_id. + +The filters unread_only, type, is_archived, is_muted, participant_ids, participant_query, start_time and end_time are optional, and all filters must match (AND). participant_query keeps conversations where another participant's username, or a word of their display name, starts with the query, ignoring case and accents; with a leading @ it matches usernames only. It considers the 100 people who best match the query, uses only public profile information, and never matches group names, nicknames or messages. start_time and end_time apply to the time of each conversation's latest message. + +Each page covers max_results conversations and returns those that match, so a page can hold fewer than max_results, or none, while meta.next_token is set and has_more is true: keep paging, passing meta.next_token as pagination_token. Once a page reaches a conversation whose latest message is older than start_time, has_more is false. A pagination_token only works with the same filters as the request that returned it; with other filters, the request fails with a 400. + +When both are provided, `start_time` must be earlier than `end_time`. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.chat().getConversationsPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + Conversations covered per page (1-1000, default 200). Filtered pages can return fewer. + + + + meta.next_token from the previous page. Send the same filters with it, or the request fails. + + + + Return only unread conversations. A page can be short; keep paging while has_more. + + + + Only direct (1:1) or only group conversations. Omit for both. + + + + true: only archived; false: only not archived. Omit for both. + + + + true: only muted; false: only not muted. Omit for both. + + + + Comma-separated numeric user IDs (1-10), all in the chat. Names or @handles: use participant_query. + + + + Start here to find someone's chat: their @username or a word of their name (1-50 chars). + + + + ISO 8601, e.g. 2026-10-16T00:00:00Z. Chats whose latest message is at or after this time. + + + + ISO 8601, e.g. 2026-10-17T00:00:00Z. Chats whose latest message is before this time. + + + + A comma separated list of ChatConversation fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetChatConversationsResponse` (use `getConversationsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getGroupAdminRequests` + +GET `/2/chat/conversations/{id}/admin_requests` Paginated + +**Get Pending Admin Requests for a Chat Group Conversation** + +Returns the users who have asked to become admins of an encrypted Chat group conversation. Only a group admin can list admin requests. Use user.fields to select which profile fields are returned. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.chat().getGroupAdminRequestsPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetChatGroupAdminRequestsResponse` (use `getGroupAdminRequestsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getGroupInvite` + +GET `/2/chat/conversations/{id}/invites/{token}` + +**Get a Chat Group Invite Link** + +Returns the preview of an encrypted Chat group conversation from its invite link: group name, avatar, member count, and the authenticated user's join state. The conversation ID and the token both come from the invite link. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().getGroupInvite("1895000000000000000", "example"); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The 10-character invite token from the group's invite link. + + + + + + A comma separated list of ChatGroupInvite fields to display. + + + + +**Returns:** `Schemas.GetChatGroupInviteResponse` + +--- + +## `getMessageRequest` + +GET `/2/chat/message_requests/{id}` + +**Get Chat Message Request** + +Retrieves the message request state of a 1:1 Chat conversation and its newest message events. Like opening the request in an X app, reading it marks the returned messages as delivered and updates the unread badge. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().getMessageRequest("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + + + + + A comma separated list of ChatMessageRequestDetail fields to display. + + + + +**Returns:** `Schemas.GetChatMessageRequestResponse` + +--- + +## `getMessageRequests` + +GET `/2/chat/message_requests` Paginated + +**Get Chat Message Requests** + +Retrieves the authenticated user's pending Chat message requests from one inbox. Message contents are end-to-end encrypted unless the conversation is unencrypted. Accepting or deleting requests between pages can skip or repeat requests, and a page can be empty while `next_token` is set. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.chat().getMessageRequestsPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + Which message request inbox to list: `you_may_know` (the apps' Priority tab) or `low_quality` (the apps' Hidden tab). + + + + The maximum number of message requests to return. + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatMessageRequest fields to display. + + + + +**Returns:** `Schemas.GetChatMessageRequestsResponse` (use `getMessageRequestsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getSettings` + +GET `/2/chat/settings` + +**Get Chat Settings** + +Returns the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().getSettings(); +System.out.println(response); +``` + +### Parameters + + + + + A comma separated list of ChatSettings fields to display. + + + + +**Returns:** `Schemas.GetChatSettingsResponse` + +--- + +## `initializeGroup` + +POST `/2/chat/conversations/group/initialize` + +**Initialize Chat Group** + +Initializes a new Chat group conversation and returns a unique conversation ID. Use the returned conversation_id in a subsequent POST /chat/conversations/group call to fully create and configure the group. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().initializeGroup(); +System.out.println(response); +``` + +**Returns:** `Schemas.InitializeChatGroupResponse` + +--- + +## `markConversationRead` + +POST `/2/chat/conversations/{id}/read` + +**Mark Conversation as Read** + +Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Without action_signatures the conversation is marked read up to its newest event and the read receipt is unsigned. With one action signature over a MarkConversationReadEvent, the server sends that signed read receipt, marking the conversation read up to the event it names. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().markConversationRead("1895000000000000000", new Schemas.MarkChatConversationReadRequest()); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.MarkChatConversationReadResponse` + +--- + +## `markConversationUnread` + +POST `/2/chat/conversations/{id}/unread` + +**Mark Conversation as Unread** + +Marks a specific Chat conversation as unread on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().markConversationUnread("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.MarkChatConversationUnreadResponse` + +--- + +## `mediaDownload` + +GET `/2/chat/media/{id}/{media_hash_key}` + +**Download Chat Media** + +Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. A media item too large to return in one response fails with a 413 problem of type `https://api.x.com/2/problems/response-too-large`, and a retry fails the same way. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().mediaDownload("1895000000000000000", "example"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `media_hash_key` (path parameter). + + +**Returns:** `byte[]` + +--- + +## `mediaUploadAppend` + +POST `/2/chat/media/upload/{id}/append` + +**Append Chat Media Upload** + +Appends media data to an XChat upload session. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().mediaUploadAppend( + "1895000000000000000", + new Schemas.ChatMediaUploadAppendRequest().media("example").segmentIndex(1).conversationId("1500000000000000000").mediaHashKey("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.ChatMediaUploadAppendResponse` + +--- + +## `mediaUploadFinalize` + +POST `/2/chat/media/upload/{id}/finalize` + +**Finalize Chat Media Upload** + +Finalizes an XChat media upload session. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().mediaUploadFinalize( + "1895000000000000000", + new Schemas.ChatMediaUploadFinalizeRequest().conversationId("1500000000000000000").mediaHashKey("example").numParts("example") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.ChatMediaUploadFinalizeResponse` + +--- + +## `mediaUploadInitialize` + +POST `/2/chat/media/upload/initialize` + +**Initialize Chat Media Upload** + +Initializes an XChat media upload session. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().mediaUploadInitialize( + new Schemas.ChatMediaUploadInitializeRequest().conversationId("1500000000000000000").totalBytes(1) +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.ChatMediaUploadInitializeResponse` + +--- + +## `muteConversation` + +POST `/2/chat/conversations/{id}/mute` + +**Mute a Chat Conversation** + +Mutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().muteConversation("1895000000000000000", new Schemas.MuteChatConversationRequest()); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Schemas.MuteChatConversationResponse` + +--- + +## `rejectGroupAdminRequest` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/reject` + +**Reject an Admin Request in a Chat Group Conversation** + +Declines a user's pending request for admin permissions in an encrypted Chat group conversation. Only a group admin can reject. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().rejectGroupAdminRequest( + "1895000000000000000", + "2244994945", + new Schemas.RejectChatGroupAdminRequestRequest() +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `Schemas.RejectChatGroupAdminRequestResponse` + +--- + +## `rejectGroupJoinRequests` + +POST `/2/chat/conversations/{id}/join_requests/reject` + +**Reject Join Requests for a Chat Group Conversation** + +Rejects pending requests to join an encrypted Chat group conversation. Only group admins can reject requests. To approve a request instead, add the requesting users with addChatGroupMembers; adding a user clears their pending request. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().rejectGroupJoinRequests( + "1895000000000000000", + new Schemas.RejectChatGroupJoinRequestsRequest().userIds(List.of("2244994945")) +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.RejectChatGroupJoinRequestsResponse` + +--- + +## `removeGroupAdmins` + +POST `/2/chat/conversations/{id}/admins/remove` + +**Remove Admins from a Chat Group Conversation** + +Revokes admin rights from one or more admins of an existing encrypted Chat group conversation. They stay members of the group. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().removeGroupAdmins( + "1895000000000000000", + new Schemas.RemoveChatGroupAdminsRequest().userIds(List.of("2244994945")) +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.RemoveChatGroupAdminsResponse` + +--- + +## `removeGroupMembers` + +POST `/2/chat/conversations/{id}/members/remove` + +**Remove Members from a Chat Group Conversation** + +Removes one or more members from an existing encrypted Chat group conversation. To leave a group, pass your own user ID. Leaving does not delete the conversation for the caller. When the removal rotates the conversation key, send group_key_rotation_data and the action signatures for the removal and the key change, in that order. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().removeGroupMembers( + "1895000000000000000", + new Schemas.RemoveChatGroupMembersRequest().userIds(List.of("2244994945")) +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.RemoveChatGroupMembersResponse` + +--- + +## `sendMessage` + +POST `/2/chat/conversations/{id}/messages` + +**Send Chat Message** + +Sends a message or reaction to a Chat conversation, which you can find with `participant_query` on Get Chat Conversations. Send it end-to-end encrypted by default: `encoded_message_create_event`, built with the Chat XDK. Plaintext `content` is only a fallback for a 1:1 chat that X Chat can't encrypt: use it only when the recipient's `receives_your_chat` user field (`user.fields=receives_your_chat`) is `unencrypted`. When `content` is refused, nothing is sent and the problem's `detail` says why; HTTP 400 https://api.x.com/2/problems/encryption-required means the chat can be encrypted or is a group, so send it encrypted instead. A recipient you can't message (closed inbox, system account, or a block) returns HTTP 403 https://api.x.com/2/problems/recipient-not-messageable. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().sendMessage( + "1895000000000000000", + new Schemas.SendChatMessageRequest().messageId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + A conversation's id from Get Chat Conversations, or the recipient's user ID for a 1:1 chat. + + + + At least one of `encoded_message_create_event`, `content` is required. + + +**Returns:** `Schemas.SendChatMessageResponse` + +--- + +## `sendTypingIndicator` + +POST `/2/chat/conversations/{id}/typing` + +**Send Typing Indicator** + +Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().sendTypingIndicator("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.SendChatTypingIndicatorResponse` + +--- + +## `unarchiveConversation` + +DELETE `/2/chat/conversations/{id}/archive` + +**Unarchive a Chat Conversation** + +Unarchives a Chat conversation for the authenticated user only. Unarchiving a conversation that is not archived changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().unarchiveConversation( + "1895000000000000000", + new Schemas.UnarchiveChatConversationRequest() +); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Schemas.UnarchiveChatConversationResponse` + +--- + +## `unmuteConversation` + +DELETE `/2/chat/conversations/{id}/mute` + +**Unmute a Chat Conversation** + +Unmutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().unmuteConversation("1895000000000000000", new Schemas.UnmuteChatConversationRequest()); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Schemas.UnmuteChatConversationResponse` + +--- + +## `updateConversationMessageTtl` + +PUT `/2/chat/conversations/{id}/message_ttl` + +**Turn On Disappearing Messages in a Chat Conversation** + +Sets how long new messages in a 1:1 or group Chat conversation last before they disappear, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().updateConversationMessageTtl( + "1895000000000000000", + new Schemas.UpdateChatConversationMessageTtlRequest().messageTtlMs("example") +); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Schemas.UpdateChatConversationMessageTtlResponse` + +--- + +## `updateConversationScreenCapture` + +PUT `/2/chat/conversations/{id}/screen_capture` + +**Update Screen Capture Settings for a Chat Conversation** + +Turns screenshot blocking or screenshot detection on or off in a Chat conversation, for every participant. In a group conversation, only admins can change these settings. Each request changes one setting: send either blocking or detection. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().updateConversationScreenCapture( + "1895000000000000000", + new Schemas.UpdateChatConversationScreenCaptureRequest() +); +System.out.println(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + At least one of `blocking`, `detection` is required. + + +**Returns:** `Schemas.UpdateChatConversationScreenCaptureResponse` + +--- + +## `updateGroup` + +PUT `/2/chat/conversations/{id}` + +**Update a Chat Group Conversation** + +Renames an encrypted Chat group conversation, changes its avatar, or sets its description. The client encrypts each value with the conversation key and lists the values it changed in modified_fields. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().updateGroup( + "1895000000000000000", + new Schemas.UpdateChatGroupRequest().modifiedFields(List.of("group_name")).conversationKeyVersion("example") +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Schemas.UpdateChatGroupResponse` + +--- + +## `updateGroupAdminSettings` + +PUT `/2/chat/conversations/{id}/admin_settings` + +**Update the Admin-Only Settings of a Chat Group Conversation** + +Sets which actions only admins can perform in an existing encrypted Chat group conversation. A setting set to true restricts that action to admins, and false opens it to all members. Setting `send_message` to true makes the group announcement-only. Omitted settings keep their stored value. When sending `action_signatures`, sign over the full merged settings: the stored values with this request's changes applied, not only the settings in the request. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().updateGroupAdminSettings( + "1895000000000000000", + new Schemas.UpdateChatGroupAdminSettingsRequest().blockScreenCapture(true) +); +System.out.println(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + At least one of `add_member`, `edit_group_info`, `send_message`, `start_call`, `edit_message_ttl`, `block_screen_capture` is required. + + +**Returns:** `Schemas.UpdateChatGroupAdminSettingsResponse` + +--- + +## `updateSettings` + +PUT `/2/chat/settings` + +**Update Chat Settings** + +Updates the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. allow_dms_from, dm_receipt_settings, and dm_quality_filter accept only their listed values, matched exactly and case-sensitively; anything else is a 400. av_settings must set at least one of its settings. Whether settings omitted from a partial av_settings keep their values or are reset is not yet confirmed; send every av_settings field you want to keep. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.chat().updateSettings( + new Schemas.UpdateChatSettingsRequest().alwaysAllowDmsFromSubscribers(true) +); +System.out.println(response); +``` + +### Parameters + + + At least one of `allow_dms_from`, `always_allow_dms_from_subscribers`, `dm_quality_filter`, `dm_receipt_settings`, `av_settings` is required. + + +**Returns:** `Schemas.UpdateChatSettingsResponse` + +--- + diff --git a/xdks/java/reference/clients/communities.mdx b/xdks/java/reference/clients/communities.mdx new file mode 100644 index 000000000..2557d6bc9 --- /dev/null +++ b/xdks/java/reference/clients/communities.mdx @@ -0,0 +1,102 @@ +--- +title: "CommunitiesClient (Java XDK)" +sidebarTitle: "Communities" +description: "Java XDK CommunitiesClient reference — 2 methods for X API v2 Communities endpoints." +--- + +Access **Communities** endpoints via `client.communities()` (`CommunitiesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getById`](#getbyid) | `GET /2/communities/{id}` | Standard | Get Community by ID | +| [`search`](#search) | `GET /2/communities/search` | Paginated | Search Communities | + +## `getById` + +GET `/2/communities/{id}` + +**Get Community by ID** + +Retrieves details of a specific Community by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.communities().getById("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Community fields to display. + + + + +**Returns:** `Schemas.GetCommunitiesByIdResponse` + +--- + +## `search` + +GET `/2/communities/search` Paginated + +**Search Communities** + +Retrieves a list of Communities matching the specified search query. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.communities().searchPages("from:XDevelopers")) { + System.out.println(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Community fields to display. + + + + +**Returns:** `Schemas.SearchCommunitiesResponse` (use `searchPages(...)` for automatic `Paginator<...>` iteration) + +--- + diff --git a/xdks/java/reference/clients/community-notes.mdx b/xdks/java/reference/clients/community-notes.mdx new file mode 100644 index 000000000..2880b050b --- /dev/null +++ b/xdks/java/reference/clients/community-notes.mdx @@ -0,0 +1,227 @@ +--- +title: "CommunityNotesClient (Java XDK)" +sidebarTitle: "Community Notes" +description: "Java XDK CommunityNotesClient reference — 5 methods for X API v2 Community Notes endpoints." +--- + +Access **Community Notes** endpoints via `client.communityNotes()` (`CommunityNotesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/notes` | Standard | Create a Community Note | +| [`delete`](#delete) | `DELETE /2/notes/{id}` | Standard | Delete a Community Note | +| [`evaluate`](#evaluate) | `POST /2/notes/evaluate` | Standard | Evaluate a Community Note | +| [`searchEligiblePosts`](#searcheligibleposts) | `GET /2/notes/search/posts_eligible_for_notes` | Paginated | Search for Posts Eligible for Community Notes | +| [`searchWritten`](#searchwritten) | `GET /2/notes/search/notes_written` | Paginated | Search for Community Notes Written | + +## `create` + +POST `/2/notes` + +**Create a Community Note** + +Creates a Community Note on a Post. With test_mode set to true, the note is only for testing and is not publicly visible. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.communityNotes().create( + new Schemas.CreateCommunityNotesRequest().testMode(true).postId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateCommunityNotesResponse` + +--- + +## `delete` + +DELETE `/2/notes/{id}` + +**Delete a Community Note** + +Deletes a community note. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.communityNotes().delete("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.DeleteCommunityNotesResponse` + +--- + +## `evaluate` + +POST `/2/notes/evaluate` + +**Evaluate a Community Note** + +Evaluates the text of a proposed Community Note on a Post and returns its claim-opinion score. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.communityNotes().evaluate( + new Schemas.EvaluateCommunityNotesRequest().postId("1895000000000000000").noteText("example") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.EvaluateCommunityNotesResponse` + +--- + +## `searchEligiblePosts` + +GET `/2/notes/search/posts_eligible_for_notes` Paginated + +**Search for Posts Eligible for Community Notes** + +Retrieves Posts that are eligible for Community Notes. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.communityNotes().searchEligiblePostsPages(true)) { + System.out.println(page); +} +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + `post_selection` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.SearchEligiblePostsResponse` (use `searchEligiblePostsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `searchWritten` + +GET `/2/notes/search/notes_written` Paginated + +**Search for Community Notes Written** + +Retrieves the Community Notes written by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.communityNotes().searchWrittenPages(true)) { + System.out.println(page); +} +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Note fields to display. + + + + +**Returns:** `Schemas.SearchCommunityNotesWrittenResponse` (use `searchWrittenPages(...)` for automatic `Paginator<...>` iteration) + +--- + diff --git a/xdks/java/reference/clients/compliance.mdx b/xdks/java/reference/clients/compliance.mdx new file mode 100644 index 000000000..54e8d6f80 --- /dev/null +++ b/xdks/java/reference/clients/compliance.mdx @@ -0,0 +1,258 @@ +--- +title: "ComplianceClient (Java XDK)" +sidebarTitle: "Compliance" +description: "Java XDK ComplianceClient reference — 6 methods for X API v2 Compliance endpoints." +--- + +Access **Compliance** endpoints via `client.compliance()` (`ComplianceClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createJobs`](#createjobs) | `POST /2/compliance/jobs` | Standard | Create Compliance Job | +| [`deleteJobsById`](#deletejobsbyid) | `DELETE /2/compliance/jobs/{id}` | Standard | Cancel Compliance Job | +| [`downloadJobResults`](#downloadjobresults) | `GET /2/compliance/jobs/{id}/download` | Standard | Download Compliance Job Results | +| [`getJobs`](#getjobs) | `GET /2/compliance/jobs` | Standard | Get Compliance Jobs | +| [`getJobsById`](#getjobsbyid) | `GET /2/compliance/jobs/{id}` | Standard | Get Compliance Job by ID | +| [`uploadJobSubmission`](#uploadjobsubmission) | `PUT /2/compliance/jobs/{id}/upload` | Standard | Upload Compliance Job Submission | + +## `createJobs` + +POST `/2/compliance/jobs` + +**Create Compliance Job** + +Creates a new Compliance Job for the specified job type. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.compliance().createJobs(new Schemas.CreateComplianceJobsRequest().type("tweets")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Schemas.CreateComplianceJobsResponse` + +--- + +## `deleteJobsById` + +DELETE `/2/compliance/jobs/{id}` + +**Cancel Compliance Job** + +Cancels a Compliance Job that has not finished processing; its status becomes failed and a new job of the same type can be created. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.compliance().deleteJobsById("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Schemas.DeleteComplianceJobsByIdResponse` + +--- + +## `downloadJobResults` + +GET `/2/compliance/jobs/{id}/download` + +**Download Compliance Job Results** + +Downloads the results file of a completed Compliance Job using the signed URL returned at job creation. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.compliance().downloadJobResults("1895000000000000000", "example"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Signed download token from the job's download_url. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `byte[]` + +--- + +## `getJobs` + +GET `/2/compliance/jobs` + +**Get Compliance Jobs** + +Retrieves a list of Compliance Jobs filtered by job type and optional status. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.compliance().getJobs("tweets"); +System.out.println(response); +``` + +### Parameters + + + `type` (query parameter). + + + + + + `status` (query parameter). + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Schemas.GetComplianceJobsResponse` + +--- + +## `getJobsById` + +GET `/2/compliance/jobs/{id}` + +**Get Compliance Job by ID** + +Retrieves details of a specific Compliance Job by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.compliance().getJobsById("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Schemas.GetComplianceJobsByIdResponse` + +--- + +## `uploadJobSubmission` + +PUT `/2/compliance/jobs/{id}/upload` + +**Upload Compliance Job Submission** + +Uploads the newline-delimited ID file for a Compliance Job using the signed URL returned at job creation. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.compliance().uploadJobSubmission("1895000000000000000", "example", new byte[0]); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Signed upload token from the job's upload_url. + + + + Request payload. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Schemas.UploadComplianceJobSubmissionResponse` + +--- + diff --git a/xdks/java/reference/clients/connections.mdx b/xdks/java/reference/clients/connections.mdx new file mode 100644 index 000000000..05e1a5698 --- /dev/null +++ b/xdks/java/reference/clients/connections.mdx @@ -0,0 +1,152 @@ +--- +title: "ConnectionsClient (Java XDK)" +sidebarTitle: "Connections" +description: "Java XDK ConnectionsClient reference — 4 methods for X API v2 Connections endpoints." +--- + +Access **Connections** endpoints via `client.connections()` (`ConnectionsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`deleteAll`](#deleteall) | `DELETE /2/connections/all` | Standard | Terminate All Connections | +| [`deleteByEndpoint`](#deletebyendpoint) | `DELETE /2/connections/{endpoint_id}` | Standard | Terminate Connections by Endpoint | +| [`deleteByUuids`](#deletebyuuids) | `DELETE /2/connections` | Standard | Terminate Multiple Connections | +| [`getConnectionHistory`](#getconnectionhistory) | `GET /2/connections` | Paginated | Get Connection History | + +## `deleteAll` + +DELETE `/2/connections/all` + +**Terminate All Connections** + +Terminates all active streaming connections for the authenticated application. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.connections().deleteAll(); +System.out.println(response); +``` + +**Returns:** `Schemas.DeleteAllConnectionsResponse` + +--- + +## `deleteByEndpoint` + +DELETE `/2/connections/{endpoint_id}` + +**Terminate Connections by Endpoint** + +Terminates all streaming connections for a specific endpoint ID for the authenticated application. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.connections().deleteByEndpoint("filtered_stream"); +System.out.println(response); +``` + +### Parameters + + + `endpoint_id` (path parameter). + + +**Returns:** `Schemas.DeleteConnectionsByEndpointResponse` + +--- + +## `deleteByUuids` + +DELETE `/2/connections` + +**Terminate Multiple Connections** + +Terminates multiple streaming connections by their UUIDs for the authenticated application. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.connections().deleteByUuids( + new Schemas.DeleteConnectionsByUuidsRequest().uuids(List.of("example")) +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.DeleteConnectionsByUuidsResponse` + +--- + +## `getConnectionHistory` + +GET `/2/connections` Paginated + +**Get Connection History** + +Returns active and historical streaming connections with disconnect reasons for the authenticated application. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.connections().getConnectionHistoryPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + `status` (query parameter). + + + + `endpoints` (query parameter). + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Connection fields to display. + + + + +**Returns:** `Schemas.GetConnectionHistoryResponse` (use `getConnectionHistoryPages(...)` for automatic `Paginator<...>` iteration) + +--- + diff --git a/xdks/java/reference/clients/direct-messages.mdx b/xdks/java/reference/clients/direct-messages.mdx new file mode 100644 index 000000000..ec000412c --- /dev/null +++ b/xdks/java/reference/clients/direct-messages.mdx @@ -0,0 +1,446 @@ +--- +title: "DirectMessagesClient (Java XDK)" +sidebarTitle: "Direct Messages" +description: "Java XDK DirectMessagesClient reference — 9 methods for X API v2 Direct Messages endpoints." +--- + +Access **Direct Messages** endpoints via `client.directMessages()` (`DirectMessagesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createByConversationId`](#createbyconversationid) | `POST /2/dm_conversations/{dm_conversation_id}/messages` | Standard | Create DM Message by Conversation ID | +| [`createByParticipantId`](#createbyparticipantid) | `POST /2/dm_conversations/with/{participant_id}/messages` | Standard | Create DM Message by Participant ID | +| [`createConversation`](#createconversation) | `POST /2/dm_conversations` | Standard | Create DM Conversation | +| [`deleteEvents`](#deleteevents) | `DELETE /2/dm_events/{event_id}` | Standard | Delete DM Event | +| [`dmConversationsMediaDownload`](#dmconversationsmediadownload) | `GET /2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` | Standard | Download DM Media | +| [`getEvents`](#getevents) | `GET /2/dm_events` | Paginated | Get DM Events | +| [`getEventsByConversationId`](#geteventsbyconversationid) | `GET /2/dm_conversations/{id}/dm_events` | Paginated | Get DM Events by Conversation ID | +| [`getEventsById`](#geteventsbyid) | `GET /2/dm_events/{event_id}` | Standard | Get DM Event by ID | +| [`getEventsByParticipantId`](#geteventsbyparticipantid) | `GET /2/dm_conversations/with/{participant_id}/dm_events` | Paginated | Get DM Events by Participant ID | + +## `createByConversationId` + +POST `/2/dm_conversations/{dm_conversation_id}/messages` + +**Create DM Message by Conversation ID** + +Sends a new direct message to a specific conversation by its ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.directMessages().createByConversationId( + "1500000000000000000", + new Schemas.CreateDirectMessagesByConversationIdRequest().text("Hello from XDK!") +); +System.out.println(response); +``` + +### Parameters + + + `dm_conversation_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `Schemas.CreateDirectMessagesByConversationIdResponse` + +--- + +## `createByParticipantId` + +POST `/2/dm_conversations/with/{participant_id}/messages` + +**Create DM Message by Participant ID** + +Sends a new direct message to a specific participant by their ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.directMessages().createByParticipantId( + "2244994945", + new Schemas.CreateDirectMessagesByParticipantIdRequest().text("Hello from XDK!") +); +System.out.println(response); +``` + +### Parameters + + + `participant_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `Schemas.CreateDirectMessagesByParticipantIdResponse` + +--- + +## `createConversation` + +POST `/2/dm_conversations` + +**Create DM Conversation** + +Initiates a new direct message conversation with specified participants. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.directMessages().createConversation( + new Schemas.CreateDirectMessagesConversationRequest().conversationType("Group").participantIds(List.of("2244994945")) +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateDirectMessagesConversationResponse` + +--- + +## `deleteEvents` + +DELETE `/2/dm_events/{event_id}` + +**Delete DM Event** + +Deletes a specific direct message event by its ID, if owned by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.directMessages().deleteEvents("1600000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `event_id` (path parameter). + + +**Returns:** `Schemas.DeleteDirectMessagesEventsResponse` + +--- + +## `dmConversationsMediaDownload` + +GET `/2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` + +**Download DM Media** + +Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.directMessages().dmConversationsMediaDownload( + "1895000000000000000", + "3_1895000000000000000", + "1895000000000000000" +); +System.out.println(response); +``` + +### Parameters + + + `dm_id` (path parameter). + + + + `media_id` (path parameter). + + + + `resource_id` (path parameter). + + +**Returns:** `byte[]` + +--- + +## `getEvents` + +GET `/2/dm_events` Paginated + +**Get DM Events** + +Retrieves a list of recent direct message events across all conversations. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.directMessages().getEventsPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Schemas.GetDirectMessagesEventsResponse` (use `getEventsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getEventsByConversationId` + +GET `/2/dm_conversations/{id}/dm_events` Paginated + +**Get DM Events by Conversation ID** + +Retrieves direct message events for a specific conversation by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.directMessages().getEventsByConversationIdPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Schemas.GetDirectMessagesEventsByConversationIdResponse` (use `getEventsByConversationIdPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getEventsById` + +GET `/2/dm_events/{event_id}` + +**Get DM Event by ID** + +Retrieves details of a specific direct message event by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.directMessages().getEventsById("1600000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `event_id` (path parameter). + + + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Schemas.GetDirectMessagesEventsByIdResponse` + +--- + +## `getEventsByParticipantId` + +GET `/2/dm_conversations/with/{participant_id}/dm_events` Paginated + +**Get DM Events by Participant ID** + +Retrieves direct message events for the one-to-one conversation between the authenticated user and a specific participant. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.directMessages().getEventsByParticipantIdPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `participant_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Schemas.GetDirectMessagesEventsByParticipantIdResponse` (use `getEventsByParticipantIdPages(...)` for automatic `Paginator<...>` iteration) + +--- + diff --git a/xdks/java/reference/clients/general.mdx b/xdks/java/reference/clients/general.mdx new file mode 100644 index 000000000..57ce4004a --- /dev/null +++ b/xdks/java/reference/clients/general.mdx @@ -0,0 +1,37 @@ +--- +title: "GeneralClient (Java XDK)" +sidebarTitle: "General" +description: "Java XDK GeneralClient reference — 1 methods for X API v2 General endpoints." +--- + +Access **General** endpoints via `client.general()` (`GeneralClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getOpenApiSpec`](#getopenapispec) | `GET /2/openapi.json` | Standard | Get OpenAPI Spec | + +## `getOpenApiSpec` + +GET `/2/openapi.json` + +**Get OpenAPI Spec** + +Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md) + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.general().getOpenApiSpec(); +System.out.println(response); +``` + +**Returns:** `Map` + +--- + diff --git a/xdks/java/reference/clients/lists.mdx b/xdks/java/reference/clients/lists.mdx new file mode 100644 index 000000000..954a76c80 --- /dev/null +++ b/xdks/java/reference/clients/lists.mdx @@ -0,0 +1,407 @@ +--- +title: "ListsClient (Java XDK)" +sidebarTitle: "Lists" +description: "Java XDK ListsClient reference — 9 methods for X API v2 Lists endpoints." +--- + +Access **Lists** endpoints via `client.lists()` (`ListsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`addMember`](#addmember) | `POST /2/lists/{id}/members` | Standard | Add List Member | +| [`create`](#create) | `POST /2/lists` | Standard | Create List | +| [`delete`](#delete) | `DELETE /2/lists/{id}` | Standard | Delete List | +| [`getById`](#getbyid) | `GET /2/lists/{id}` | Standard | Get List by ID | +| [`getFollowers`](#getfollowers) | `GET /2/lists/{id}/followers` | Paginated | Get List Followers | +| [`getMembers`](#getmembers) | `GET /2/lists/{id}/members` | Paginated | Get List Members | +| [`getPosts`](#getposts) | `GET /2/lists/{id}/tweets` | Paginated | Get List Posts | +| [`removeMemberByUserId`](#removememberbyuserid) | `DELETE /2/lists/{id}/members/{user_id}` | Standard | Remove List Member | +| [`update`](#update) | `PUT /2/lists/{id}` | Standard | Update List | + +## `addMember` + +POST `/2/lists/{id}/members` + +**Add List Member** + +Adds a User to a specific List by its ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.lists().addMember( + "1450000000000000000", + new Schemas.AddListsMemberRequest().userId("2244994945") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.AddListsMemberResponse` + +--- + +## `create` + +POST `/2/lists` + +**Create List** + +Creates a new List for the authenticated user. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.lists().create(new Schemas.CreateListsRequest().name("My List")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateListsResponse` + +--- + +## `delete` + +DELETE `/2/lists/{id}` + +**Delete List** + +Deletes a specific List owned by the authenticated user by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.lists().delete("1450000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.DeleteListsResponse` + +--- + +## `getById` + +GET `/2/lists/{id}` + +**Get List by ID** + +Retrieves details of a specific List by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.lists().getById("1450000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetListsByIdResponse` + +--- + +## `getFollowers` + +GET `/2/lists/{id}/followers` Paginated + +**Get List Followers** + +Retrieves a list of Users who follow a specific List by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.lists().getFollowersPages("1450000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetListsFollowersResponse` (use `getFollowersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getMembers` + +GET `/2/lists/{id}/members` Paginated + +**Get List Members** + +Retrieves a list of Users who are members of a specific List by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.lists().getMembersPages("1450000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetListsMembersResponse` (use `getMembersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getPosts` + +GET `/2/lists/{id}/tweets` Paginated + +**Get List Posts** + +Retrieves a list of Posts associated with a specific List by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.lists().getPostsPages("1450000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetListsPostsResponse` (use `getPostsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `removeMemberByUserId` + +DELETE `/2/lists/{id}/members/{user_id}` + +**Remove List Member** + +Removes a User from a List by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.lists().removeMemberByUserId("1450000000000000000", "2244994945"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `Schemas.RemoveListsMemberByUserIdResponse` + +--- + +## `update` + +PUT `/2/lists/{id}` + +**Update List** + +Updates the details of a specific List owned by the authenticated user by its ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.lists().update( + "1450000000000000000", + new Schemas.UpdateListsRequest().name("My List") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UpdateListsResponse` + +--- + diff --git a/xdks/java/reference/clients/media.mdx b/xdks/java/reference/clients/media.mdx new file mode 100644 index 000000000..008930165 --- /dev/null +++ b/xdks/java/reference/clients/media.mdx @@ -0,0 +1,672 @@ +--- +title: "MediaClient (Java XDK)" +sidebarTitle: "Media" +description: "Java XDK MediaClient reference — 19 methods for X API v2 Media endpoints." +--- + +Access **Media** endpoints via `client.media()` (`MediaClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`addPostToAmplifyPrograms`](#addposttoamplifyprograms) | `POST /2/media/amplify/posts` | Standard | Add Post to Amplify Programs | +| [`addToLibrary`](#addtolibrary) | `POST /2/media/library` | Standard | Add Media to Library | +| [`appendUpload`](#appendupload) | `POST /2/media/upload/{id}/append` | Standard | Append Media Upload | +| [`createMetadata`](#createmetadata) | `POST /2/media/metadata` | Standard | Create Media Metadata | +| [`createSubtitles`](#createsubtitles) | `POST /2/media/subtitles` | Standard | Create Media Subtitles | +| [`deleteSubtitles`](#deletesubtitles) | `DELETE /2/media/subtitles` | Standard | Delete Media Subtitles | +| [`finalizeUpload`](#finalizeupload) | `POST /2/media/upload/{id}/finalize` | Standard | Finalize Media Upload | +| [`getAmplifyProgram`](#getamplifyprogram) | `GET /2/media/amplify/programs/{program_id}` | Standard | Get Amplify Program | +| [`getAmplifyProgramPosts`](#getamplifyprogramposts) | `GET /2/media/amplify/programs/{program_id}/posts` | Standard | Get Amplify Program Posts | +| [`getAmplifyPrograms`](#getamplifyprograms) | `GET /2/media/amplify/programs` | Standard | Get Amplify Programs | +| [`getAnalytics`](#getanalytics) | `GET /2/media/analytics` | Standard | Get Media Analytics | +| [`getByKey`](#getbykey) | `GET /2/media/{media_key}` | Standard | Get Media by Media Key | +| [`getByKeys`](#getbykeys) | `GET /2/media` | Standard | Get Media by Media Keys | +| [`getLibraryCategories`](#getlibrarycategories) | `GET /2/media/library/categories` | Standard | Get Media Library Categories | +| [`getUploadStatus`](#getuploadstatus) | `GET /2/media/upload` | Standard | Get Media Upload Status | +| [`initializeUpload`](#initializeupload) | `POST /2/media/upload/initialize` | Standard | Initialize Media Upload | +| [`removeFromLibrary`](#removefromlibrary) | `DELETE /2/media/library/{media_key}` | Standard | Remove Media Library Item | +| [`updateInLibrary`](#updateinlibrary) | `PUT /2/media/library/{media_key}` | Standard | Update Media Library Item | +| [`upload`](#upload) | `POST /2/media/upload` | Standard | Upload Media | + +## `addPostToAmplifyPrograms` + +POST `/2/media/amplify/posts` + +**Add Post to Amplify Programs** + +Publishes one of the authenticated user's video posts into one or more active Amplify pre-roll programs the user is enrolled in as a publisher. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().addPostToAmplifyPrograms( + new Schemas.AddPostToAmplifyProgramsRequest().postId("1895000000000000000").programIds(List.of("1895000000000000000")) +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.AddPostToAmplifyProgramsResponse` + +--- + +## `addToLibrary` + +POST `/2/media/library` + +**Add Media to Library** + +Adds previously uploaded media to the authenticated user's Media Library with its library metadata. The user must own the media. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().addToLibrary( + new Schemas.AddMediaToLibraryRequest().mediaKey("3_1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.AddMediaToLibraryResponse` + +--- + +## `appendUpload` + +POST `/2/media/upload/{id}/append` + +**Append Media Upload** + +Appends one segment of the file to a chunked upload. Send the segment base64-encoded in media (raw bytes in multipart bodies) and its position in the file in segment_index, counting from 0. A segment can be up to 8 MB; in a JSON body keep it to 4 MB or less, because base64 adds a third. After the last segment, call Finalize Media Upload. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().appendUpload( + "1895000000000000000", + new Schemas.AppendMediaUploadRequest().media("example").segmentIndex(1) +); +System.out.println(response); +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + + + Request payload. + + +**Returns:** `Schemas.AppendMediaUploadResponse` + +--- + +## `createMetadata` + +POST `/2/media/metadata` + +**Create Media Metadata** + +Creates metadata for a Media file. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().createMetadata(new Schemas.CreateMediaMetadataRequest().id("1895000000000000000")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateMediaMetadataResponse` + +--- + +## `createSubtitles` + +POST `/2/media/subtitles` + +**Create Media Subtitles** + +Creates subtitles for a specific Media file. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().createSubtitles( + new Schemas.CreateMediaSubtitlesRequest().id("1895000000000000000").mediaCategory("AmplifyVideo") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateMediaSubtitlesResponse` + +--- + +## `deleteSubtitles` + +DELETE `/2/media/subtitles` + +**Delete Media Subtitles** + +Deletes subtitles for a specific Media file. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().deleteSubtitles( + new Schemas.DeleteMediaSubtitlesRequest().id("1895000000000000000").mediaCategory("example").languageCode("example") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.DeleteMediaSubtitlesResponse` + +--- + +## `finalizeUpload` + +POST `/2/media/upload/{id}/finalize` + +**Finalize Media Upload** + +Completes a chunked upload once every segment is appended. For video the result carries processing_info: the media can go on a Post only when its state is succeeded, so call Get Media Upload Status until it is. A result without processing_info is ready to use. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().finalizeUpload("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + +**Returns:** `Schemas.FinalizeMediaUploadResponse` + +--- + +## `getAmplifyProgram` + +GET `/2/media/amplify/programs/{program_id}` + +**Get Amplify Program** + +Returns one Amplify pre-roll program the authenticated user is enrolled in as a publisher. A program the user is not enrolled in is reported as not found. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().getAmplifyProgram("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `Schemas.GetAmplifyProgramResponse` + +--- + +## `getAmplifyProgramPosts` + +GET `/2/media/amplify/programs/{program_id}/posts` + +**Get Amplify Program Posts** + +Returns the posts published into an Amplify pre-roll program the authenticated user is enrolled in as a publisher. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().getAmplifyProgramPosts("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `Schemas.GetAmplifyProgramPostsResponse` + +--- + +## `getAmplifyPrograms` + +GET `/2/media/amplify/programs` + +**Get Amplify Programs** + +Returns the Amplify pre-roll programs the authenticated user is enrolled in as a publisher. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().getAmplifyPrograms(); +System.out.println(response); +``` + +**Returns:** `Schemas.GetAmplifyProgramsResponse` + +--- + +## `getAnalytics` + +GET `/2/media/analytics` + +**Get Media Analytics** + +Retrieves analytics data for media. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().getAnalytics( + List.of("3_1895000000000000000"), + "2026-01-01T00:00:00Z", + "2026-01-02T00:00:00Z" +); +System.out.println(response); +``` + +### Parameters + + + `media_keys` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + + + A comma separated list of MediaAnalytics fields to display. + + + + +**Returns:** `Schemas.GetMediaAnalyticsResponse` + +--- + +## `getByKey` + +GET `/2/media/{media_key}` + +**Get Media by Media Key** + +Retrieves details of a specific Media file by its media key. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.media().getByKey("3_1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `media_key` (path parameter). + + + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Schemas.GetMediaByMediaKeyResponse` + +--- + +## `getByKeys` + +GET `/2/media` + +**Get Media by Media Keys** + +Retrieves details of Media files by their media keys. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.media().getByKeys(List.of("3_1895000000000000000")); +System.out.println(response); +``` + +### Parameters + + + `media_keys` (query parameter). + + + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Schemas.GetMediaByMediaKeysResponse` + +--- + +## `getLibraryCategories` + +GET `/2/media/library/categories` + +**Get Media Library Categories** + +Returns the video categories a publisher can assign to a media library item and the advertiser categories whose ads can be blocked from running against it. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().getLibraryCategories(); +System.out.println(response); +``` + +### Parameters + + + + + Language tag for category descriptions, e.g. `en` or `pt-BR`. + + + + +**Returns:** `Schemas.GetMediaLibraryCategoriesResponse` + +--- + +## `getUploadStatus` + +GET `/2/media/upload` + +**Get Media Upload Status** + +Returns how far X has processed an uploaded media file, in processing_info.state: pending, in_progress, succeeded or failed. Call it after Finalize Media Upload returns processing_info, waiting check_after_secs between calls, until the state is succeeded. A failed state means the media can't be used. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().getUploadStatus("3_1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + The media id from Initialize Media Upload. + + + + + + Always STATUS; can be left out. + + + + +**Returns:** `Schemas.GetMediaUploadStatusResponse` + +--- + +## `initializeUpload` + +POST `/2/media/upload/initialize` + +**Initialize Media Upload** + +Starts a chunked media upload and returns its id. Use it for video and for other files too large for one request. For a video on a Post, set media_category to tweet_video, media_type to the file's type (for example video/mp4) and total_bytes to the file's size. Send the file with Append Media Upload, call Finalize Media Upload, then pass the id in media.media_ids on Create or Edit Post. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().initializeUpload( + new Schemas.InitializeMediaUploadRequest().mediaCategory("amplify_video") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.InitializeMediaUploadResponse` + +--- + +## `removeFromLibrary` + +DELETE `/2/media/library/{media_key}` + +**Remove Media Library Item** + +Removes an item from the authenticated user's Media Library. Posts scheduled through the API that have not yet been published and still use the media are cancelled. Published posts and the underlying media are not affected. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().removeFromLibrary("3_1895000000000000000", new Schemas.RemoveMediaFromLibraryRequest()); +System.out.println(response); +``` + +### Parameters + + + The media key of the library item to remove. + + + + Request payload. + + +**Returns:** `Schemas.RemoveMediaFromLibraryResponse` + +--- + +## `updateInLibrary` + +PUT `/2/media/library/{media_key}` + +**Update Media Library Item** + +Updates the library metadata of an item in the authenticated user's Media Library. Only the fields sent are changed; the others keep their values. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().updateInLibrary( + "3_1895000000000000000", + new Schemas.UpdateMediaInLibraryRequest().name("My List") +); +System.out.println(response); +``` + +### Parameters + + + The media key of the library item to update. + + + + Request payload. + + +**Returns:** `Schemas.UpdateMediaInLibraryResponse` + +--- + +## `upload` + +POST `/2/media/upload` + +**Upload Media** + +Uploads a media file in one request and returns its id. Send the file base64-encoded in media (raw bytes in multipart bodies). For a Post, set media_category to tweet_image (JPG, PNG, GIF or WEBP, up to 5 MB) or tweet_gif, then pass the returned id in media.media_ids on Create or Edit Post. DM media uses dm_image or dm_gif. For video, use Initialize Media Upload. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.media().upload( + new Schemas.MediaUploadRequest().media("example").mediaCategory("tweet_image") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.MediaUploadResponse` + +--- + diff --git a/xdks/java/reference/clients/news.mdx b/xdks/java/reference/clients/news.mdx new file mode 100644 index 000000000..7e2c41405 --- /dev/null +++ b/xdks/java/reference/clients/news.mdx @@ -0,0 +1,97 @@ +--- +title: "NewsClient (Java XDK)" +sidebarTitle: "News" +description: "Java XDK NewsClient reference — 2 methods for X API v2 News endpoints." +--- + +Access **News** endpoints via `client.news()` (`NewsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get`](#get) | `GET /2/news/{id}` | Standard | Get News Stories by ID | +| [`search`](#search) | `GET /2/news/search` | Standard | Search News | + +## `get` + +GET `/2/news/{id}` + +**Get News Stories by ID** + +Retrieves news story by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.news().get("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of News fields to display. + + + + +**Returns:** `Schemas.GetNewsResponse` + +--- + +## `search` + +GET `/2/news/search` + +**Search News** + +Retrieves a list of News stories matching the specified search query. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.news().search("from:XDevelopers"); +System.out.println(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `max_age_hours` (query parameter). + + + + A comma separated list of News fields to display. + + + + +**Returns:** `Schemas.SearchNewsResponse` + +--- + diff --git a/xdks/java/reference/clients/posts.mdx b/xdks/java/reference/clients/posts.mdx new file mode 100644 index 000000000..d26f24c34 --- /dev/null +++ b/xdks/java/reference/clients/posts.mdx @@ -0,0 +1,956 @@ +--- +title: "PostsClient (Java XDK)" +sidebarTitle: "Posts" +description: "Java XDK PostsClient reference — 17 methods for X API v2 Posts endpoints." +--- + +Access **Posts** endpoints via `client.posts()` (`PostsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/tweets` | Standard | Create or Edit Post | +| [`createPostDraft`](#createpostdraft) | `POST /2/posts/drafts` | Standard | Create Post Draft | +| [`delete`](#delete) | `DELETE /2/tweets/{id}` | Standard | Delete Post | +| [`deletePostDraft`](#deletepostdraft) | `DELETE /2/posts/drafts/{id}` | Standard | Delete Post Draft | +| [`getAnalytics`](#getanalytics) | `GET /2/tweets/analytics` | Standard | Get Post Analytics | +| [`getById`](#getbyid) | `GET /2/tweets/{id}` | Standard | Get Post by ID | +| [`getByIds`](#getbyids) | `GET /2/tweets` | Standard | Get Posts by IDs | +| [`getCountsAll`](#getcountsall) | `GET /2/tweets/counts/all` | Paginated | Get Count of All Posts | +| [`getCountsRecent`](#getcountsrecent) | `GET /2/tweets/counts/recent` | Paginated | Get Count of Recent Posts | +| [`getLikingUsers`](#getlikingusers) | `GET /2/tweets/{id}/liking_users` | Paginated | Get Liking Users | +| [`getPostDrafts`](#getpostdrafts) | `GET /2/posts/drafts` | Paginated | Get Post Drafts | +| [`getQuoted`](#getquoted) | `GET /2/tweets/{id}/quote_tweets` | Paginated | Get Quoted Posts | +| [`getRepostedBy`](#getrepostedby) | `GET /2/tweets/{id}/retweeted_by` | Paginated | Get Reposted By | +| [`getReposts`](#getreposts) | `GET /2/tweets/{id}/retweets` | Paginated | Get Reposts | +| [`hideReply`](#hidereply) | `PUT /2/tweets/{tweet_id}/hidden` | Standard | Hide Reply | +| [`searchAll`](#searchall) | `GET /2/tweets/search/all` | Paginated | Search All Posts | +| [`searchRecent`](#searchrecent) | `GET /2/tweets/search/recent` | Paginated | Search Recent Posts | + +## `create` + +POST `/2/tweets` + +**Create or Edit Post** + +Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Media in media.media_ids is attached in the order given; get the ids by uploading each image with Upload Media, or a video with Initialize Media Upload. Supports paid partnership disclosure via the paid_partnership field. To share a clip of another Post's video, set clip to that Post's id and a range of 5 to 60 seconds. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.posts().create(new Schemas.CreatePostsRequest().text("Hello from XDK!")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreatePostsResponse` + +--- + +## `createPostDraft` + +POST `/2/posts/drafts` + +**Create Post Draft** + +Saves a Post draft to the authenticated user's X account without publishing it. Takes the body of Create or Edit Post, of which a draft stores text, media with tagged users, a reply and the AI and paid partnership disclosures. Any other field that is set is a 400 that names it. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.posts().createPostDraft(new Schemas.CreatePostDraftRequest().text("Hello from XDK!")); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreatePostDraftResponse` + +--- + +## `delete` + +DELETE `/2/tweets/{id}` + +**Delete Post** + +Deletes a specific Post by its ID, if owned by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.posts().delete("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.DeletePostsResponse` + +--- + +## `deletePostDraft` + +DELETE `/2/posts/drafts/{id}` + +**Delete Post Draft** + +Deletes one of the authenticated user's Post drafts by its ID. The whole draft is deleted, including any part Get Post Drafts does not list, and cannot be restored. An ID that is not one of the user's drafts also returns deleted: true. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.posts().deletePostDraft("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + The ID of the draft to delete. + + +**Returns:** `Schemas.DeletePostDraftResponse` + +--- + +## `getAnalytics` + +GET `/2/tweets/analytics` + +**Get Post Analytics** + +Retrieves analytics data for specified Posts within a defined time range. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.posts().getAnalytics( + List.of("1895000000000000000"), + "2026-01-01T00:00:00Z", + "2026-01-02T00:00:00Z" +); +System.out.println(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + + + A comma separated list of Analytics fields to display. + + + + +**Returns:** `Schemas.GetPostsAnalyticsResponse` + +--- + +## `getById` + +GET `/2/tweets/{id}` + +**Get Post by ID** + +Retrieves details of a specific Post by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.posts().getById("1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetPostsByIdResponse` + +--- + +## `getByIds` + +GET `/2/tweets` + +**Get Posts by IDs** + +Retrieves details of multiple Posts by their IDs. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.posts().getByIds(List.of("1895000000000000000")); +System.out.println(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetPostsByIdsResponse` + +--- + +## `getCountsAll` + +GET `/2/tweets/counts/all` Paginated + +**Get Count of All Posts** + +Retrieves the count of Posts matching a search query from the full archive. + +At most one of `pagination_token`, `next_token` may be provided. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.posts().getCountsAllPages("from:XDevelopers")) { + System.out.println(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Schemas.GetPostsCountsAllResponse` (use `getCountsAllPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getCountsRecent` + +GET `/2/tweets/counts/recent` Paginated + +**Get Count of Recent Posts** + +Retrieves the count of Posts from the last 7 days matching a search query. + +At most one of `pagination_token`, `next_token` may be provided. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.posts().getCountsRecentPages("from:XDevelopers")) { + System.out.println(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Schemas.GetPostsCountsRecentResponse` (use `getCountsRecentPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getLikingUsers` + +GET `/2/tweets/{id}/liking_users` Paginated + +**Get Liking Users** + +Retrieves a list of Users who liked a specific Post by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.posts().getLikingUsersPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetPostsLikingUsersResponse` (use `getLikingUsersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getPostDrafts` + +GET `/2/posts/drafts` Paginated + +**Get Post Drafts** + +Returns the authenticated user's Post drafts, newest first, in the fields of the Create or Edit Post body. thread holds the Posts after the first. A draft with unsupported_content is not listed in full: do not publish it from this list or delete it unless the user asks. Needs the tweet.write scope. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.posts().getPostDraftsPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + The maximum number of drafts to return. + + + + The meta.next_token of the previous page. + + + + +**Returns:** `Schemas.GetPostDraftsResponse` (use `getPostDraftsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getQuoted` + +GET `/2/tweets/{id}/quote_tweets` Paginated + +**Get Quoted Posts** + +Retrieves a list of Posts that quote a specific Post by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.posts().getQuotedPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetPostsQuotedPostsResponse` (use `getQuotedPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getRepostedBy` + +GET `/2/tweets/{id}/retweeted_by` Paginated + +**Get Reposted By** + +Retrieves a list of Users who reposted a specific Post by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.posts().getRepostedByPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetPostsRepostedByResponse` (use `getRepostedByPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getReposts` + +GET `/2/tweets/{id}/retweets` Paginated + +**Get Reposts** + +Retrieves a list of Posts that repost a specific Post by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.posts().getRepostsPages("1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetPostsRepostsResponse` (use `getRepostsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `hideReply` + +PUT `/2/tweets/{tweet_id}/hidden` + +**Hide Reply** + +Hides or unhides a reply to a conversation owned by the authenticated user. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.posts().hideReply( + "1895000000000000000", + new Schemas.HidePostsReplyRequest().hidden(true) +); +System.out.println(response); +``` + +### Parameters + + + `tweet_id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.HidePostsReplyResponse` + +--- + +## `searchAll` + +GET `/2/tweets/search/all` Paginated + +**Search All Posts** + +Retrieves Posts from the full archive matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.posts().searchAllPages("from:XDevelopers")) { + System.out.println(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `sort_order` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.SearchPostsAllResponse` (use `searchAllPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `searchRecent` + +GET `/2/tweets/search/recent` Paginated + +**Search Recent Posts** + +Retrieves Posts from the last 7 days matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.posts().searchRecentPages("from:XDevelopers")) { + System.out.println(page); +} +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `sort_order` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.SearchPostsRecentResponse` (use `searchRecentPages(...)` for automatic `Paginator<...>` iteration) + +--- + diff --git a/xdks/java/reference/clients/spaces.mdx b/xdks/java/reference/clients/spaces.mdx new file mode 100644 index 000000000..199ca945d --- /dev/null +++ b/xdks/java/reference/clients/spaces.mdx @@ -0,0 +1,345 @@ +--- +title: "SpacesClient (Java XDK)" +sidebarTitle: "Spaces" +description: "Java XDK SpacesClient reference — 6 methods for X API v2 Spaces endpoints." +--- + +Access **Spaces** endpoints via `client.spaces()` (`SpacesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getBuyers`](#getbuyers) | `GET /2/spaces/{id}/buyers` | Paginated | Get Space Ticket Buyers | +| [`getByCreatorIds`](#getbycreatorids) | `GET /2/spaces/by/creator_ids` | Standard | Get Spaces by Creator IDs | +| [`getById`](#getbyid) | `GET /2/spaces/{id}` | Standard | Get Space by ID | +| [`getByIds`](#getbyids) | `GET /2/spaces` | Standard | Get Spaces by IDs | +| [`getPosts`](#getposts) | `GET /2/spaces/{id}/tweets` | Paginated | Get Space Posts | +| [`search`](#search) | `GET /2/spaces/search` | Standard | Search Spaces | + +## `getBuyers` + +GET `/2/spaces/{id}/buyers` Paginated + +**Get Space Ticket Buyers** + +Retrieves a list of Users who purchased tickets to a specific Space by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.spaces().getBuyersPages("1YqKDqWLPPlGV")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetSpacesBuyersResponse` (use `getBuyersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getByCreatorIds` + +GET `/2/spaces/by/creator_ids` + +**Get Spaces by Creator IDs** + +Retrieves details of Spaces created by specified User IDs. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.spaces().getByCreatorIds(List.of("2244994945")); +System.out.println(response); +``` + +### Parameters + + + `user_ids` (query parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Schemas.GetSpacesByCreatorIdsResponse` + +--- + +## `getById` + +GET `/2/spaces/{id}` + +**Get Space by ID** + +Retrieves details of a specific Space by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.spaces().getById("1YqKDqWLPPlGV"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Schemas.GetSpacesByIdResponse` + +--- + +## `getByIds` + +GET `/2/spaces` + +**Get Spaces by IDs** + +Retrieves details of multiple Spaces by their IDs. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.spaces().getByIds(List.of("1YqKDqWLPPlGV")); +System.out.println(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Schemas.GetSpacesByIdsResponse` + +--- + +## `getPosts` + +GET `/2/spaces/{id}/tweets` Paginated + +**Get Space Posts** + +Retrieves a list of Posts shared in a specific Space by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.spaces().getPostsPages("1YqKDqWLPPlGV")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetSpacesPostsResponse` (use `getPostsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `search` + +GET `/2/spaces/search` + +**Search Spaces** + +Retrieves a list of Spaces matching the specified search query. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.spaces().search("from:XDevelopers"); +System.out.println(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `state` (query parameter). + + + + `max_results` (query parameter). + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `Schemas.SearchSpacesResponse` + +--- + diff --git a/xdks/java/reference/clients/stream.mdx b/xdks/java/reference/clients/stream.mdx new file mode 100644 index 000000000..2c5853380 --- /dev/null +++ b/xdks/java/reference/clients/stream.mdx @@ -0,0 +1,1072 @@ +--- +title: "StreamClient (Java XDK)" +sidebarTitle: "Stream" +description: "Java XDK StreamClient reference — 18 methods for X API v2 Stream endpoints." +--- + +Access **Stream** endpoints via `client.stream()` (`StreamClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`activity`](#activity) | `GET /2/activity/stream` | Streaming | Activity Stream | +| [`getRuleCounts`](#getrulecounts) | `GET /2/tweets/search/stream/rules/counts` | Standard | Get Stream Rule Counts | +| [`getRules`](#getrules) | `GET /2/tweets/search/stream/rules` | Paginated | Get Stream Rules | +| [`labelsCompliance`](#labelscompliance) | `GET /2/tweets/label/stream` | Streaming | Stream Post Labels | +| [`likesCompliance`](#likescompliance) | `GET /2/likes/compliance/stream` | Streaming | Stream Likes Compliance Data | +| [`likesFirehose`](#likesfirehose) | `GET /2/likes/firehose/stream` | Streaming | Stream All Likes | +| [`likesSample10`](#likessample10) | `GET /2/likes/sample10/stream` | Streaming | Stream Sampled Likes | +| [`posts`](#posts) | `GET /2/tweets/search/stream` | Streaming | Stream Filtered Posts | +| [`postsCompliance`](#postscompliance) | `GET /2/tweets/compliance/stream` | Streaming | Stream Posts Compliance Data | +| [`postsFirehose`](#postsfirehose) | `GET /2/tweets/firehose/stream` | Streaming | Stream All Posts | +| [`postsFirehoseEn`](#postsfirehoseen) | `GET /2/tweets/firehose/stream/lang/en` | Streaming | Stream English Posts | +| [`postsFirehoseJa`](#postsfirehoseja) | `GET /2/tweets/firehose/stream/lang/ja` | Streaming | Stream Japanese Posts | +| [`postsFirehoseKo`](#postsfirehoseko) | `GET /2/tweets/firehose/stream/lang/ko` | Streaming | Stream Korean Posts | +| [`postsFirehosePt`](#postsfirehosept) | `GET /2/tweets/firehose/stream/lang/pt` | Streaming | Stream Portuguese Posts | +| [`postsSample`](#postssample) | `GET /2/tweets/sample/stream` | Streaming | Stream Sampled Posts | +| [`postsSample10`](#postssample10) | `GET /2/tweets/sample10/stream` | Streaming | Stream 10% Sampled Posts | +| [`updateRules`](#updaterules) | `POST /2/tweets/search/stream/rules` | Standard | Update Stream Rules | +| [`usersCompliance`](#userscompliance) | `GET /2/users/compliance/stream` | Streaming | Stream Users Compliance Data | + +## `activity` + +GET `/2/activity/stream` Streaming + +**Activity Stream** + +Stream of X Activities + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().activity()) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the activities will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the activities will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `getRuleCounts` + +GET `/2/tweets/search/stream/rules/counts` + +**Get Stream Rule Counts** + +Retrieves the count of rules in the active rule set for the filtered stream. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.stream().getRuleCounts(); +System.out.println(response); +``` + +### Parameters + + + + + `rules_count.fields` (query parameter). + + + + +**Returns:** `Schemas.GetRuleCountsResponse` + +--- + +## `getRules` + +GET `/2/tweets/search/stream/rules` Paginated + +**Get Stream Rules** + +Returns the active filtered-stream rules for the authenticated app. Provide `ids` to fetch specific rules; omit it to list all rules. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.stream().getRulesPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + `ids` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 8 bytes. + + + + +**Returns:** `Schemas.GetRulesResponse` (use `getRulesPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `labelsCompliance` + +GET `/2/tweets/label/stream` Streaming + +**Stream Post Labels** + +Streams all labeling events applied to Posts. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().labelsCompliance()) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `likesCompliance` + +GET `/2/likes/compliance/stream` Streaming + +**Stream Likes Compliance Data** + +Streams all compliance data related to Likes for Users. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().likesCompliance()) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `likesFirehose` + +GET `/2/likes/firehose/stream` Streaming + +**Stream All Likes** + +Streams all public Likes in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().likesFirehose(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of LikeWithTweetAuthor fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Tweet fields to display. + + + + +**Returns:** `EventStream` + +--- + +## `likesSample10` + +GET `/2/likes/sample10/stream` Streaming + +**Stream Sampled Likes** + +Streams a 10% sample of public Likes in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().likesSample10(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of LikeWithTweetAuthor fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Tweet fields to display. + + + + +**Returns:** `EventStream` + +--- + +## `posts` + +GET `/2/tweets/search/stream` Streaming + +**Stream Filtered Posts** + +Streams Posts in real-time matching the active rule set. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().posts()) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `EventStream` + +--- + +## `postsCompliance` + +GET `/2/tweets/compliance/stream` Streaming + +**Stream Posts Compliance Data** + +Streams all compliance data related to Posts. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsCompliance(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post Compliance events will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `postsFirehose` + +GET `/2/tweets/firehose/stream` Streaming + +**Stream All Posts** + +Streams all public Posts in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsFirehose(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `postsFirehoseEn` + +GET `/2/tweets/firehose/stream/lang/en` Streaming + +**Stream English Posts** + +Streams all public English-language Posts in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsFirehoseEn(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `postsFirehoseJa` + +GET `/2/tweets/firehose/stream/lang/ja` Streaming + +**Stream Japanese Posts** + +Streams all public Japanese-language Posts in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsFirehoseJa(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `postsFirehoseKo` + +GET `/2/tweets/firehose/stream/lang/ko` Streaming + +**Stream Korean Posts** + +Streams all public Korean-language Posts in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsFirehoseKo(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `postsFirehosePt` + +GET `/2/tweets/firehose/stream/lang/pt` Streaming + +**Stream Portuguese Posts** + +Streams all public Portuguese-language Posts in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsFirehosePt(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `postsSample` + +GET `/2/tweets/sample/stream` Streaming + +**Stream Sampled Posts** + +Streams a 1% sample of public Posts in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsSample()) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `EventStream` + +--- + +## `postsSample10` + +GET `/2/tweets/sample10/stream` Streaming + +**Stream 10% Sampled Posts** + +Streams a 10% sample of public Posts in real-time. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().postsSample10(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `EventStream` + +--- + +## `updateRules` + +POST `/2/tweets/search/stream/rules` + +**Update Stream Rules** + +Adds or deletes rules from the active rule set for the filtered stream. Exactly one of `add`, `delete`, or `?delete_all=true` must be specified. Use `?dry_run=true` to validate without committing. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.stream().updateRules(new Schemas.UpdateRulesRequest()); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + + + + + `dry_run` (query parameter). + + + + `delete_all` (query parameter). + + + + +**Returns:** `Schemas.UpdateRulesResponse` + +--- + +## `usersCompliance` + +GET `/2/users/compliance/stream` Streaming + +**Stream Users Compliance Data** + +Streams all compliance data related to Users. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +try (var stream = client.stream().usersCompliance(1)) { + for (var event : stream) { + System.out.println(event); + } +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided. + + + + +**Returns:** `EventStream` + +--- + diff --git a/xdks/java/reference/clients/trends.mdx b/xdks/java/reference/clients/trends.mdx new file mode 100644 index 000000000..f733c8e91 --- /dev/null +++ b/xdks/java/reference/clients/trends.mdx @@ -0,0 +1,123 @@ +--- +title: "TrendsClient (Java XDK)" +sidebarTitle: "Trends" +description: "Java XDK TrendsClient reference — 3 methods for X API v2 Trends endpoints." +--- + +Access **Trends** endpoints via `client.trends()` (`TrendsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getByWoeid`](#getbywoeid) | `GET /2/trends/by/woeid/{woeid}` | Standard | Get Trends by WOEID | +| [`getLocations`](#getlocations) | `GET /2/trends/locations` | Standard | Get Trend Locations | +| [`getPersonalized`](#getpersonalized) | `GET /2/users/personalized_trends` | Standard | Get Personalized Trends | + +## `getByWoeid` + +GET `/2/trends/by/woeid/{woeid}` + +**Get Trends by WOEID** + +Retrieves trending topics for a specific location identified by its WOEID. `meta.location` describes that location: its `woeid` and `name`, and when they are known its `country`, `country_code`, `place_type` (`town`, `country` or `supername`) and `parent_id`, the WOEID of the place that contains it. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.trends().getByWoeid(1); +System.out.println(response); +``` + +### Parameters + + + `woeid` (path parameter). + + + + + + `max_trends` (query parameter). + + + + A comma separated list of Trend fields to display. + + + + +**Returns:** `Schemas.GetTrendsByWoeidResponse` + +--- + +## `getLocations` + +GET `/2/trends/locations` + +**Get Trend Locations** + +Retrieves every location that has trends. Each location has a WOEID to pass to `GET /2/trends/by/woeid/{woeid}`. The list is short and is returned whole, so the route takes no paging parameters. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.trends().getLocations(); +System.out.println(response); +``` + +### Parameters + + + + + A comma separated list of TrendLocation fields to display. + + + + +**Returns:** `Schemas.GetTrendsLocationsResponse` + +--- + +## `getPersonalized` + +GET `/2/users/personalized_trends` + +**Get Personalized Trends** + +Retrieves personalized trending topics for the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.trends().getPersonalized(); +System.out.println(response); +``` + +### Parameters + + + + + A comma separated list of PersonalizedTrend fields to display. + + + + +**Returns:** `Schemas.GetTrendsPersonalizedTrendsResponse` + +--- + diff --git a/xdks/java/reference/clients/usage.mdx b/xdks/java/reference/clients/usage.mdx new file mode 100644 index 000000000..6284446d4 --- /dev/null +++ b/xdks/java/reference/clients/usage.mdx @@ -0,0 +1,75 @@ +--- +title: "UsageClient (Java XDK)" +sidebarTitle: "Usage" +description: "Java XDK UsageClient reference — 2 methods for X API v2 Usage endpoints." +--- + +Access **Usage** endpoints via `client.usage()` (`UsageClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get`](#get) | `GET /2/usage/tweets` | Standard | Get Usage | +| [`getCredits`](#getcredits) | `GET /2/usage/credits` | Standard | Get Usage Credits | + +## `get` + +GET `/2/usage/tweets` + +**Get Usage** + +Retrieves usage statistics for Posts over a specified number of days. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.usage().get(); +System.out.println(response); +``` + +### Parameters + + + + + `days` (query parameter). + + + + A comma separated list of Usage fields to display. + + + + +**Returns:** `Schemas.GetUsageResponse` + +--- + +## `getCredits` + +GET `/2/usage/credits` + +**Get Usage Credits** + +Returns the payer's developer-platform credit balance in USD. total_balance is max(0, prepaid_balance + free_balance); prepaid_balance may be negative. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.usage().getCredits(); +System.out.println(response); +``` + +**Returns:** `Schemas.GetUsageCreditsResponse` + +--- + diff --git a/xdks/java/reference/clients/users.mdx b/xdks/java/reference/clients/users.mdx new file mode 100644 index 000000000..d2f8c7fb4 --- /dev/null +++ b/xdks/java/reference/clients/users.mdx @@ -0,0 +1,2189 @@ +--- +title: "UsersClient (Java XDK)" +sidebarTitle: "Users" +description: "Java XDK UsersClient reference — 46 methods for X API v2 Users endpoints." +--- + +Access **Users** endpoints via `client.users()` (`UsersClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`blockDms`](#blockdms) | `POST /2/users/{id}/dm/block` | Standard | Block DMs | +| [`createBookmark`](#createbookmark) | `POST /2/users/{id}/bookmarks` | Standard | Create Bookmark | +| [`createBookmarkFolder`](#createbookmarkfolder) | `POST /2/users/{id}/bookmarks/folders` | Standard | Create Bookmark Folder | +| [`deleteBookmark`](#deletebookmark) | `DELETE /2/users/{id}/bookmarks/{tweet_id}` | Standard | Delete Bookmark | +| [`followList`](#followlist) | `POST /2/users/{id}/followed_lists` | Standard | Follow List | +| [`followUser`](#followuser) | `POST /2/users/{id}/following` | Standard | Follow User | +| [`getAffiliates`](#getaffiliates) | `GET /2/users/{id}/affiliates` | Paginated | Get Affiliates | +| [`getBlocking`](#getblocking) | `GET /2/users/{id}/blocking` | Paginated | Get Blocked Users | +| [`getBookmarkFolders`](#getbookmarkfolders) | `GET /2/users/{id}/bookmarks/folders` | Paginated | Get Bookmark Folders | +| [`getBookmarks`](#getbookmarks) | `GET /2/users/{id}/bookmarks` | Paginated | Get Bookmarks | +| [`getBookmarksByFolderId`](#getbookmarksbyfolderid) | `GET /2/users/{id}/bookmarks/folders/{folder_id}` | Paginated | Get Bookmarks by Folder ID | +| [`getById`](#getbyid) | `GET /2/users/{id}` | Standard | Get User by ID | +| [`getByIds`](#getbyids) | `GET /2/users` | Standard | Get Users by IDs | +| [`getByUsername`](#getbyusername) | `GET /2/users/by/username/{username}` | Standard | Get User by Username | +| [`getByUsernames`](#getbyusernames) | `GET /2/users/by` | Standard | Get Users by Usernames | +| [`getFollowedLists`](#getfollowedlists) | `GET /2/users/{id}/followed_lists` | Paginated | Get Followed Lists | +| [`getFollowers`](#getfollowers) | `GET /2/users/{id}/followers` | Paginated | Get Followers | +| [`getFollowing`](#getfollowing) | `GET /2/users/{id}/following` | Paginated | Get Following | +| [`getLikedPosts`](#getlikedposts) | `GET /2/users/{id}/liked_tweets` | Paginated | Get Liked Posts | +| [`getListMemberships`](#getlistmemberships) | `GET /2/users/{id}/list_memberships` | Paginated | Get List Memberships | +| [`getMe`](#getme) | `GET /2/users/me` | Standard | Get My User | +| [`getMeFollowers`](#getmefollowers) | `GET /2/users/me/followers` | Paginated | Get the Authenticated User's Followers | +| [`getMeFollowing`](#getmefollowing) | `GET /2/users/me/following` | Paginated | Get the Users the Authenticated User Follows | +| [`getMentions`](#getmentions) | `GET /2/users/{id}/mentions` | Paginated | Get Mentions | +| [`getMuting`](#getmuting) | `GET /2/users/{id}/muting` | Paginated | Get Muting | +| [`getOwnedLists`](#getownedlists) | `GET /2/users/{id}/owned_lists` | Paginated | Get Owned Lists | +| [`getPinnedLists`](#getpinnedlists) | `GET /2/users/{id}/pinned_lists` | Standard | Get Pinned Lists | +| [`getPosts`](#getposts) | `GET /2/users/{id}/tweets` | Paginated | Get Posts | +| [`getPublicKey`](#getpublickey) | `GET /2/users/{id}/public_keys` | Standard | Get User Public Keys | +| [`getPublicKeys`](#getpublickeys) | `GET /2/users/public_keys` | Standard | Get Public Keys for Multiple Users | +| [`getRepostsOfMe`](#getrepostsofme) | `GET /2/users/reposts_of_me` | Paginated | Get Reposts of Me | +| [`getTimeline`](#gettimeline) | `GET /2/users/{id}/timelines/reverse_chronological` | Paginated | Get Timeline | +| [`idBlock`](#idblock) | `POST /2/users/{id}/blocking` | Standard | Block User | +| [`idUnblock`](#idunblock) | `DELETE /2/users/{source_user_id}/blocking/{target_user_id}` | Standard | Unblock User | +| [`likePost`](#likepost) | `POST /2/users/{id}/likes` | Standard | Like Post | +| [`muteUser`](#muteuser) | `POST /2/users/{id}/muting` | Standard | Mute User | +| [`pinList`](#pinlist) | `POST /2/users/{id}/pinned_lists` | Standard | Pin List | +| [`repostPost`](#repostpost) | `POST /2/users/{id}/retweets` | Standard | Repost Post | +| [`search`](#search) | `GET /2/users/search` | Paginated | Search Users | +| [`unblockDms`](#unblockdms) | `POST /2/users/{id}/dm/unblock` | Standard | Unblock DMs | +| [`unfollowList`](#unfollowlist) | `DELETE /2/users/{id}/followed_lists/{list_id}` | Standard | Unfollow List | +| [`unfollowUser`](#unfollowuser) | `DELETE /2/users/{source_user_id}/following/{target_user_id}` | Standard | Unfollow User | +| [`unlikePost`](#unlikepost) | `DELETE /2/users/{id}/likes/{tweet_id}` | Standard | Unlike Post | +| [`unmuteUser`](#unmuteuser) | `DELETE /2/users/{source_user_id}/muting/{target_user_id}` | Standard | Unmute User | +| [`unpinList`](#unpinlist) | `DELETE /2/users/{id}/pinned_lists/{list_id}` | Standard | Unpin List | +| [`unrepostPost`](#unrepostpost) | `DELETE /2/users/{id}/retweets/{source_tweet_id}` | Standard | Unrepost Post | + +## `blockDms` + +POST `/2/users/{id}/dm/block` + +**Block DMs** + +Blocks direct messages to or from a specific User by their ID for the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().blockDms("2244994945"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.BlockUsersDmsResponse` + +--- + +## `createBookmark` + +POST `/2/users/{id}/bookmarks` + +**Create Bookmark** + +Adds one or more Posts to the authenticated user's Bookmarks. Supply `tweet_id` for a single Post, or `tweet_ids` (at most 25) to bookmark several in one request. Optional `folder_id` applies to every Post in the request. Billing and rate limits still apply per HTTP request. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().createBookmark( + "2244994945", + new Schemas.CreateUsersBookmarkRequest().tweetId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + At least one of `tweet_id`, `tweet_ids` is required. + + +**Returns:** `JsonNode` + +--- + +## `createBookmarkFolder` + +POST `/2/users/{id}/bookmarks/folders` + +**Create Bookmark Folder** + +Creates a new Bookmark folder for the authenticated user. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().createBookmarkFolder( + "2244994945", + new Schemas.CreateUsersBookmarkFolderRequest().name("My List") +); +System.out.println(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + Request payload. + + +**Returns:** `Schemas.CreateUsersBookmarkFolderResponse` + +--- + +## `deleteBookmark` + +DELETE `/2/users/{id}/bookmarks/{tweet_id}` + +**Delete Bookmark** + +Removes a Post from the authenticated user's Bookmarks by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().deleteBookmark("2244994945", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `tweet_id` (path parameter). + + +**Returns:** `Schemas.DeleteUsersBookmarkResponse` + +--- + +## `followList` + +POST `/2/users/{id}/followed_lists` + +**Follow List** + +Causes the authenticated user to follow a specific List by its ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().followList( + "2244994945", + new Schemas.FollowListRequest().listId("1450000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.FollowListResponse` + +--- + +## `followUser` + +POST `/2/users/{id}/following` + +**Follow User** + +Causes the authenticated user to follow a specific User by their ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().followUser( + "2244994945", + new Schemas.FollowUserRequest().targetUserId("2244994945") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.FollowUserResponse` + +--- + +## `getAffiliates` + +GET `/2/users/{id}/affiliates` Paginated + +**Get Affiliates** + +Retrieves a list of Users who are affiliated with a specific organization User by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getAffiliatesPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersAffiliatesResponse` (use `getAffiliatesPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getBlocking` + +GET `/2/users/{id}/blocking` Paginated + +**Get Blocked Users** + +Returns the Users that the given User is blocking. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getBlockingPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersBlockingResponse` (use `getBlockingPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getBookmarkFolders` + +GET `/2/users/{id}/bookmarks/folders` Paginated + +**Get Bookmark Folders** + +Retrieves a list of Bookmark folders created by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getBookmarkFoldersPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Schemas.GetUsersBookmarkFoldersResponse` (use `getBookmarkFoldersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getBookmarks` + +GET `/2/users/{id}/bookmarks` Paginated + +**Get Bookmarks** + +Retrieves a list of Posts bookmarked by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getBookmarksPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetUsersBookmarksResponse` (use `getBookmarksPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getBookmarksByFolderId` + +GET `/2/users/{id}/bookmarks/folders/{folder_id}` Paginated + +**Get Bookmarks by Folder ID** + +Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getBookmarksByFolderIdPages("2244994945", "1895000000000000000")) { + System.out.println(page); +} +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `folder_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Schemas.GetUsersBookmarksByFolderIdResponse` (use `getBookmarksByFolderIdPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getById` + +GET `/2/users/{id}` + +**Get User by ID** + +Retrieves details of a specific User by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.users().getById("2244994945"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersByIdResponse` + +--- + +## `getByIds` + +GET `/2/users` + +**Get Users by IDs** + +Retrieves details of multiple Users by their IDs. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.users().getByIds(List.of("2244994945")); +System.out.println(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersByIdsResponse` + +--- + +## `getByUsername` + +GET `/2/users/by/username/{username}` + +**Get User by Username** + +Retrieves details of a specific User by their username. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.users().getByUsername("XDevelopers"); +System.out.println(response); +``` + +### Parameters + + + `username` (path parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersByUsernameResponse` + +--- + +## `getByUsernames` + +GET `/2/users/by` + +**Get Users by Usernames** + +Retrieves details of multiple Users by their usernames. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.users().getByUsernames(List.of("XDevelopers")); +System.out.println(response); +``` + +### Parameters + + + `usernames` (query parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersByUsernamesResponse` + +--- + +## `getFollowedLists` + +GET `/2/users/{id}/followed_lists` Paginated + +**Get Followed Lists** + +Retrieves a list of Lists followed by a specific User by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getFollowedListsPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetUsersFollowedListsResponse` (use `getFollowedListsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getFollowers` + +GET `/2/users/{id}/followers` Paginated + +**Get Followers** + +Retrieves a list of Users who follow a specific User by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getFollowersPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersFollowersResponse` (use `getFollowersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getFollowing` + +GET `/2/users/{id}/following` Paginated + +**Get Following** + +Retrieves a list of Users followed by a specific User by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getFollowingPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersFollowingResponse` (use `getFollowingPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getLikedPosts` + +GET `/2/users/{id}/liked_tweets` Paginated + +**Get Liked Posts** + +Retrieves a list of Posts liked by a specific User by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getLikedPostsPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetUsersLikedPostsResponse` (use `getLikedPostsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getListMemberships` + +GET `/2/users/{id}/list_memberships` Paginated + +**Get List Memberships** + +Retrieves a list of Lists that a specific User is a member of by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getListMembershipsPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetUsersListMembershipsResponse` (use `getListMembershipsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getMe` + +GET `/2/users/me` + +**Get My User** + +Retrieves details of the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().getMe(); +System.out.println(response); +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersMeResponse` + +--- + +## `getMeFollowers` + +GET `/2/users/me/followers` Paginated + +**Get the Authenticated User's Followers** + +Returns the Users who follow the authenticated user. Same results as `GET /2/users/{id}/followers` with your own user ID, without looking it up. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getMeFollowersPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersMeFollowersResponse` (use `getMeFollowersPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getMeFollowing` + +GET `/2/users/me/following` Paginated + +**Get the Users the Authenticated User Follows** + +Returns the Users the authenticated user follows. Same results as `GET /2/users/{id}/following` with your own user ID, without looking it up. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getMeFollowingPages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersMeFollowingResponse` (use `getMeFollowingPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getMentions` + +GET `/2/users/{id}/mentions` Paginated + +**Get Mentions** + +Retrieves a list of Posts that mention a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getMentionsPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetUsersMentionsResponse` (use `getMentionsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getMuting` + +GET `/2/users/{id}/muting` Paginated + +**Get Muting** + +Retrieves a list of Users muted by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getMutingPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.GetUsersMutingResponse` (use `getMutingPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getOwnedLists` + +GET `/2/users/{id}/owned_lists` Paginated + +**Get Owned Lists** + +Retrieves a list of Lists owned by a specific User by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getOwnedListsPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetUsersOwnedListsResponse` (use `getOwnedListsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getPinnedLists` + +GET `/2/users/{id}/pinned_lists` + +**Get Pinned Lists** + +Retrieves a list of Lists pinned by the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().getPinnedLists("2244994945"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Schemas.GetUsersPinnedListsResponse` + +--- + +## `getPosts` + +GET `/2/users/{id}/tweets` Paginated + +**Get Posts** + +Retrieves a list of Posts authored by a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().getPostsPages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetUsersPostsResponse` (use `getPostsPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getPublicKey` + +GET `/2/users/{id}/public_keys` + +**Get User Public Keys** + +Returns a user's registered public keys for X Chat encryption. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version and juicebox_config. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().getPublicKey("2244994945"); +System.out.println(response); +``` + +### Parameters + + + Numeric user ID, not `me`. For your own keys, use the `id` from Get My User (`GET /2/users/me`). + + + + + + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `Schemas.GetUsersPublicKeyResponse` + +--- + +## `getPublicKeys` + +GET `/2/users/public_keys` + +**Get Public Keys for Multiple Users** + +Returns the public keys that up to 100 users registered for X Chat encryption, looked up by numeric user ID. Each key carries the user_id of the user it belongs to. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version, juicebox_config and user_id. + +```java +import com.x.xdk.XClient; +import java.util.List; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().getPublicKeys(List.of("2244994945")); +System.out.println(response); +``` + +### Parameters + + + Comma-separated numeric user IDs (1-100), not @usernames. + + + + + + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `Schemas.GetUsersPublicKeysResponse` + +--- + +## `getRepostsOfMe` + +GET `/2/users/reposts_of_me` Paginated + +**Get Reposts of Me** + +Retrieves a list of Posts that repost content from the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getRepostsOfMePages()) { + System.out.println(page); +} +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetUsersRepostsOfMeResponse` (use `getRepostsOfMePages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `getTimeline` + +GET `/2/users/{id}/timelines/reverse_chronological` Paginated + +**Get Timeline** + +Retrieves a reverse chronological list of Posts in the authenticated user's Timeline. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +for (var page : client.users().getTimelinePages("2244994945")) { + System.out.println(page); +} +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Schemas.GetUsersTimelineResponse` (use `getTimelinePages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `idBlock` + +POST `/2/users/{id}/blocking` + +**Block User** + +Causes the source User to block the target User. A block also removes any follow between the two Users, in both directions, and unblocking does not restore it. Each call blocks one account: block only accounts the authenticated User named or approved, because finding or reviewing accounts is not approval to block them. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().idBlock( + "2244994945", + new Schemas.UsersIdBlockRequest().targetUserId("2244994945") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.UsersIdBlockResponse` + +--- + +## `idUnblock` + +DELETE `/2/users/{source_user_id}/blocking/{target_user_id}` + +**Unblock User** + +Causes the source User to unblock the target User. Unblocking does not restore any follow the block removed, so blocking and then unblocking a follower removes them as a follower: do that only for followers the authenticated User approved removing. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().idUnblock("2244994945", "2244994945"); +System.out.println(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Schemas.UsersIdUnblockResponse` + +--- + +## `likePost` + +POST `/2/users/{id}/likes` + +**Like Post** + +Causes the authenticated user to like a specific Post by its ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().likePost( + "2244994945", + new Schemas.LikePostRequest().tweetId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.LikePostResponse` + +--- + +## `muteUser` + +POST `/2/users/{id}/muting` + +**Mute User** + +Causes the authenticated user to mute a specific User by their ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().muteUser( + "2244994945", + new Schemas.MuteUserRequest().targetUserId("2244994945") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.MuteUserResponse` + +--- + +## `pinList` + +POST `/2/users/{id}/pinned_lists` + +**Pin List** + +Causes the authenticated user to pin a specific List by its ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().pinList( + "2244994945", + new Schemas.PinListRequest().listId("1450000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.PinListResponse` + +--- + +## `repostPost` + +POST `/2/users/{id}/retweets` + +**Repost Post** + +Causes the authenticated user to repost a specific Post by its ID. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().repostPost( + "2244994945", + new Schemas.RepostPostRequest().tweetId("1895000000000000000") +); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Schemas.RepostPostResponse` + +--- + +## `search` + +GET `/2/users/search` Paginated + +**Search Users** + +Retrieves a list of Users matching a search query. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +for (var page : client.users().searchPages("from:XDevelopers")) { + System.out.println(page); +} +``` + +### Parameters + + + A name or @username (1-50 chars): letters and digits in any language, spaces, and _ ' . - @ & " + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Schemas.SearchUsersResponse` (use `searchPages(...)` for automatic `Paginator<...>` iteration) + +--- + +## `unblockDms` + +POST `/2/users/{id}/dm/unblock` + +**Unblock DMs** + +Unblocks direct messages to or from a specific User by their ID for the authenticated user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().unblockDms("2244994945"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Schemas.UnblockUsersDmsResponse` + +--- + +## `unfollowList` + +DELETE `/2/users/{id}/followed_lists/{list_id}` + +**Unfollow List** + +Causes the authenticated user to unfollow a List by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().unfollowList("2244994945", "1450000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `Schemas.UnfollowListResponse` + +--- + +## `unfollowUser` + +DELETE `/2/users/{source_user_id}/following/{target_user_id}` + +**Unfollow User** + +Causes the authenticated user to unfollow a specific user by their ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().unfollowUser("2244994945", "2244994945"); +System.out.println(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Schemas.UnfollowUserResponse` + +--- + +## `unlikePost` + +DELETE `/2/users/{id}/likes/{tweet_id}` + +**Unlike Post** + +Causes the authenticated user to unlike a specific Post by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().unlikePost("2244994945", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `tweet_id` (path parameter). + + +**Returns:** `Schemas.UnlikePostResponse` + +--- + +## `unmuteUser` + +DELETE `/2/users/{source_user_id}/muting/{target_user_id}` + +**Unmute User** + +Causes the authenticated user to unmute the target user. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().unmuteUser("2244994945", "2244994945"); +System.out.println(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Schemas.UnmuteUserResponse` + +--- + +## `unpinList` + +DELETE `/2/users/{id}/pinned_lists/{list_id}` + +**Unpin List** + +Causes the authenticated user to unpin a List by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().unpinList("2244994945", "1450000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `Schemas.UnpinListResponse` + +--- + +## `unrepostPost` + +DELETE `/2/users/{id}/retweets/{source_tweet_id}` + +**Unrepost Post** + +Causes the authenticated user to unrepost a specific Post by its ID. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .accessToken(System.getenv("X_ACCESS_TOKEN")) + .build(); + +var response = client.users().unrepostPost("2244994945", "1895000000000000000"); +System.out.println(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_tweet_id` (path parameter). + + +**Returns:** `Schemas.UnrepostPostResponse` + +--- + diff --git a/xdks/java/reference/clients/webhooks.mdx b/xdks/java/reference/clients/webhooks.mdx new file mode 100644 index 000000000..e8c3ea2b5 --- /dev/null +++ b/xdks/java/reference/clients/webhooks.mdx @@ -0,0 +1,257 @@ +--- +title: "WebhooksClient (Java XDK)" +sidebarTitle: "Webhooks" +description: "Java XDK WebhooksClient reference — 8 methods for X API v2 Webhooks endpoints." +--- + +Access **Webhooks** endpoints via `client.webhooks()` (`WebhooksClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/webhooks` | Standard | Create Webhook | +| [`createStreamLink`](#createstreamlink) | `POST /2/tweets/search/webhooks/{webhook_id}` | Standard | Create Stream Link | +| [`createWebhookReplayJob`](#createwebhookreplayjob) | `POST /2/webhooks/replay` | Standard | Create Replay Job for Webhook | +| [`delete`](#delete) | `DELETE /2/webhooks/{webhook_id}` | Standard | Delete Webhook | +| [`deleteStreamLink`](#deletestreamlink) | `DELETE /2/tweets/search/webhooks/{webhook_id}` | Standard | Delete Stream Link | +| [`get`](#get) | `GET /2/webhooks` | Standard | Get Webhook | +| [`getStreamLinks`](#getstreamlinks) | `GET /2/tweets/search/webhooks` | Standard | Get Stream Links | +| [`validate`](#validate) | `PUT /2/webhooks/{webhook_id}` | Standard | Validate Webhook | + +## `create` + +POST `/2/webhooks` + +**Create Webhook** + +Creates a new webhook configuration. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().create( + new Schemas.CreateWebhooksRequest().url("https://example.com/webhook") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateWebhooksResponse` + +--- + +## `createStreamLink` + +POST `/2/tweets/search/webhooks/{webhook_id}` + +**Create Stream Link** + +Creates a link to deliver FilteredStream events to the given webhook. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().createStreamLink("1234567890"); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Schemas.CreateWebhooksStreamLinkResponse` + +--- + +## `createWebhookReplayJob` + +POST `/2/webhooks/replay` + +**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. + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().createWebhookReplayJob( + new Schemas.CreateWebhookReplayJobRequest().webhookId("1234567890").fromDate("example").toDate("example") +); +System.out.println(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Schemas.CreateWebhookReplayJobResponse` + +--- + +## `delete` + +DELETE `/2/webhooks/{webhook_id}` + +**Delete Webhook** + +Deletes an existing webhook configuration. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().delete("1234567890"); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Schemas.DeleteWebhooksResponse` + +--- + +## `deleteStreamLink` + +DELETE `/2/tweets/search/webhooks/{webhook_id}` + +**Delete Stream Link** + +Deletes the link delivering FilteredStream events to the given webhook. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().deleteStreamLink("1234567890"); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Schemas.DeleteWebhooksStreamLinkResponse` + +--- + +## `get` + +GET `/2/webhooks` + +**Get Webhook** + +Get a list of webhook configs associated with a client app. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().get(); +System.out.println(response); +``` + +### Parameters + + + + + A comma separated list of WebhookConfig fields to display. + + + + +**Returns:** `Schemas.GetWebhooksResponse` + +--- + +## `getStreamLinks` + +GET `/2/tweets/search/webhooks` + +**Get Stream Links** + +Get a list of webhook links associated with a filtered stream ruleset. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().getStreamLinks(); +System.out.println(response); +``` + +**Returns:** `Schemas.GetWebhooksStreamLinksResponse` + +--- + +## `validate` + +PUT `/2/webhooks/{webhook_id}` + +**Validate Webhook** + +Triggers a CRC check for a given webhook. + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.webhooks().validate("1234567890"); +System.out.println(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Schemas.ValidateWebhooksResponse` + +--- + diff --git a/xdks/java/reference/overview.mdx b/xdks/java/reference/overview.mdx new file mode 100644 index 000000000..190590e0d --- /dev/null +++ b/xdks/java/reference/overview.mdx @@ -0,0 +1,77 @@ +--- +title: "Java XDK API Reference" +sidebarTitle: "Overview" +description: "Complete API reference for the official Java XDK (com.x:xdk v0.1.2) across all X API v2 resource clients." +--- + +The official **Java XDK** (`com.x:xdk`, `v0.1.2`) provides typed resource clients, authentication helpers, automatic pagination, and real-time streaming for the X API v2. + + + + Install `com.x:xdk` (`v0.1.2`) — requires Java 17+. + + + Source code, release notes, and issue tracker for `com.x:xdk`. + + + +## Installation + +```kotlin +implementation("com.x:xdk:0.1.2") +``` + +## `XClient` Initialization + +```java +import com.x.xdk.XClient; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); +``` + + + Configures an OAuth 2.0 Bearer Token for app-only requests. + + + Configures an OAuth 2.0 user-context access token. + + + Attaches an `OAuth2Pkce` manager for automatic token refresh. + + + Attaches an `OAuth1` HMAC-SHA1 signer for OAuth 1.0a user-context requests. + + + Overrides the X API base URL. + + +## Resource Clients + +| Resource | Accessor | Client Class | Operations | +| :--- | :--- | :--- | ---: | +| [Account](/xdks/java/reference/clients/account) | `client.account()` | `AccountClient` | 2 | +| [Account Activity](/xdks/java/reference/clients/account-activity) | `client.accountActivity()` | `AccountActivityClient` | 5 | +| [Activity](/xdks/java/reference/clients/activity) | `client.activity()` | `ActivityClient` | 5 | +| [Articles](/xdks/java/reference/clients/articles) | `client.articles()` | `ArticlesClient` | 2 | +| [Bots](/xdks/java/reference/clients/bots) | `client.bots()` | `BotsClient` | 6 | +| [Broadcasts](/xdks/java/reference/clients/broadcasts) | `client.broadcasts()` | `BroadcastsClient` | 41 | +| [Calls](/xdks/java/reference/clients/calls) | `client.calls()` | `CallsClient` | 10 | +| [Chat](/xdks/java/reference/clients/chat) | `client.chat()` | `ChatClient` | 45 | +| [Communities](/xdks/java/reference/clients/communities) | `client.communities()` | `CommunitiesClient` | 2 | +| [Community Notes](/xdks/java/reference/clients/community-notes) | `client.communityNotes()` | `CommunityNotesClient` | 5 | +| [Compliance](/xdks/java/reference/clients/compliance) | `client.compliance()` | `ComplianceClient` | 6 | +| [Connections](/xdks/java/reference/clients/connections) | `client.connections()` | `ConnectionsClient` | 4 | +| [Direct Messages](/xdks/java/reference/clients/direct-messages) | `client.directMessages()` | `DirectMessagesClient` | 9 | +| [General](/xdks/java/reference/clients/general) | `client.general()` | `GeneralClient` | 1 | +| [Lists](/xdks/java/reference/clients/lists) | `client.lists()` | `ListsClient` | 9 | +| [Media](/xdks/java/reference/clients/media) | `client.media()` | `MediaClient` | 19 | +| [News](/xdks/java/reference/clients/news) | `client.news()` | `NewsClient` | 2 | +| [Posts](/xdks/java/reference/clients/posts) | `client.posts()` | `PostsClient` | 17 | +| [Spaces](/xdks/java/reference/clients/spaces) | `client.spaces()` | `SpacesClient` | 6 | +| [Stream](/xdks/java/reference/clients/stream) | `client.stream()` | `StreamClient` | 18 | +| [Trends](/xdks/java/reference/clients/trends) | `client.trends()` | `TrendsClient` | 3 | +| [Usage](/xdks/java/reference/clients/usage) | `client.usage()` | `UsageClient` | 2 | +| [Users](/xdks/java/reference/clients/users) | `client.users()` | `UsersClient` | 46 | +| [Webhooks](/xdks/java/reference/clients/webhooks) | `client.webhooks()` | `WebhooksClient` | 8 | diff --git a/xdks/java/streaming.mdx b/xdks/java/streaming.mdx new file mode 100644 index 000000000..1f543d0d1 --- /dev/null +++ b/xdks/java/streaming.mdx @@ -0,0 +1,57 @@ +--- +title: Java Streaming +sidebarTitle: Streaming +description: Consume real-time X API v2 streams in Java using EventStream with try-with-resources lifecycle management and automatic reconnection. +--- + +Streaming methods on `client.stream()` return `EventStream`, which implements both `Iterable` and `AutoCloseable`. Wrapping the stream in `try (...)` guarantees the underlying HTTP connection is closed cleanly when you exit the loop. + +## Sampled & Filtered Post Streams + +```java +import com.x.xdk.Schemas; +import com.x.xdk.XClient; +import com.x.xdk.clients.StreamClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +StreamClient.PostsOptions options = StreamClient.PostsOptions.builder() + .tweetFields(List.of("created_at", "author_id", "public_metrics")); + +try (var stream = client.stream().posts(options)) { + int count = 0; + for (Schemas.StreamPostsResponse event : stream) { + System.out.println(event.getData()); + if (++count >= 25) { + break; // Exiting try-with-resources closes the HTTP stream + } + } +} +``` + +## Managing Filtered Stream Rules + +Add or delete Filtered Stream rules via `client.stream().updateRules(...)` and inspect active rules with `client.stream().getRulesPages()`: + +```java +import com.fasterxml.jackson.databind.ObjectMapper; +import com.x.xdk.XClient; + +ObjectMapper mapper = new ObjectMapper(); + +// Add a filter rule +var addPayload = mapper.readTree( + "{\"add\":[{\"value\":\"from:XDevelopers -is:retweet\",\"tag\":\"xdevs\"}]}" +); +client.stream().updateRules(addPayload); + +// List active rules +for (var page : client.stream().getRulesPages()) { + System.out.println(page.getData()); +} +``` + +See [Build a Rule](/x-api/posts/filtered-stream/integrate/build-a-rule) for the full Filtered Stream operator reference. diff --git a/xdks/llms.txt b/xdks/llms.txt index c10309450..89faf5a8a 100644 --- a/xdks/llms.txt +++ b/xdks/llms.txt @@ -1,11 +1,45 @@ -# X API SDKs (XDKs) +# X Official SDKs (XDKs) -> Official Python and TypeScript/JavaScript SDKs for the X API, including full client libraries, model definitions, pagination helpers, and streaming support. +> Official, OpenAPI-generated client libraries for the X API v2 in Python, TypeScript, Java, and C# (.NET). -## Python XDK -- [Python XDK Overview](https://docs.x.com/xdks/python/llms.txt): Full reference for the Python SDK +## Official Packages -## TypeScript XDK -- [TypeScript XDK Overview](https://docs.x.com/xdks/typescript/llms.txt): Full reference for the TypeScript/JavaScript SDK +- **Python**: `xdk` (`v0.11.2`, Python 3.8+) — `pip install xdk` — [Index](https://docs.x.com/xdks/python/llms.txt) +- **TypeScript**: `@xdevplatform/xdk` (`v0.7.2`, Node.js 18+ (ESM & CommonJS)) — `npm install @xdevplatform/xdk` — [Index](https://docs.x.com/xdks/typescript/llms.txt) +- **Java**: `com.x:xdk` (`v0.1.2`, Java 17+) — `implementation("com.x:xdk:0.1.2")` — [Index](https://docs.x.com/xdks/java/llms.txt) +- **C#**: `XDevPlatform.Xdk` (`v0.1.2`, .NET 8.0+) — `dotnet add package XDevPlatform.Xdk` — [Index](https://docs.x.com/xdks/csharp/llms.txt) -See the individual nested llms.txt files for complete class, interface, and method documentation. +## Overview & Guides + +- [XDKs Overview](https://docs.x.com/xdks/overview.md): Side-by-side comparison, authentication matrix, pagination, and streaming across all 4 official SDKs. +- [Python Overview](https://docs.x.com/xdks/python/overview.md) | [Install](https://docs.x.com/xdks/python/install.md) | [Quickstart](https://docs.x.com/xdks/python/quickstart.md) | [Auth](https://docs.x.com/xdks/python/authentication.md) | [Pagination](https://docs.x.com/xdks/python/pagination.md) | [Streaming](https://docs.x.com/xdks/python/streaming.md) | [API Reference](https://docs.x.com/xdks/python/reference/overview.md) +- [TypeScript Overview](https://docs.x.com/xdks/typescript/overview.md) | [Install](https://docs.x.com/xdks/typescript/install.md) | [Quickstart](https://docs.x.com/xdks/typescript/quickstart.md) | [Auth](https://docs.x.com/xdks/typescript/authentication.md) | [Pagination](https://docs.x.com/xdks/typescript/pagination.md) | [Streaming](https://docs.x.com/xdks/typescript/streaming.md) | [API Reference](https://docs.x.com/xdks/typescript/reference/overview.md) +- [Java Overview](https://docs.x.com/xdks/java/overview.md) | [Install](https://docs.x.com/xdks/java/install.md) | [Quickstart](https://docs.x.com/xdks/java/quickstart.md) | [Auth](https://docs.x.com/xdks/java/authentication.md) | [Pagination](https://docs.x.com/xdks/java/pagination.md) | [Streaming](https://docs.x.com/xdks/java/streaming.md) | [API Reference](https://docs.x.com/xdks/java/reference/overview.md) +- [C# Overview](https://docs.x.com/xdks/csharp/overview.md) | [Install](https://docs.x.com/xdks/csharp/install.md) | [Quickstart](https://docs.x.com/xdks/csharp/quickstart.md) | [Auth](https://docs.x.com/xdks/csharp/authentication.md) | [Pagination](https://docs.x.com/xdks/csharp/pagination.md) | [Streaming](https://docs.x.com/xdks/csharp/streaming.md) | [API Reference](https://docs.x.com/xdks/csharp/reference/overview.md) + +## Resource Clients (Available in All 4 XDKs) + +- **Account** (`AccountClient`, 2 operations): [Python](https://docs.x.com/xdks/python/reference/clients/account.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/account.md) | [Java](https://docs.x.com/xdks/java/reference/clients/account.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/account.md) +- **Account Activity** (`AccountActivityClient`, 5 operations): [Python](https://docs.x.com/xdks/python/reference/clients/account-activity.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/account-activity.md) | [Java](https://docs.x.com/xdks/java/reference/clients/account-activity.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/account-activity.md) +- **Activity** (`ActivityClient`, 5 operations): [Python](https://docs.x.com/xdks/python/reference/clients/activity.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/activity.md) | [Java](https://docs.x.com/xdks/java/reference/clients/activity.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/activity.md) +- **Articles** (`ArticlesClient`, 2 operations): [Python](https://docs.x.com/xdks/python/reference/clients/articles.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/articles.md) | [Java](https://docs.x.com/xdks/java/reference/clients/articles.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/articles.md) +- **Bots** (`BotsClient`, 6 operations): [Python](https://docs.x.com/xdks/python/reference/clients/bots.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/bots.md) | [Java](https://docs.x.com/xdks/java/reference/clients/bots.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/bots.md) +- **Broadcasts** (`BroadcastsClient`, 41 operations): [Python](https://docs.x.com/xdks/python/reference/clients/broadcasts.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/broadcasts.md) | [Java](https://docs.x.com/xdks/java/reference/clients/broadcasts.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/broadcasts.md) +- **Calls** (`CallsClient`, 10 operations): [Python](https://docs.x.com/xdks/python/reference/clients/calls.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/calls.md) | [Java](https://docs.x.com/xdks/java/reference/clients/calls.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/calls.md) +- **Chat** (`ChatClient`, 45 operations): [Python](https://docs.x.com/xdks/python/reference/clients/chat.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/chat.md) | [Java](https://docs.x.com/xdks/java/reference/clients/chat.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/chat.md) +- **Communities** (`CommunitiesClient`, 2 operations): [Python](https://docs.x.com/xdks/python/reference/clients/communities.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/communities.md) | [Java](https://docs.x.com/xdks/java/reference/clients/communities.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/communities.md) +- **Community Notes** (`CommunityNotesClient`, 5 operations): [Python](https://docs.x.com/xdks/python/reference/clients/community-notes.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/community-notes.md) | [Java](https://docs.x.com/xdks/java/reference/clients/community-notes.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/community-notes.md) +- **Compliance** (`ComplianceClient`, 6 operations): [Python](https://docs.x.com/xdks/python/reference/clients/compliance.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/compliance.md) | [Java](https://docs.x.com/xdks/java/reference/clients/compliance.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/compliance.md) +- **Connections** (`ConnectionsClient`, 4 operations): [Python](https://docs.x.com/xdks/python/reference/clients/connections.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/connections.md) | [Java](https://docs.x.com/xdks/java/reference/clients/connections.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/connections.md) +- **Direct Messages** (`DirectMessagesClient`, 9 operations): [Python](https://docs.x.com/xdks/python/reference/clients/direct-messages.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/direct-messages.md) | [Java](https://docs.x.com/xdks/java/reference/clients/direct-messages.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/direct-messages.md) +- **General** (`GeneralClient`, 1 operations): [Python](https://docs.x.com/xdks/python/reference/clients/general.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/general.md) | [Java](https://docs.x.com/xdks/java/reference/clients/general.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/general.md) +- **Lists** (`ListsClient`, 9 operations): [Python](https://docs.x.com/xdks/python/reference/clients/lists.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/lists.md) | [Java](https://docs.x.com/xdks/java/reference/clients/lists.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/lists.md) +- **Media** (`MediaClient`, 19 operations): [Python](https://docs.x.com/xdks/python/reference/clients/media.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/media.md) | [Java](https://docs.x.com/xdks/java/reference/clients/media.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/media.md) +- **News** (`NewsClient`, 2 operations): [Python](https://docs.x.com/xdks/python/reference/clients/news.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/news.md) | [Java](https://docs.x.com/xdks/java/reference/clients/news.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/news.md) +- **Posts** (`PostsClient`, 17 operations): [Python](https://docs.x.com/xdks/python/reference/clients/posts.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/posts.md) | [Java](https://docs.x.com/xdks/java/reference/clients/posts.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/posts.md) +- **Spaces** (`SpacesClient`, 6 operations): [Python](https://docs.x.com/xdks/python/reference/clients/spaces.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/spaces.md) | [Java](https://docs.x.com/xdks/java/reference/clients/spaces.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/spaces.md) +- **Stream** (`StreamClient`, 18 operations): [Python](https://docs.x.com/xdks/python/reference/clients/stream.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/stream.md) | [Java](https://docs.x.com/xdks/java/reference/clients/stream.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/stream.md) +- **Trends** (`TrendsClient`, 3 operations): [Python](https://docs.x.com/xdks/python/reference/clients/trends.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/trends.md) | [Java](https://docs.x.com/xdks/java/reference/clients/trends.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/trends.md) +- **Usage** (`UsageClient`, 2 operations): [Python](https://docs.x.com/xdks/python/reference/clients/usage.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/usage.md) | [Java](https://docs.x.com/xdks/java/reference/clients/usage.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/usage.md) +- **Users** (`UsersClient`, 46 operations): [Python](https://docs.x.com/xdks/python/reference/clients/users.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/users.md) | [Java](https://docs.x.com/xdks/java/reference/clients/users.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/users.md) +- **Webhooks** (`WebhooksClient`, 8 operations): [Python](https://docs.x.com/xdks/python/reference/clients/webhooks.md) | [TypeScript](https://docs.x.com/xdks/typescript/reference/clients/webhooks.md) | [Java](https://docs.x.com/xdks/java/reference/clients/webhooks.md) | [C#](https://docs.x.com/xdks/csharp/reference/clients/webhooks.md) diff --git a/xdks/overview.mdx b/xdks/overview.mdx new file mode 100644 index 000000000..a45573721 --- /dev/null +++ b/xdks/overview.mdx @@ -0,0 +1,147 @@ +--- +title: Official XDKs (X Developer Kits) +sidebarTitle: Overview +description: Official, OpenAPI-generated client libraries for the X API v2 in Python, TypeScript, Java, and C# (.NET) with built-in OAuth, pagination, and streaming. +keywords: ["XDK", "X SDK", "Python SDK", "TypeScript SDK", "Java SDK", "C# SDK", ".NET SDK", "X API v2", "client libraries"] +--- + +The **X Developer Kits (XDKs)** are the official client libraries for the X API v2. Every SDK is generated directly from the [official X API OpenAPI specification](https://api.x.com/2/openapi.json), keeping endpoint coverage, request/response models, authentication helpers, pagination, and streaming synchronized across languages. + + + + `pip install xdk` — Python 3.8+, Pydantic v2 models, iterator pagination, and generator streaming. + + + `npm install @xdevplatform/xdk` — Node.js 18+, dual ESM/CommonJS, full TypeScript types, and `EventDrivenStream`. + + + `com.x:xdk:0.1.2` on Maven Central — Java 17+, builder-based `XClient`, `Paginator`, and `EventStream`. + + + `dotnet add package XDevPlatform.Xdk` — .NET 8+, zero external runtime dependencies, `IAsyncEnumerable` paging & streaming. + + + +--- + +## Compare Official SDKs + +| Language | Package | Runtime | Registry | Source Repository | +| :--- | :--- | :--- | :--- | :--- | +| **Python** | `xdk` | Python 3.8+ | [PyPI](https://pypi.org/project/xdk/) | [xdevplatform/xdk-python](https://github.com/xdevplatform/xdk-python) | +| **TypeScript / JS** | `@xdevplatform/xdk` | Node.js 18+ | [npm](https://www.npmjs.com/package/@xdevplatform/xdk) | [xdevplatform/xdk-typescript](https://github.com/xdevplatform/xdk-typescript) | +| **Java** | `com.x:xdk:0.1.2` | Java 17+ | [Maven Central](https://central.sonatype.com/artifact/com.x/xdk) | [xdevplatform/xdk-java](https://github.com/xdevplatform/xdk-java) | +| **C# / .NET** | `XDevPlatform.Xdk` | .NET 8.0+ | [NuGet](https://www.nuget.org/packages/XDevPlatform.Xdk) | [xdevplatform/xdk-csharp](https://github.com/xdevplatform/xdk-csharp) | + +--- + +## Side-by-Side Quickstart + +Look up `@XDevelopers` using an app-only Bearer Token in any of the four official XDKs: + + + +```bash +pip install xdk +``` + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) +response = client.users.get_by_username( + username="XDevelopers", + user_fields=["created_at", "public_metrics"], +) +print(response.data) +``` + + +```bash +npm install @xdevplatform/xdk +``` + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); +const response = await client.users.getByUsername("XDevelopers", { + userFields: ["created_at", "public_metrics"], +}); +console.log(response.data); +``` + + +```xml + + com.x + xdk + 0.1.2 + +``` + +```java +import com.x.xdk.XClient; +import com.x.xdk.clients.UsersClient; +import java.util.List; + +XClient client = XClient.builder() + .bearerToken(System.getenv("X_BEARER_TOKEN")) + .build(); + +var response = client.users().getByUsername( + "XDevelopers", + UsersClient.GetByUsernameOptions.builder() + .userFields(List.of("created_at", "public_metrics")) +); +System.out.println(response.getData()); +``` + + +```bash +dotnet add package XDevPlatform.Xdk +``` + +```csharp +using System; +using System.Collections.Generic; +using Xdk; +using Xdk.Clients; + +using var client = new XClient(new XClientOptions +{ + BearerToken = Environment.GetEnvironmentVariable("X_BEARER_TOKEN"), +}); + +var response = await client.Users.GetByUsernameAsync( + "XDevelopers", + new UsersClient.GetByUsernameOptions + { + UserFields = new List { "created_at", "public_metrics" }, + }); +Console.WriteLine(response.Data); +``` + + + +--- + +## Core Capabilities Across All 4 SDKs + +- **Unified Resource Clients**: Every X API v2 tag maps to a dedicated sub-client (`posts`, `users`, `stream`, `direct_messages` / `directMessages` / `DirectMessages`, `spaces`, `lists`, `communities`, `chat`, `media`, `webhooks`, `compliance`, `trends`, `news`, `usage`, and more). +- **Complete Authentication Support**: + - **Bearer Token** (app-only read, search, and filtered/sample streaming) + - **OAuth 2.0 User Context with PKCE** (fine-grained scopes + refresh token rotation) + - **OAuth 1.0a User Context** (HMAC-SHA1 request signing) +- **Native Pagination**: + - Python yields pages lazily via standard `Iterator` generators (`for page in client.posts.search_recent(...):`). + - TypeScript provides `Paginator`, `PostPaginator`, `UserPaginator`, and `EventPaginator` with `for await (...)`. + - Java exposes `*Pages(...)` methods returning `Paginator` (`Iterable`). + - C# exposes `*Pages(...)` methods returning `Paginator` (`IAsyncEnumerable`). +- **Resilient Real-Time Streaming**: + - Incremental UTF-8 NDJSON frame decoding, heartbeat handling, and resource cleanup across Filtered Stream, Sample Streams, Firehose, Compliance Streams, and Activity Stream. + + +Building encrypted direct messaging with the X Chat API? Pair any of these XDKs with the [Chat XDK](/xchat/xchat-xdk) (available in Python, TypeScript, Java, C#, Go, and Rust) for client-side key management, encryption, and message signing. + diff --git a/xdks/python/install.mdx b/xdks/python/install.mdx index 5fd728f0c..32471713f 100644 --- a/xdks/python/install.mdx +++ b/xdks/python/install.mdx @@ -1,39 +1,61 @@ --- -title: "Install" -sidebarTitle: "Install" -description: "Install the Python XDK from PyPI with pip, set up a venv, or build from source for development to start calling X API v2 endpoints in Python 3.8 or higher." +title: Install Python XDK +sidebarTitle: Install +description: Install the official Python XDK (xdk) from PyPI with pip or uv, set up a virtual environment, or install from source for Python 3.8+. --- -The XDK Python SDK is available directly from the GitHub repository and can be installed via `pip`. + +Install the official **Python XDK** (`xdk`) from [PyPI](https://pypi.org/project/xdk/). + ## Prerequisites -- Python 3.8 or higher. -- `pip` and `venv` for virtual environments (recommended). -## Quick Install -Install the XDK from the GitHub subdirectory: + +- **Python 3.8+** (CPython or PyPy) +- `pip` or `uv` + +## Install from PyPI + + + +```bash pip +pip install xdk +``` + +```bash uv +uv add xdk +``` + +```bash poetry +poetry add xdk +``` + + + +## Virtual Environment Setup (Recommended) + ```bash +python3 -m venv .venv +source .venv/bin/activate pip install xdk ``` -This fetches the latest generated version from the `main` branch. -## Development Install -For development or contributing: -1. Clone the repository: - ```bash - git clone https://github.com/xdevplatform/xdk.git - cd xdk/python - ``` -2. Install dependencies in editable mode: - ```bash - pip install -e . - ``` - This installs the SDK and its runtime dependencies. -3. (Optional) Install dev dependencies for testing/linting: - ```bash - pip install -e .[dev] - ``` -## Verification -Test the installation: + +## Verify Installation + ```python import xdk -print(xdk.__version__) # Should print the XDK version +from xdk import Client + +print(xdk.__version__) +``` + +## Install from Source + +```bash +git clone https://github.com/xdevplatform/xdk-python.git +cd xdk-python +pip install -e ".[dev]" ``` -**Note:** Since the XDK is generated using the OpenAPI spec, always check the [X API changelog](https://docs.x.com/changelog) and XDK release notes in the repo for any changes. -For detailed code examples using the Python XDK, check out our [code samples GitHub repo](https://github.com/xdevplatform/samples/tree/main/python). + +## Next Steps + +- [Quickstart](/xdks/python/quickstart) — Run your first search query +- [Authentication](/xdks/python/authentication) — Configure Bearer Token, OAuth 2.0 PKCE, or OAuth 1.0a +- [API Reference](/xdks/python/reference/overview) — Browse all 24 resource clients diff --git a/xdks/python/llms.txt b/xdks/python/llms.txt index 8a7bfc66d..e290f6357 100644 --- a/xdks/python/llms.txt +++ b/xdks/python/llms.txt @@ -1,78 +1,40 @@ -# Python XDK +# Python XDK (`xdk` v0.11.2) -> Official Python SDK for the X API — clients, authentication, pagination, streaming, models, and complete endpoint coverage. +> Official Python SDK for the X API v2 (Python 3.8+). Install with `pip install xdk`. -## Core -- [Authentication](https://docs.x.com/xdks/python/authentication.md): The X API requires authentication for all endpoints. The XDK supports three authentication methods: 1. -- [Install](https://docs.x.com/xdks/python/install.md): The XDK Python SDK is available directly from the GitHub repository and can be installed via `pip`. ## Prerequisites - -- [Python XDK](https://docs.x.com/xdks/python/overview.md): Official Python client library for the X API v2. Supports OAuth, automatic pagination, real-time streaming, and all v2 -- [Pagination](https://docs.x.com/xdks/python/pagination.md): The X API uses pagination for endpoints that return multiple pages of results (e. -- [Quickstart](https://docs.x.com/xdks/python/quickstart.md): This example showcases how to quickly search for Posts using the XDK using Bearer Token authentication. ## Step 1: Ins -- [Streaming](https://docs.x.com/xdks/python/streaming.md): The X API supports real-time data via endpoints like the [Filtered Stream Endpoint](https://docs. +## Guides -## Reference -- [X API SDK Documentation](https://docs.x.com/xdks/python/reference/index.md) -- [xdk](https://docs.x.com/xdks/python/reference/modules.md) -- [AccountActivityClient](https://docs.x.com/xdks/python/reference/xdk.account_activity.client.md) -- [AccountActivityClient](https://docs.x.com/xdks/python/reference/xdk.account_activity.md) -- [Account_activity.Models](https://docs.x.com/xdks/python/reference/xdk.account_activity.models.md) -- [ActivityClient](https://docs.x.com/xdks/python/reference/xdk.activity.client.md) -- [ActivityClient](https://docs.x.com/xdks/python/reference/xdk.activity.md) -- [Activity.Models](https://docs.x.com/xdks/python/reference/xdk.activity.models.md) -- [Client](https://docs.x.com/xdks/python/reference/xdk.client.md) -- [CommunitiesClient](https://docs.x.com/xdks/python/reference/xdk.communities.client.md) -- [CommunitiesClient](https://docs.x.com/xdks/python/reference/xdk.communities.md) -- [Communities.Models](https://docs.x.com/xdks/python/reference/xdk.communities.models.md) -- [CommunityNotesClient](https://docs.x.com/xdks/python/reference/xdk.community_notes.client.md) -- [CommunityNotesClient](https://docs.x.com/xdks/python/reference/xdk.community_notes.md) -- [Community_notes.Models](https://docs.x.com/xdks/python/reference/xdk.community_notes.models.md) -- [ComplianceClient](https://docs.x.com/xdks/python/reference/xdk.compliance.client.md) -- [ComplianceClient](https://docs.x.com/xdks/python/reference/xdk.compliance.md) -- [Compliance.Models](https://docs.x.com/xdks/python/reference/xdk.compliance.models.md) -- [ConnectionsClient](https://docs.x.com/xdks/python/reference/xdk.connections.client.md) -- [ConnectionsClient](https://docs.x.com/xdks/python/reference/xdk.connections.md) -- [Connections.Models](https://docs.x.com/xdks/python/reference/xdk.connections.models.md) -- [DirectMessagesClient](https://docs.x.com/xdks/python/reference/xdk.direct_messages.client.md) -- [DirectMessagesClient](https://docs.x.com/xdks/python/reference/xdk.direct_messages.md) -- [Direct_messages.Models](https://docs.x.com/xdks/python/reference/xdk.direct_messages.models.md) -- [GeneralClient](https://docs.x.com/xdks/python/reference/xdk.general.client.md) -- [GeneralClient](https://docs.x.com/xdks/python/reference/xdk.general.md) -- [General.Models](https://docs.x.com/xdks/python/reference/xdk.general.models.md) -- [ListsClient](https://docs.x.com/xdks/python/reference/xdk.lists.client.md) -- [ListsClient](https://docs.x.com/xdks/python/reference/xdk.lists.md) -- [Lists.Models](https://docs.x.com/xdks/python/reference/xdk.lists.models.md) -- [Client](https://docs.x.com/xdks/python/reference/xdk.md) -- [MediaClient](https://docs.x.com/xdks/python/reference/xdk.media.client.md) -- [MediaClient](https://docs.x.com/xdks/python/reference/xdk.media.md) -- [Media.Models](https://docs.x.com/xdks/python/reference/xdk.media.models.md) -- [NewsClient](https://docs.x.com/xdks/python/reference/xdk.news.client.md) -- [NewsClient](https://docs.x.com/xdks/python/reference/xdk.news.md) -- [News.Models](https://docs.x.com/xdks/python/reference/xdk.news.models.md) -- [oauth1_auth](https://docs.x.com/xdks/python/reference/xdk.oauth1_auth.md) -- [OAuth2PKCEAuth](https://docs.x.com/xdks/python/reference/xdk.oauth2_auth.md) -- [paginator](https://docs.x.com/xdks/python/reference/xdk.paginator.md) -- [PostsClient](https://docs.x.com/xdks/python/reference/xdk.posts.client.md) -- [PostsClient](https://docs.x.com/xdks/python/reference/xdk.posts.md) -- [Posts.Models](https://docs.x.com/xdks/python/reference/xdk.posts.models.md) -- [SpacesClient](https://docs.x.com/xdks/python/reference/xdk.spaces.client.md) -- [SpacesClient](https://docs.x.com/xdks/python/reference/xdk.spaces.md) -- [Spaces.Models](https://docs.x.com/xdks/python/reference/xdk.spaces.models.md) -- [StreamClient](https://docs.x.com/xdks/python/reference/xdk.stream.client.md) -- [StreamClient](https://docs.x.com/xdks/python/reference/xdk.stream.md) -- [Stream.Models](https://docs.x.com/xdks/python/reference/xdk.stream.models.md) -- [streaming](https://docs.x.com/xdks/python/reference/xdk.streaming.md) -- [TrendsClient](https://docs.x.com/xdks/python/reference/xdk.trends.client.md) -- [TrendsClient](https://docs.x.com/xdks/python/reference/xdk.trends.md) -- [Trends.Models](https://docs.x.com/xdks/python/reference/xdk.trends.models.md) -- [UsageClient](https://docs.x.com/xdks/python/reference/xdk.usage.client.md) -- [UsageClient](https://docs.x.com/xdks/python/reference/xdk.usage.md) -- [Usage.Models](https://docs.x.com/xdks/python/reference/xdk.usage.models.md) -- [UsersClient](https://docs.x.com/xdks/python/reference/xdk.users.client.md) -- [UsersClient](https://docs.x.com/xdks/python/reference/xdk.users.md) -- [Users.Models](https://docs.x.com/xdks/python/reference/xdk.users.models.md) -- [WebhooksClient](https://docs.x.com/xdks/python/reference/xdk.webhooks.client.md) -- [WebhooksClient](https://docs.x.com/xdks/python/reference/xdk.webhooks.md) -- [Webhooks.Models](https://docs.x.com/xdks/python/reference/xdk.webhooks.models.md) +- [Python overview](https://docs.x.com/xdks/python/overview.md): Architecture, capabilities, and client overview +- [Python install](https://docs.x.com/xdks/python/install.md): Package installation and runtime requirements +- [Python quickstart](https://docs.x.com/xdks/python/quickstart.md): First authenticated X API v2 request in under 2 minutes +- [Python authentication](https://docs.x.com/xdks/python/authentication.md): Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a user-context setup +- [Python pagination](https://docs.x.com/xdks/python/pagination.md): Automatic cursor iteration across multi-page endpoints +- [Python streaming](https://docs.x.com/xdks/python/streaming.md): Real-time event streams with reconnection and lifecycle handling -## Full Documentation -- [llms-full.txt](https://docs.x.com/llms-full.txt) \ No newline at end of file +## Client Reference + +- [Reference Overview](https://docs.x.com/xdks/python/reference/overview.md): Main client options and resource client directory +- [`AccountClient` (Account)](https://docs.x.com/xdks/python/reference/clients/account.md): 2 methods via `client.account` +- [`AccountActivityClient` (Account Activity)](https://docs.x.com/xdks/python/reference/clients/account-activity.md): 5 methods via `client.account_activity` +- [`ActivityClient` (Activity)](https://docs.x.com/xdks/python/reference/clients/activity.md): 5 methods via `client.activity` +- [`ArticlesClient` (Articles)](https://docs.x.com/xdks/python/reference/clients/articles.md): 2 methods via `client.articles` +- [`BotsClient` (Bots)](https://docs.x.com/xdks/python/reference/clients/bots.md): 6 methods via `client.bots` +- [`BroadcastsClient` (Broadcasts)](https://docs.x.com/xdks/python/reference/clients/broadcasts.md): 41 methods via `client.broadcasts` +- [`CallsClient` (Calls)](https://docs.x.com/xdks/python/reference/clients/calls.md): 10 methods via `client.calls` +- [`ChatClient` (Chat)](https://docs.x.com/xdks/python/reference/clients/chat.md): 45 methods via `client.chat` +- [`CommunitiesClient` (Communities)](https://docs.x.com/xdks/python/reference/clients/communities.md): 2 methods via `client.communities` +- [`CommunityNotesClient` (Community Notes)](https://docs.x.com/xdks/python/reference/clients/community-notes.md): 5 methods via `client.community_notes` +- [`ComplianceClient` (Compliance)](https://docs.x.com/xdks/python/reference/clients/compliance.md): 6 methods via `client.compliance` +- [`ConnectionsClient` (Connections)](https://docs.x.com/xdks/python/reference/clients/connections.md): 4 methods via `client.connections` +- [`DirectMessagesClient` (Direct Messages)](https://docs.x.com/xdks/python/reference/clients/direct-messages.md): 9 methods via `client.direct_messages` +- [`GeneralClient` (General)](https://docs.x.com/xdks/python/reference/clients/general.md): 1 methods via `client.general` +- [`ListsClient` (Lists)](https://docs.x.com/xdks/python/reference/clients/lists.md): 9 methods via `client.lists` +- [`MediaClient` (Media)](https://docs.x.com/xdks/python/reference/clients/media.md): 19 methods via `client.media` +- [`NewsClient` (News)](https://docs.x.com/xdks/python/reference/clients/news.md): 2 methods via `client.news` +- [`PostsClient` (Posts)](https://docs.x.com/xdks/python/reference/clients/posts.md): 17 methods via `client.posts` +- [`SpacesClient` (Spaces)](https://docs.x.com/xdks/python/reference/clients/spaces.md): 6 methods via `client.spaces` +- [`StreamClient` (Stream)](https://docs.x.com/xdks/python/reference/clients/stream.md): 18 methods via `client.stream` +- [`TrendsClient` (Trends)](https://docs.x.com/xdks/python/reference/clients/trends.md): 3 methods via `client.trends` +- [`UsageClient` (Usage)](https://docs.x.com/xdks/python/reference/clients/usage.md): 2 methods via `client.usage` +- [`UsersClient` (Users)](https://docs.x.com/xdks/python/reference/clients/users.md): 46 methods via `client.users` +- [`WebhooksClient` (Webhooks)](https://docs.x.com/xdks/python/reference/clients/webhooks.md): 8 methods via `client.webhooks` diff --git a/xdks/python/overview.mdx b/xdks/python/overview.mdx index 5792e52ea..ea596ed1f 100644 --- a/xdks/python/overview.mdx +++ b/xdks/python/overview.mdx @@ -1,14 +1,62 @@ --- title: Python XDK sidebarTitle: Overview -description: "Overview of the Python XDK, the official X API v2 client library generated from OpenAPI with OAuth, pagination, and streaming support for Python 3.8 and above." +description: Official Python SDK (xdk) for the X API v2 with Pydantic v2 models, OAuth 2.0 PKCE, OAuth 1.0a, automatic cursor pagination, and real-time streaming. --- -The Python XDK (X Developer Kit) is our official client library for interacting with the X API v2 using Python. It allows developers to get started with our API quickly and build applications with it. It is generated based on our official [OpenAPI specification](https://api.x.com/2/openapi.json). It abstracts away low-level HTTP details while providing fine-grained control when needed. + +The **Python XDK** (`xdk`) is X's official Python client library for the X API v2, generated directly from the [official OpenAPI specification](https://api.x.com/2/openapi.json). + + + + `pip install xdk` — Python 3.8+. + + + Source code, release notes, and issue tracker. + + + ## Key Features -- 🔐 **OAuth Support**: Full support for Bearer Token (app-only) auth, OAuth 2.0 with PKCE (user context), and OAuth 1.0. -- 🔄 **Pagination**: Automatically page through large results. The XDK takes care of pagination without requiring you to make multiple API calls using the `next_token`. -- 📡 **Streaming**: Supports real-time data streaming for endpoints like filtered stream that require persistent http connection. -- 🎯 **Comprehensive Coverage**: Supports all X API v2 endpoints including such as search, timelines, filtered-stream and more. -**Version Compatibility**: Python 3.8+. Tested on CPython and PyPy. -**License**: [MIT License](https://github.com/xdevplatform/xdk/blob/main/LICENSE) -For detailed code examples using the Python XDK, check out our [code samples GitHub repo](https://github.com/xdevplatform/samples/tree/main/python). + +- **Authentication**: App-only Bearer Token, OAuth 2.0 User Context with PKCE and token refresh, and OAuth 1.0a HMAC-SHA1 signing. +- **Typed Models**: Pydantic v2 request and response models with open-enum forward compatibility. +- **Automatic Pagination**: Generator-based cursor iteration across multi-page endpoints without manual `pagination_token` loops. +- **Real-Time Streaming**: Persistent streaming iterators for Filtered Stream, Sample Streams, Firehose, Compliance, and Activity Stream. +- **Complete API Coverage**: 24 resource clients covering Posts, Users, Streams, Direct Messages, Chat, Spaces, Lists, Communities, Media, Webhooks, Trends, News, Usage, and more. + +## Quick Example + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.search_recent(query="from:XDevelopers", max_results=10): + if page.data: + for post in page.data: + print(post.id, post.text) + break +``` + +## Guides & Reference + + + + Install from PyPI or set up a virtual environment. + + + Make your first X API v2 call in Python. + + + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a setup. + + + Iterate across multi-page endpoints lazily. + + + Consume real-time post and activity streams. + + + Full method & parameter reference for all 24 clients. + + diff --git a/xdks/python/reference/clients/account-activity.mdx b/xdks/python/reference/clients/account-activity.mdx new file mode 100644 index 000000000..ceeaee01e --- /dev/null +++ b/xdks/python/reference/clients/account-activity.mdx @@ -0,0 +1,161 @@ +--- +title: "AccountActivityClient (Python XDK)" +sidebarTitle: "Account Activity" +description: "Python XDK AccountActivityClient reference — 5 methods for X API v2 Account Activity endpoints." +--- + +Access **Account Activity** endpoints via `client.account_activity` (`AccountActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create_subscription`](#create_subscription) | `POST /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Create Subscription | +| [`delete_subscription`](#delete_subscription) | `DELETE /2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` | Standard | Delete Subscription | +| [`get_subscription_count`](#get_subscription_count) | `GET /2/account_activity/subscriptions/count` | Standard | Get Subscription Count | +| [`get_subscriptions`](#get_subscriptions) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` | Standard | Get Subscriptions | +| [`validate_subscription`](#validate_subscription) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Validate Subscription | + +## `create_subscription` + +POST `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Create Subscription** + +Creates an Account Activity subscription for the user and the given webhook. + +```python +import os +from xdk import Client +from xdk.account_activity.models import CreateSubscriptionRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.account_activity.create_subscription(webhook_id="1234567890", body=CreateSubscriptionRequest()) +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + Request payload. + + +**Returns:** `CreateSubscriptionResponse` + +--- + +## `delete_subscription` + +DELETE `/2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` + +**Delete Subscription** + +Deletes an Account Activity subscription for the given webhook and user ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.account_activity.delete_subscription(webhook_id="1234567890", user_id="2244994945") +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `DeleteSubscriptionResponse` + +--- + +## `get_subscription_count` + +GET `/2/account_activity/subscriptions/count` + +**Get Subscription Count** + +Retrieves a count of currently active Account Activity subscriptions. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.account_activity.get_subscription_count() +print(response) +``` + +**Returns:** `GetSubscriptionCountResponse` + +--- + +## `get_subscriptions` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` + +**Get Subscriptions** + +Retrieves a list of all active subscriptions for a given webhook. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.account_activity.get_subscriptions(webhook_id="1234567890") +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `GetSubscriptionsResponse` + +--- + +## `validate_subscription` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Validate Subscription** + +Checks a user's Account Activity subscription for a given webhook. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.account_activity.validate_subscription(webhook_id="1234567890") +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `ValidateSubscriptionResponse` + +--- + diff --git a/xdks/python/reference/clients/account.mdx b/xdks/python/reference/clients/account.mdx new file mode 100644 index 000000000..62fb6fb86 --- /dev/null +++ b/xdks/python/reference/clients/account.mdx @@ -0,0 +1,66 @@ +--- +title: "AccountClient (Python XDK)" +sidebarTitle: "Account" +description: "Python XDK AccountClient reference — 2 methods for X API v2 Account endpoints." +--- + +Access **Account** endpoints via `client.account` (`AccountClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`ensure`](#ensure) | `POST /2/account` | Standard | Ensure Developer Account | +| [`get_developer`](#get_developer) | `GET /2/account` | Standard | Get Developer Account | + +## `ensure` + +POST `/2/account` + +**Ensure Developer Account** + +Creates an X Developer Platform account for the authenticated user if they do not already have one, and returns it. Idempotent: when the user already has an account it is returned unchanged with `created` false. + +```python +import os +from xdk import Client +from xdk.account.models import EnsureRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.account.ensure(body=EnsureRequest(metadata="example")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `EnsureResponse` + +--- + +## `get_developer` + +GET `/2/account` + +**Get Developer Account** + +Returns the X Developer Platform account that is billed for the authenticated user's API access. A user with no such account gets a resource-not-found error entry. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.account.get_developer() +print(response) +``` + +**Returns:** `GetDeveloperResponse` + +--- + diff --git a/xdks/python/reference/clients/activity.mdx b/xdks/python/reference/clients/activity.mdx new file mode 100644 index 000000000..2d293d358 --- /dev/null +++ b/xdks/python/reference/clients/activity.mdx @@ -0,0 +1,181 @@ +--- +title: "ActivityClient (Python XDK)" +sidebarTitle: "Activity" +description: "Python XDK ActivityClient reference — 5 methods for X API v2 Activity endpoints." +--- + +Access **Activity** endpoints via `client.activity` (`ActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create_subscription`](#create_subscription) | `POST /2/activity/subscriptions` | Standard | Create X Activity Subscription | +| [`delete_subscription`](#delete_subscription) | `DELETE /2/activity/subscriptions/{subscription_id}` | Standard | Delete X Activity Subscription | +| [`delete_subscriptions_by_ids`](#delete_subscriptions_by_ids) | `DELETE /2/activity/subscriptions` | Standard | Delete X Activity Subscriptions by IDs | +| [`get_subscriptions`](#get_subscriptions) | `GET /2/activity/subscriptions` | Paginated | Get X Activity Subscriptions | +| [`update_subscription`](#update_subscription) | `PUT /2/activity/subscriptions/{subscription_id}` | Standard | Update X Activity Subscription | + +## `create_subscription` + +POST `/2/activity/subscriptions` + +**Create X Activity Subscription** + +Creates a subscription for an X activity event. OAuth2 user-context tokens must hold the scope matching the requested event_type: dm.read for chat.* and dm.* events, like.read for like.* events, mute.read for mute.* events, block.read for block.* events, follows.read for subscriptions.* events, and tweet.read for all other event types. Mute and block subscriptions are actor-only: filter.user_id must identify the authenticated user and direction is not supported. subscriptions.* events require a user-context token and filter.user_id must identify the authenticated user. Optional filter.qualifiers further narrow supported chat, follow, unfollow, like, subscriptions, and trends events. + +```python +import os +from xdk import Client +from xdk.activity.models import CreateSubscriptionRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.activity.create_subscription( + body=CreateSubscriptionRequest(event_type="profile.update.bio", filter={"user_id": "2244994945"}) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateSubscriptionResponse` + +--- + +## `delete_subscription` + +DELETE `/2/activity/subscriptions/{subscription_id}` + +**Delete X Activity Subscription** + +Deletes a subscription for an X activity event + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.activity.delete_subscription(subscription_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `subscription_id` (path parameter). + + +**Returns:** `DeleteSubscriptionResponse` + +--- + +## `delete_subscriptions_by_ids` + +DELETE `/2/activity/subscriptions` + +**Delete X Activity Subscriptions by IDs** + +Deletes multiple subscriptions for X activity events by their IDs + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.activity.delete_subscriptions_by_ids(ids=["1895000000000000000"]) +print(response) +``` + +### Parameters + + + `ids` (query parameter). + + +**Returns:** `DeleteSubscriptionsByIdsResponse` + +--- + +## `get_subscriptions` + +GET `/2/activity/subscriptions` Paginated + +**Get X Activity Subscriptions** + +Get a list of active subscriptions for XAA. Optional user_id narrows the list to subscriptions whose filter.user_id matches; with a user-context token it must identify the authenticated user. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.activity.get_subscriptions(): + print(page.data) +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 9 bytes. + + + + Only return subscriptions whose filter.user_id matches. + + + + +**Returns:** `Iterator[GetSubscriptionsResponse]` + +--- + +## `update_subscription` + +PUT `/2/activity/subscriptions/{subscription_id}` + +**Update X Activity Subscription** + +Updates a subscription for an X activity event + +```python +import os +from xdk import Client +from xdk.activity.models import UpdateSubscriptionRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.activity.update_subscription( + subscription_id="1895000000000000000", + body=UpdateSubscriptionRequest(tag="example") +) +print(response) +``` + +### Parameters + + + `subscription_id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateSubscriptionResponse` + +--- + diff --git a/xdks/python/reference/clients/articles.mdx b/xdks/python/reference/clients/articles.mdx new file mode 100644 index 000000000..5d7ee452a --- /dev/null +++ b/xdks/python/reference/clients/articles.mdx @@ -0,0 +1,74 @@ +--- +title: "ArticlesClient (Python XDK)" +sidebarTitle: "Articles" +description: "Python XDK ArticlesClient reference — 2 methods for X API v2 Articles endpoints." +--- + +Access **Articles** endpoints via `client.articles` (`ArticlesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`article_create_draft`](#article_create_draft) | `POST /2/articles/draft` | Standard | Create Draft Article | +| [`article_publish`](#article_publish) | `POST /2/articles/{article_id}/publish` | Standard | Publish Article | + +## `article_create_draft` + +POST `/2/articles/draft` + +**Create Draft Article** + +Creates a new Article draft that can later be published. + +```python +import os +from xdk import Client +from xdk.articles.models import ArticleCreateDraftRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.articles.article_create_draft( + body=ArticleCreateDraftRequest(title="example", content_state={"blocks": [{}], "entities": [{}]}) +) +print(response) +``` + +### Parameters + + + Create a draft Article. + + +**Returns:** `ArticleCreateDraftResponse` + +--- + +## `article_publish` + +POST `/2/articles/{article_id}/publish` + +**Publish Article** + +Publishes a draft Article, making it publicly visible. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.articles.article_publish(article_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `article_id` (path parameter). + + +**Returns:** `ArticlePublishResponse` + +--- + diff --git a/xdks/python/reference/clients/bots.mdx b/xdks/python/reference/clients/bots.mdx new file mode 100644 index 000000000..07c657272 --- /dev/null +++ b/xdks/python/reference/clients/bots.mdx @@ -0,0 +1,213 @@ +--- +title: "BotsClient (Python XDK)" +sidebarTitle: "Bots" +description: "Python XDK BotsClient reference — 6 methods for X API v2 Bots endpoints." +--- + +Access **Bots** endpoints via `client.bots` (`BotsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create_bot`](#create_bot) | `POST /2/bots` | Standard | Create a Bot | +| [`delete_bot`](#delete_bot) | `DELETE /2/bots/{id}` | Standard | Delete Bot | +| [`get`](#get) | `GET /2/bots` | Standard | Get Bots | +| [`revoke_bot_token`](#revoke_bot_token) | `DELETE /2/bots/{id}/token` | Standard | Revoke Bot Token | +| [`rotate_bot_token`](#rotate_bot_token) | `POST /2/bots/{id}/token` | Standard | Rotate Bot Token | +| [`update_bot`](#update_bot) | `PUT /2/bots/{id}` | Standard | Update Bot | + +## `create_bot` + +POST `/2/bots` + +**Create a Bot** + +Creates a bot account in the calling app's project and returns its bearer token. Idempotent on handle: repeating the request for a handle that already names one of the project's bots returns that bot with a freshly minted token, revoking the previous one — safe to retry when a response was lost, since the replaced token was never seen. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is created in the user's project instead; its token is still minted for the calling app. + +```python +import os +from xdk import Client +from xdk.bots.models import CreateBotRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.bots.create_bot(body=CreateBotRequest(handle="example")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateBotResponse` + +--- + +## `delete_bot` + +DELETE `/2/bots/{id}` + +**Delete Bot** + +Deletes a bot account from the calling app's project. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is deleted from the user's project instead. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.bots.delete_bot(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `DeleteBotResponse` + +--- + +## `get` + +GET `/2/bots` + +**Get Bots** + +Retrieves the bot accounts in the calling app's project. meta.max_bots is the most bots the project can have. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.bots.get() +print(response) +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `GetResponse` + +--- + +## `revoke_bot_token` + +DELETE `/2/bots/{id}/token` + +**Revoke Bot Token** + +Revokes a bot's bearer token. The bot account is kept, and rotating its token mints a new one. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.bots.revoke_bot_token(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `RevokeBotTokenResponse` + +--- + +## `rotate_bot_token` + +POST `/2/bots/{id}/token` + +**Rotate Bot Token** + +Mints a new bearer token for a bot and invalidates every token previously issued for it. The new token is returned only once. + +```python +import os +from xdk import Client +from xdk.bots.models import RotateBotTokenRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.bots.rotate_bot_token( + id="1895000000000000000", + body=RotateBotTokenRequest(scopes=["example"]) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `RotateBotTokenResponse` + +--- + +## `update_bot` + +PUT `/2/bots/{id}` + +**Update Bot** + +Updates a bot's handle, display name, or who may send it Direct Messages. + +```python +import os +from xdk import Client +from xdk.bots.models import UpdateBotRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.bots.update_bot(id="1895000000000000000", body=UpdateBotRequest(handle="example")) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateBotResponse` + +--- + diff --git a/xdks/python/reference/clients/broadcasts.mdx b/xdks/python/reference/clients/broadcasts.mdx new file mode 100644 index 000000000..6c31771db --- /dev/null +++ b/xdks/python/reference/clients/broadcasts.mdx @@ -0,0 +1,1421 @@ +--- +title: "BroadcastsClient (Python XDK)" +sidebarTitle: "Broadcasts" +description: "Python XDK BroadcastsClient reference — 41 methods for X API v2 Broadcasts endpoints." +--- + +Access **Broadcasts** endpoints via `client.broadcasts` (`BroadcastsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`add_chat_moderator`](#add_chat_moderator) | `POST /2/broadcasts/chat/moderators` | Standard | Add a Chat Moderator | +| [`create_broadcast`](#create_broadcast) | `POST /2/broadcasts` | Standard | Go Live on a Source | +| [`create_scheduled_broadcast`](#create_scheduled_broadcast) | `POST /2/broadcasts/scheduled` | Standard | Create a Scheduled Broadcast | +| [`create_source`](#create_source) | `POST /2/sources` | Standard | Create a Stream Source | +| [`create_user_broadcast`](#create_user_broadcast) | `POST /2/users/{id}/broadcasts` | Standard | Create a Broadcast on a User's Source | +| [`create_user_source`](#create_user_source) | `POST /2/users/{id}/sources` | Standard | Create a Stream Source for a User | +| [`delete_broadcast`](#delete_broadcast) | `DELETE /2/broadcasts/{id}` | Standard | Delete a Broadcast | +| [`delete_broadcast_chat_message`](#delete_broadcast_chat_message) | `DELETE /2/broadcasts/{id}/chat/{message_id}` | Standard | Remove a Chat Message from a Live Broadcast | +| [`delete_scheduled_broadcast`](#delete_scheduled_broadcast) | `DELETE /2/broadcasts/scheduled/{id}` | Standard | Delete a Scheduled Broadcast | +| [`delete_source`](#delete_source) | `DELETE /2/sources/{id}` | Standard | Delete a Stream Source | +| [`delete_user_broadcast`](#delete_user_broadcast) | `DELETE /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Delete a User's Broadcast | +| [`delete_user_source`](#delete_user_source) | `DELETE /2/users/{id}/sources/{source_id}` | Standard | Delete a User's Stream Source | +| [`get_broadcast`](#get_broadcast) | `GET /2/broadcasts/{id}` | Standard | Get a Broadcast | +| [`get_broadcast_chat`](#get_broadcast_chat) | `GET /2/broadcasts/{id}/chat` | Paginated | Get Broadcast Chat History | +| [`get_chat_moderators`](#get_chat_moderators) | `GET /2/broadcasts/chat/moderators` | Standard | Get Chat Moderators | +| [`get_chat_muted_users`](#get_chat_muted_users) | `GET /2/broadcasts/chat/mutes` | Paginated | Get Muted Chat Users | +| [`get_region`](#get_region) | `GET /2/region` | Standard | Get the Ingest Region | +| [`get_scheduled_broadcast`](#get_scheduled_broadcast) | `GET /2/broadcasts/scheduled/{id}` | Standard | Get a Scheduled Broadcast | +| [`get_source`](#get_source) | `GET /2/sources/{id}` | Standard | Get a Stream Source | +| [`get_source_stream_key`](#get_source_stream_key) | `GET /2/sources/{id}/stream_key` | Standard | Get a Stream Source's Stream Key | +| [`get_user_broadcast`](#get_user_broadcast) | `GET /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Get a User's Broadcast | +| [`get_user_source`](#get_user_source) | `GET /2/users/{id}/sources/{source_id}` | Standard | Get a User's Stream Source | +| [`go_live_scheduled_broadcast`](#go_live_scheduled_broadcast) | `POST /2/broadcasts/scheduled/{id}/live` | Standard | Go Live on a Scheduled Broadcast | +| [`list`](#list) | `GET /2/broadcasts` | Paginated | List Broadcasts | +| [`list_live_categories`](#list_live_categories) | `GET /2/broadcasts/categories` | Standard | List Live Categories | +| [`list_scheduled`](#list_scheduled) | `GET /2/broadcasts/scheduled` | Paginated | List Scheduled Broadcasts | +| [`list_sources`](#list_sources) | `GET /2/sources` | Standard | List Stream Sources | +| [`list_user`](#list_user) | `GET /2/users/{id}/broadcasts` | Paginated | List a User's Broadcasts | +| [`list_user_sources`](#list_user_sources) | `GET /2/users/{id}/sources` | Standard | List a User's Stream Sources | +| [`mute_broadcast_chat_user`](#mute_broadcast_chat_user) | `POST /2/broadcasts/{id}/chat/mutes` | Standard | Mute or Time Out a User in a Broadcast Chat | +| [`mute_chat_user`](#mute_chat_user) | `POST /2/broadcasts/chat/mutes` | Standard | Mute or Time Out a User in Chat | +| [`remove_chat_moderator`](#remove_chat_moderator) | `DELETE /2/broadcasts/chat/moderators/{user_id}` | Standard | Remove a Chat Moderator | +| [`send_broadcast_chat`](#send_broadcast_chat) | `POST /2/broadcasts/{id}/chat` | Standard | Send a Chat Message to a Live Broadcast | +| [`unmute_broadcast_chat_user`](#unmute_broadcast_chat_user) | `DELETE /2/broadcasts/{id}/chat/mutes/{user_id}` | Standard | Unmute a User in a Broadcast Chat | +| [`unmute_chat_user`](#unmute_chat_user) | `DELETE /2/broadcasts/chat/mutes/{user_id}` | Standard | Unmute a User in Chat | +| [`update_broadcast`](#update_broadcast) | `PUT /2/broadcasts/{id}` | Standard | Update a Broadcast | +| [`update_broadcast_state`](#update_broadcast_state) | `PUT /2/broadcasts/{id}/state` | Standard | End a Broadcast | +| [`update_scheduled_broadcast`](#update_scheduled_broadcast) | `PUT /2/broadcasts/scheduled/{id}` | Standard | Update a Scheduled Broadcast | +| [`update_source`](#update_source) | `PUT /2/sources/{id}` | Standard | Rename a Stream Source | +| [`update_user_broadcast_state`](#update_user_broadcast_state) | `PUT /2/users/{id}/broadcasts/{broadcast_id}/state` | Standard | Publish or End a User's Broadcast | +| [`update_user_source`](#update_user_source) | `PUT /2/users/{id}/sources/{source_id}` | Standard | Rename a User's Stream Source | + +## `add_chat_moderator` + +POST `/2/broadcasts/chat/moderators` + +**Add a Chat Moderator** + +Adds a moderator to the authenticated broadcaster's persistent list and returns the updated moderator user IDs. The list applies to all current and future broadcast chats. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import AddChatModeratorRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.add_chat_moderator(body=AddChatModeratorRequest(user_id="2244994945")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `AddChatModeratorResponse` + +--- + +## `create_broadcast` + +POST `/2/broadcasts` + +**Go Live on a Source** + +Takes one or more of the authenticated user's sources live and returns 201 with the new broadcast. Several sources (`source_id` plus `additional_source_ids`, one per video format) go live together as one broadcast; they must all be RTMP sources in one region, and when one of them is already live its broadcast is returned only if it holds every listed source. The broadcast goes live immediately (state `RUNNING`), even before the encoder sends video, and is ended (`TIMED_OUT`) if no video arrives within 5 minutes. It is announced in a Post unless `should_not_tweet` is true. When the source already has a live broadcast, returns 200 with that broadcast unchanged and ignores the request's `title`, `locale`, `chat_option` and `should_not_tweet`. A missing `tweet_id` means the Post hasn't been created yet, was suppressed with `should_not_tweet`, or could not be created; read it later with GET /2/broadcasts/:id. A 409 `conflict` means the source can't go live right now: either it can't take video before the encoder connects (external HLS sources, or regions where this isn't available), so retry once video is flowing, or another broadcast is live on it, so END that broadcast first. The `detail` says which, and names the live broadcast when known. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import CreateBroadcastRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.create_broadcast(body=CreateBroadcastRequest(source_id="1895000000000000000")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateBroadcastResponse` + +--- + +## `create_scheduled_broadcast` + +POST `/2/broadcasts/scheduled` + +**Create a Scheduled Broadcast** + +Schedules a broadcast for the authenticated user on one of their sources: `source_id` is required. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import CreateScheduledBroadcastRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.create_scheduled_broadcast( + body=CreateScheduledBroadcastRequest(source_id="1895000000000000000", scheduled_start_ms="example") +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateScheduledBroadcastResponse` + +--- + +## `create_source` + +POST `/2/sources` + +**Create a Stream Source** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. Push an encoder to `rtmps_url` with the returned `stream_key`. This is the only response that includes the stream key; read it later with GET /2/sources/:id/stream_key. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import CreateSourceRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.create_source(body=CreateSourceRequest(name="My List", region="example")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateSourceResponse` + +--- + +## `create_user_broadcast` + +POST `/2/users/{id}/broadcasts` + +**Create a Broadcast on a User's Source** + +Creates a broadcast on one of the authenticated user's sources. `id` must be the authenticated user. The broadcast is `NOT_STARTED` and posts nothing until it is published with PUT /2/users/:id/broadcasts/:broadcast_id/state; one that is never published is deleted after 7 days. When the source already has a running broadcast, that broadcast is returned. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import CreateUserBroadcastRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.create_user_broadcast( + id="2244994945", + body=CreateUserBroadcastRequest(source_id="1895000000000000000") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `CreateUserBroadcastResponse` + +--- + +## `create_user_source` + +POST `/2/users/{id}/sources` + +**Create a Stream Source for a User** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. `id` must be the authenticated user. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import CreateUserSourceRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.create_user_source(id="2244994945", body=CreateUserSourceRequest(name="My List")) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `CreateUserSourceResponse` + +--- + +## `delete_broadcast` + +DELETE `/2/broadcasts/{id}` + +**Delete a Broadcast** + +Deletes one of the authenticated user's broadcasts, scheduled or ended, including its replay. A running broadcast must be ended first. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.delete_broadcast(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `DeleteBroadcastResponse` + +--- + +## `delete_broadcast_chat_message` + +DELETE `/2/broadcasts/{id}/chat/{message_id}` + +**Remove a Chat Message from a Live Broadcast** + +Removes a specific chat message from a running broadcast where the authenticated user is the host or a moderator. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.delete_broadcast_chat_message(id="1895000000000000000", message_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `message_id` (path parameter). + + +**Returns:** `DeleteBroadcastChatMessageResponse` + +--- + +## `delete_scheduled_broadcast` + +DELETE `/2/broadcasts/scheduled/{id}` + +**Delete a Scheduled Broadcast** + +Deletes a scheduled broadcast by its alphanumeric broadcast id. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.delete_scheduled_broadcast(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + Deprecated: recurring schedules are being retired and `true` will be rejected. + + + + +**Returns:** `DeleteScheduledBroadcastResponse` + +--- + +## `delete_source` + +DELETE `/2/sources/{id}` + +**Delete a Stream Source** + +Deletes one of the authenticated user's stream sources. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.delete_source(id="1895000000000000000") +print(response) +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `DeleteSourceResponse` + +--- + +## `delete_user_broadcast` + +DELETE `/2/users/{id}/broadcasts/{broadcast_id}` + +**Delete a User's Broadcast** + +Deletes one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use DELETE /2/broadcasts/:id. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.delete_user_broadcast(id="2244994945", broadcast_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `DeleteUserBroadcastResponse` + +--- + +## `delete_user_source` + +DELETE `/2/users/{id}/sources/{source_id}` + +**Delete a User's Stream Source** + +Deletes one of the authenticated user's stream sources. `id` must be the authenticated user. Success is an empty object. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.delete_user_source(id="2244994945", source_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `DeleteUserSourceResponse` + +--- + +## `get_broadcast` + +GET `/2/broadcasts/{id}` + +**Get a Broadcast** + +Returns a broadcast owned by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_broadcast(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `GetBroadcastResponse` + +--- + +## `get_broadcast_chat` + +GET `/2/broadcasts/{id}/chat` Paginated + +**Get Broadcast Chat History** + +Returns newest-first chat messages for a broadcast owned by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.broadcasts.get_broadcast_chat(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of BroadcastChatMessage fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Iterator[GetBroadcastChatResponse]` + +--- + +## `get_chat_moderators` + +GET `/2/broadcasts/chat/moderators` + +**Get Chat Moderators** + +Returns the authenticated broadcaster's persistent moderators as User resources. The list applies to all of their current and future broadcast chats. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_chat_moderators() +print(response) +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `GetChatModeratorsResponse` + +--- + +## `get_chat_muted_users` + +GET `/2/broadcasts/chat/mutes` Paginated + +**Get Muted Chat Users** + +Returns the users muted in the authenticated broadcaster's chat, with the expiry time of timed mutes. Mutes apply to all of their broadcasts. Expired timed mutes are omitted. Use `expansions=user_id` to include the muted users. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.broadcasts.get_chat_muted_users(): + print(page.data) +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of BroadcastChatMute fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Iterator[GetChatMutedUsersResponse]` + +--- + +## `get_region` + +GET `/2/region` + +**Get the Ingest Region** + +Returns the ingest region nearest the server handling the request. Pass it as `region` when creating a stream source to ingest there. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_region() +print(response) +``` + +**Returns:** `GetRegionResponse` + +--- + +## `get_scheduled_broadcast` + +GET `/2/broadcasts/scheduled/{id}` + +**Get a Scheduled Broadcast** + +Returns a single scheduled broadcast by its alphanumeric broadcast id. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_scheduled_broadcast(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `GetScheduledBroadcastResponse` + +--- + +## `get_source` + +GET `/2/sources/{id}` + +**Get a Stream Source** + +Returns one of the authenticated user's stream sources. Poll it after starting an encoder and wait for `is_stream_active` before going live. The stream key is not included; read it with GET /2/sources/:id/stream_key. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_source(id="1895000000000000000") +print(response) +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `GetSourceResponse` + +--- + +## `get_source_stream_key` + +GET `/2/sources/{id}/stream_key` + +**Get a Stream Source's Stream Key** + +Returns the stream key of one of the authenticated user's stream sources. The stream key is a credential: anyone with it can stream to the source, so keep it out of logs, URLs and client-side code. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_source_stream_key(id="1895000000000000000") +print(response) +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `GetSourceStreamKeyResponse` + +--- + +## `get_user_broadcast` + +GET `/2/users/{id}/broadcasts/{broadcast_id}` + +**Get a User's Broadcast** + +Returns one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts/:id. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_user_broadcast(id="2244994945", broadcast_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `GetUserBroadcastResponse` + +--- + +## `get_user_source` + +GET `/2/users/{id}/sources/{source_id}` + +**Get a User's Stream Source** + +Returns one of the authenticated user's stream sources. `id` must be the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.get_user_source(id="2244994945", source_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `GetUserSourceResponse` + +--- + +## `go_live_scheduled_broadcast` + +POST `/2/broadcasts/scheduled/{id}/live` + +**Go Live on a Scheduled Broadcast** + +Publishes a schedule that was created or updated with `manual_publish: true`. Without that flag the coordinator auto-publishes at start and this call is rejected. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.go_live_scheduled_broadcast(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `GoLiveScheduledBroadcastResponse` + +--- + +## `list` + +GET `/2/broadcasts` Paginated + +**List Broadcasts** + +Returns the authenticated user's live-video broadcasts, or selected owned broadcasts when ids are provided. + +At most one of `ids`, `max_results` may be provided. At most one of `ids`, `pagination_token` may be provided. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.broadcasts.list(): + print(page.data) +``` + +### Parameters + + + + + Comma-separated broadcast IDs to retrieve instead of listing broadcasts. + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `Iterator[ListResponse]` + +--- + +## `list_live_categories` + +GET `/2/broadcasts/categories` + +**List Live Categories** + +Returns the live categories a host can pick when going live, in display order. Pass a category's `id` as `live_category_id` on POST /2/broadcasts. Ids are permanent; names can change, so store the id and show the current name. The whole list is returned in one response, without paging. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.broadcasts.list_live_categories() +print(response) +``` + +**Returns:** `ListLiveCategoriesResponse` + +--- + +## `list_scheduled` + +GET `/2/broadcasts/scheduled` Paginated + +**List Scheduled Broadcasts** + +Returns scheduled broadcasts owned by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.broadcasts.list_scheduled(): + print(page.data) +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `oldest_start_time` (query parameter). + + + + `newest_start_time` (query parameter). + + + + `pagination_token` (query parameter). + + + + +**Returns:** `Iterator[ListScheduledResponse]` + +--- + +## `list_sources` + +GET `/2/sources` + +**List Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources. A source's `id` is the `source_id` that POST /2/broadcasts and scheduled broadcasts take. Stream keys are not included; read one with GET /2/sources/:id/stream_key. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.list_sources() +print(response) +``` + +**Returns:** `ListSourcesResponse` + +--- + +## `list_user` + +GET `/2/users/{id}/broadcasts` Paginated + +**List a User's Broadcasts** + +Returns the authenticated user's broadcasts, 100 per page. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.broadcasts.list_user(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `next_token.offset` from the previous page. Empty reads the first page. + + + + +**Returns:** `Iterator[ListUserResponse]` + +--- + +## `list_user_sources` + +GET `/2/users/{id}/sources` + +**List a User's Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources (empty array if none). `id` must be the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.list_user_sources(id="2244994945") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `ListUserSourcesResponse` + +--- + +## `mute_broadcast_chat_user` + +POST `/2/broadcasts/{id}/chat/mutes` + +**Mute or Time Out a User in a Broadcast Chat** + +Prevents a user from posting further messages in a running broadcast chat. When `end_at_ms` is provided, the mute expires at that time. The authenticated user must be the broadcast host or a moderator. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import MuteBroadcastChatUserRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.mute_broadcast_chat_user( + id="1895000000000000000", + body=MuteBroadcastChatUserRequest(user_id="2244994945") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `MuteBroadcastChatUserResponse` + +--- + +## `mute_chat_user` + +POST `/2/broadcasts/chat/mutes` + +**Mute or Time Out a User in Chat** + +Prevents a user from posting messages in all of a broadcaster's chats. Without `broadcast_id`, the user is muted in the authenticated user's own chats. Moderators pass `broadcast_id` to mute the user in that broadcast host's chats. When `end_at_ms` is provided, the mute expires at that time. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import MuteChatUserRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.mute_chat_user(body=MuteChatUserRequest(user_id="2244994945")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `MuteChatUserResponse` + +--- + +## `remove_chat_moderator` + +DELETE `/2/broadcasts/chat/moderators/{user_id}` + +**Remove a Chat Moderator** + +Removes a moderator from the authenticated broadcaster's persistent list and returns the updated moderator user IDs. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.remove_chat_moderator(user_id="2244994945") +print(response) +``` + +### Parameters + + + A 64-bit signed integer. + + +**Returns:** `RemoveChatModeratorResponse` + +--- + +## `send_broadcast_chat` + +POST `/2/broadcasts/{id}/chat` + +**Send a Chat Message to a Live Broadcast** + +Posts a chat message to a running broadcast, attributed to the authenticated user. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import SendBroadcastChatRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.send_broadcast_chat( + id="1895000000000000000", + body=SendBroadcastChatRequest(text="Hello from XDK!") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `SendBroadcastChatResponse` + +--- + +## `unmute_broadcast_chat_user` + +DELETE `/2/broadcasts/{id}/chat/mutes/{user_id}` + +**Unmute a User in a Broadcast Chat** + +Allows a muted user to post messages in a running broadcast chat again. The authenticated user must be the broadcast host or a moderator. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.unmute_broadcast_chat_user(id="1895000000000000000", user_id="2244994945") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + A 64-bit signed integer. + + +**Returns:** `UnmuteBroadcastChatUserResponse` + +--- + +## `unmute_chat_user` + +DELETE `/2/broadcasts/chat/mutes/{user_id}` + +**Unmute a User in Chat** + +Allows a muted user to post messages in a broadcaster's chats again. Without `broadcast_id`, the user is unmuted in the authenticated user's own chats. Moderators pass `broadcast_id` to unmute the user in that broadcast host's chats. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.unmute_chat_user(user_id="2244994945") +print(response) +``` + +### Parameters + + + A 64-bit signed integer. + + + + + + A broadcast whose host's chats the user is unmuted in. + + + + +**Returns:** `UnmuteChatUserResponse` + +--- + +## `update_broadcast` + +PUT `/2/broadcasts/{id}` + +**Update a Broadcast** + +Changes the title, chat option or live category of one of the authenticated user's broadcasts and returns the broadcast. Send at least one of `title`, `chat_option` and `live_category_id`; fields left out keep their values. A broadcast can be updated before it starts, while it is live and after it has ended. A 409 `conflict` means the broadcast can't be edited, for example because it was deleted or moderated. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import UpdateBroadcastRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.update_broadcast( + id="1895000000000000000", + body=UpdateBroadcastRequest(live_category_id="1895000000000000000") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateBroadcastResponse` + +--- + +## `update_broadcast_state` + +PUT `/2/broadcasts/{id}/state` + +**End a Broadcast** + +Ends one of the authenticated user's broadcasts. Only `state: END` is supported. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import UpdateBroadcastStateRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.update_broadcast_state( + id="1895000000000000000", + body=UpdateBroadcastStateRequest(state="example") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateBroadcastStateResponse` + +--- + +## `update_scheduled_broadcast` + +PUT `/2/broadcasts/scheduled/{id}` + +**Update a Scheduled Broadcast** + +Updates a scheduled broadcast. Path `:id` is the broadcast id; the body must include `scheduled_broadcast_id`. Re-send every field that should be kept. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import UpdateScheduledBroadcastRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.update_scheduled_broadcast( + id="1895000000000000000", + body=UpdateScheduledBroadcastRequest(scheduled_broadcast_id="1895000000000000000", scheduled_start_ms="example", scheduled_end_ms="example") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateScheduledBroadcastResponse` + +--- + +## `update_source` + +PUT `/2/sources/{id}` + +**Rename a Stream Source** + +Renames one of the authenticated user's stream sources. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import UpdateSourceRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.update_source(id="1895000000000000000", body=UpdateSourceRequest(name="My List")) +print(response) +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + + + Request payload. + + +**Returns:** `UpdateSourceResponse` + +--- + +## `update_user_broadcast_state` + +PUT `/2/users/{id}/broadcasts/{broadcast_id}/state` + +**Publish or End a User's Broadcast** + +Publishes or ends one of the authenticated user's broadcasts. `id` must be the authenticated user. `PUBLISH` takes a broadcast created with POST /2/users/:id/broadcasts live once its source is receiving video, and posts it unless `should_not_tweet` is true. `END` ends the broadcast. Deprecated: use PUT /2/broadcasts/:id/state to end a broadcast. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import UpdateUserBroadcastStateRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.update_user_broadcast_state( + id="2244994945", + broadcast_id="1895000000000000000", + body=UpdateUserBroadcastStateRequest(state="example") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateUserBroadcastStateResponse` + +--- + +## `update_user_source` + +PUT `/2/users/{id}/sources/{source_id}` + +**Rename a User's Stream Source** + +Renames one of the authenticated user's stream sources. `id` must be the authenticated user. + +```python +import os +from xdk import Client +from xdk.broadcasts.models import UpdateUserSourceRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.broadcasts.update_user_source( + id="2244994945", + source_id="1895000000000000000", + body=UpdateUserSourceRequest(name="My List") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateUserSourceResponse` + +--- + diff --git a/xdks/python/reference/clients/calls.mdx b/xdks/python/reference/clients/calls.mdx new file mode 100644 index 000000000..b1a0e620a --- /dev/null +++ b/xdks/python/reference/clients/calls.mdx @@ -0,0 +1,411 @@ +--- +title: "CallsClient (Python XDK)" +sidebarTitle: "Calls" +description: "Python XDK CallsClient reference — 10 methods for X API v2 Calls endpoints." +--- + +Access **Calls** endpoints via `client.calls` (`CallsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`cancel_scheduled_call`](#cancel_scheduled_call) | `DELETE /2/calls/scheduled/{id}` | Standard | Cancel a Scheduled Call | +| [`create_call`](#create_call) | `POST /2/calls` | Standard | Create a Call | +| [`get_call`](#get_call) | `GET /2/calls/{id}` | Standard | Get a Call | +| [`get_scheduled_call`](#get_scheduled_call) | `GET /2/calls/scheduled/{id}` | Standard | Get a Scheduled Call | +| [`join_call`](#join_call) | `POST /2/calls/{id}/join` | Standard | Join a Call | +| [`leave_call`](#leave_call) | `POST /2/calls/{id}/leave` | Standard | Leave a Call | +| [`list_scheduled`](#list_scheduled) | `GET /2/calls/scheduled` | Standard | List Scheduled Calls | +| [`respond_to_scheduled_call`](#respond_to_scheduled_call) | `POST /2/calls/scheduled/{id}/rsvp` | Standard | Respond to a Scheduled Call | +| [`schedule_call`](#schedule_call) | `POST /2/calls/scheduled` | Standard | Schedule a Call | +| [`update_scheduled_call`](#update_scheduled_call) | `PUT /2/calls/scheduled/{id}` | Standard | Update a Scheduled Call | + +## `cancel_scheduled_call` + +DELETE `/2/calls/scheduled/{id}` + +**Cancel a Scheduled Call** + +Cancels a scheduled call the authenticated user organizes, and takes it off invitees' calendars. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. Cancelling what is already cancelled succeeds. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.cancel_scheduled_call(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + Which occurrences: all (the default without occurrence_start_time), this (the default with it), or this_and_following. + + + + Start of the occurrence that scope this or this_and_following refers to (RFC 3339). + + + + Whether invitees get an email about it. Defaults to true. + + + + +**Returns:** `CancelScheduledCallResponse` + +--- + +## `create_call` + +POST `/2/calls` + +**Create a Call** + +Starts an X call hosted by the authenticated user (typically a bot). Pass an XChat conversation_id to start the call in that conversation, or omit it for a standalone call anyone can join with the returned join_url (subject to join_policy). The call starts empty: put an agent in it with POST /2/calls/:id/join. When the host joins a conversation call, the other members are rung. + +```python +import os +from xdk import Client +from xdk.calls.models import CreateCallRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.create_call(body=CreateCallRequest(conversation_id="1500000000000000000")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateCallResponse` + +--- + +## `get_call` + +GET `/2/calls/{id}` + +**Get a Call** + +Returns a call's title, join policy, host and participant count, and whether the authenticated user may join it without asking the host. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.get_call(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Call fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `GetCallResponse` + +--- + +## `get_scheduled_call` + +GET `/2/calls/scheduled/{id}` + +**Get a Scheduled Call** + +Returns a scheduled call the authenticated user organizes or is invited to, at its occurrence running now or its next one within a year: its time, call, recurrence and who is invited and how they answered. Changes can take a few seconds to show here. Use scheduled_call.fields to select which fields are returned. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.get_scheduled_call(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ScheduledCall fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Call fields to display. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `GetScheduledCallResponse` + +--- + +## `join_call` + +POST `/2/calls/{id}/join` + +**Join a Call** + +Starts a media session that takes part in the call as the authenticated user. The response carries a media_url and a short-lived media_token: open a WebSocket to media_url with the token as a Bearer credential to exchange PCM16 audio and events with the call; the user enters the call when the WebSocket connects. On a closed or trusted call the session asks the host first (admission: requires_approval). + +```python +import os +from xdk import Client +from xdk.calls.models import JoinCallRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.join_call( + id="1895000000000000000", + body=JoinCallRequest(media={"type": "websocket"}) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `JoinCallResponse` + +--- + +## `leave_call` + +POST `/2/calls/{id}/leave` + +**Leave a Call** + +Ends the authenticated user's media session in the call (its WebSocket receives session.ended with reason left) and removes the user from the call. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.leave_call(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `LeaveCallResponse` + +--- + +## `list_scheduled` + +GET `/2/calls/scheduled` + +**List Scheduled Calls** + +Returns the X calls on the authenticated user's calendar, earliest first: events on their X Calls calendar, and events on the Microsoft Outlook calendars they linked to X whose conference is an X call. Calls still running at start_time are included. The window defaults to the next 24 hours and may span at most 7 days. Use scheduled_call.fields to select which fields are returned. + +When both are provided, `start_time` must be earlier than `end_time`. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.list_scheduled() +print(response) +``` + +### Parameters + + + + + Calls still running at this time or starting after it (RFC 3339). Defaults to now. + + + + Calls starting before this time (RFC 3339). Defaults to 24 hours after start_time. + + + + The most calls to return. Defaults to 20. + + + + A comma separated list of ScheduledCall fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Call fields to display. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `ListScheduledResponse` + +--- + +## `respond_to_scheduled_call` + +POST `/2/calls/scheduled/{id}/rsvp` + +**Respond to a Scheduled Call** + +Accepts, declines or tentatively accepts an invitation to a scheduled call for the authenticated user. For a recurring call, scope and occurrence_start_time pick the occurrences the answer is for: all of them (the default), one, or one and every one after it. + +```python +import os +from xdk import Client +from xdk.calls.models import RespondToScheduledCallRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.respond_to_scheduled_call( + id="1895000000000000000", + body=RespondToScheduledCallRequest(response="accepted") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `RespondToScheduledCallResponse` + +--- + +## `schedule_call` + +POST `/2/calls/scheduled` + +**Schedule a Call** + +Puts an X call on the authenticated user's X Calls calendar, with them as its organizer, and invites people to it. The call exists right away: share its join_url, or put an agent in it at start time with POST /2/calls/:id/join. A recurrence (an RFC 5545 RRULE) repeats it. Invitees get an email unless notify_invitees is false. + +```python +import os +from xdk import Client +from xdk.calls.models import ScheduleCallRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.schedule_call(body=ScheduleCallRequest(start_time="2026-01-01T00:00:00Z")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `ScheduleCallResponse` + +--- + +## `update_scheduled_call` + +PUT `/2/calls/scheduled/{id}` + +**Update a Scheduled Call** + +Moves, renames or re-invites a scheduled call the authenticated user organizes. Only the fields sent change. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. + +```python +import os +from xdk import Client +from xdk.calls.models import UpdateScheduledCallRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.calls.update_scheduled_call( + id="1895000000000000000", + body=UpdateScheduledCallRequest(occurrence_start_time="example") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + At least one of `start_time`, `duration_minutes`, `title`, `description`, `invitee_ids`, `recurrence`, `time_zone` is required. + + +**Returns:** `UpdateScheduledCallResponse` + +--- + diff --git a/xdks/python/reference/clients/chat.mdx b/xdks/python/reference/clients/chat.mdx new file mode 100644 index 000000000..5e6721ed8 --- /dev/null +++ b/xdks/python/reference/clients/chat.mdx @@ -0,0 +1,1719 @@ +--- +title: "ChatClient (Python XDK)" +sidebarTitle: "Chat" +description: "Python XDK ChatClient reference — 45 methods for X API v2 Chat endpoints." +--- + +Access **Chat** endpoints via `client.chat` (`ChatClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`accept_message_request`](#accept_message_request) | `POST /2/chat/message_requests/{id}/accept` | Standard | Accept a Chat Message Request | +| [`add_conversation_keys`](#add_conversation_keys) | `POST /2/chat/conversations/{id}/keys` | Standard | Add Conversation Keys | +| [`add_group_admins`](#add_group_admins) | `POST /2/chat/conversations/{id}/admins` | Standard | Add Admins to a Chat Group Conversation | +| [`add_group_members`](#add_group_members) | `POST /2/chat/conversations/{id}/members` | Standard | Add Members to a Chat Group Conversation | +| [`add_user_public_key`](#add_user_public_key) | `POST /2/users/{id}/public_keys` | Standard | Add Public Key | +| [`approve_group_admin_request`](#approve_group_admin_request) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/approve` | Standard | Approve an Admin Request in a Chat Group Conversation | +| [`archive_conversation`](#archive_conversation) | `POST /2/chat/conversations/{id}/archive` | Standard | Archive a Chat Conversation | +| [`create_conversation`](#create_conversation) | `POST /2/chat/conversations/group` | Standard | Create Chat Group Conversation | +| [`create_group_admin_request`](#create_group_admin_request) | `POST /2/chat/conversations/{id}/admin_requests` | Standard | Request Admin Permissions in a Chat Group Conversation | +| [`create_group_join_request`](#create_group_join_request) | `POST /2/chat/conversations/{id}/join_requests` | Standard | Request to Join a Chat Group | +| [`delete_conversation`](#delete_conversation) | `DELETE /2/chat/conversations/{id}` | Standard | Delete a Chat Conversation | +| [`delete_conversation_message_ttl`](#delete_conversation_message_ttl) | `DELETE /2/chat/conversations/{id}/message_ttl` | Standard | Turn Off Disappearing Messages in a Chat Conversation | +| [`delete_messages`](#delete_messages) | `POST /2/chat/conversations/{id}/messages/delete` | Standard | Delete Chat Messages | +| [`disable_group_invite`](#disable_group_invite) | `DELETE /2/chat/conversations/{id}/invite` | Standard | Disable a Chat Group Invite Link | +| [`enable_group_invite`](#enable_group_invite) | `POST /2/chat/conversations/{id}/invite` | Standard | Enable a Chat Group Invite Link | +| [`get_conversation`](#get_conversation) | `GET /2/chat/conversations/{id}` | Standard | Get Chat Conversation | +| [`get_conversation_events`](#get_conversation_events) | `GET /2/chat/conversations/{id}/events` | Paginated | Get Chat Conversation Events | +| [`get_conversation_pinned_messages`](#get_conversation_pinned_messages) | `GET /2/chat/conversations/{id}/pinned_messages` | Paginated | Get Chat Conversation Pinned Messages | +| [`get_conversations`](#get_conversations) | `GET /2/chat/conversations` | Paginated | Get Chat Conversations | +| [`get_group_admin_requests`](#get_group_admin_requests) | `GET /2/chat/conversations/{id}/admin_requests` | Paginated | Get Pending Admin Requests for a Chat Group Conversation | +| [`get_group_invite`](#get_group_invite) | `GET /2/chat/conversations/{id}/invites/{token}` | Standard | Get a Chat Group Invite Link | +| [`get_message_request`](#get_message_request) | `GET /2/chat/message_requests/{id}` | Standard | Get Chat Message Request | +| [`get_message_requests`](#get_message_requests) | `GET /2/chat/message_requests` | Paginated | Get Chat Message Requests | +| [`get_settings`](#get_settings) | `GET /2/chat/settings` | Standard | Get Chat Settings | +| [`initialize_group`](#initialize_group) | `POST /2/chat/conversations/group/initialize` | Standard | Initialize Chat Group | +| [`mark_conversation_read`](#mark_conversation_read) | `POST /2/chat/conversations/{id}/read` | Standard | Mark Conversation as Read | +| [`mark_conversation_unread`](#mark_conversation_unread) | `POST /2/chat/conversations/{id}/unread` | Standard | Mark Conversation as Unread | +| [`media_download`](#media_download) | `GET /2/chat/media/{id}/{media_hash_key}` | Standard | Download Chat Media | +| [`media_upload_append`](#media_upload_append) | `POST /2/chat/media/upload/{id}/append` | Standard | Append Chat Media Upload | +| [`media_upload_finalize`](#media_upload_finalize) | `POST /2/chat/media/upload/{id}/finalize` | Standard | Finalize Chat Media Upload | +| [`media_upload_initialize`](#media_upload_initialize) | `POST /2/chat/media/upload/initialize` | Standard | Initialize Chat Media Upload | +| [`mute_conversation`](#mute_conversation) | `POST /2/chat/conversations/{id}/mute` | Standard | Mute a Chat Conversation | +| [`reject_group_admin_request`](#reject_group_admin_request) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/reject` | Standard | Reject an Admin Request in a Chat Group Conversation | +| [`reject_group_join_requests`](#reject_group_join_requests) | `POST /2/chat/conversations/{id}/join_requests/reject` | Standard | Reject Join Requests for a Chat Group Conversation | +| [`remove_group_admins`](#remove_group_admins) | `POST /2/chat/conversations/{id}/admins/remove` | Standard | Remove Admins from a Chat Group Conversation | +| [`remove_group_members`](#remove_group_members) | `POST /2/chat/conversations/{id}/members/remove` | Standard | Remove Members from a Chat Group Conversation | +| [`send_message`](#send_message) | `POST /2/chat/conversations/{id}/messages` | Standard | Send Chat Message | +| [`send_typing_indicator`](#send_typing_indicator) | `POST /2/chat/conversations/{id}/typing` | Standard | Send Typing Indicator | +| [`unarchive_conversation`](#unarchive_conversation) | `DELETE /2/chat/conversations/{id}/archive` | Standard | Unarchive a Chat Conversation | +| [`unmute_conversation`](#unmute_conversation) | `DELETE /2/chat/conversations/{id}/mute` | Standard | Unmute a Chat Conversation | +| [`update_conversation_message_ttl`](#update_conversation_message_ttl) | `PUT /2/chat/conversations/{id}/message_ttl` | Standard | Turn On Disappearing Messages in a Chat Conversation | +| [`update_conversation_screen_capture`](#update_conversation_screen_capture) | `PUT /2/chat/conversations/{id}/screen_capture` | Standard | Update Screen Capture Settings for a Chat Conversation | +| [`update_group`](#update_group) | `PUT /2/chat/conversations/{id}` | Standard | Update a Chat Group Conversation | +| [`update_group_admin_settings`](#update_group_admin_settings) | `PUT /2/chat/conversations/{id}/admin_settings` | Standard | Update the Admin-Only Settings of a Chat Group Conversation | +| [`update_settings`](#update_settings) | `PUT /2/chat/settings` | Standard | Update Chat Settings | + +## `accept_message_request` + +POST `/2/chat/message_requests/{id}/accept` + +**Accept a Chat Message Request** + +Accepts the other user's pending message request in a 1:1 Chat conversation, which moves to the authenticated user's inbox. Without a pending request, including after a successful accept, the response is 404. Replying to a request does not accept it. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.accept_message_request(id="1895000000000000000") +print(response) +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + +**Returns:** `AcceptMessageRequestResponse` + +--- + +## `add_conversation_keys` + +POST `/2/chat/conversations/{id}/keys` + +**Add Conversation Keys** + +Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation id; the server constructs the canonical conversation ID from the authenticated user and recipient. The request body must contain the conversation key version and participant keys (the conversation key encrypted for each participant using their public key). + +```python +import os +from xdk import Client +from xdk.chat.models import AddConversationKeysRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.add_conversation_keys( + id="1895000000000000000", + body=AddConversationKeysRequest(conversation_key_version="example", conversation_participant_keys=[{"user_id": "2244994945", "encrypted_conversation_key": "example", "public_key_version": "example"}]) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `AddConversationKeysResponse` + +--- + +## `add_group_admins` + +POST `/2/chat/conversations/{id}/admins` + +**Add Admins to a Chat Group Conversation** + +Grants admin rights to one or more members of an existing encrypted Chat group conversation. + +```python +import os +from xdk import Client +from xdk.chat.models import AddGroupAdminsRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.add_group_admins( + id="1895000000000000000", + body=AddGroupAdminsRequest(user_ids=["2244994945"]) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `AddGroupAdminsResponse` + +--- + +## `add_group_members` + +POST `/2/chat/conversations/{id}/members` + +**Add Members to a Chat Group Conversation** + +Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key. Adding a user who has a pending join request approves that request; approval needs the same key-rotation body as adding any member. + +```python +import os +from xdk import Client +from xdk.chat.models import AddGroupMembersRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.add_group_members( + id="1895000000000000000", + body=AddGroupMembersRequest(user_ids=["2244994945"]) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `AddGroupMembersResponse` + +--- + +## `add_user_public_key` + +POST `/2/users/{id}/public_keys` + +**Add Public Key** + +Registers a user's public key for X Chat encryption. + +```python +import os +from xdk import Client +from xdk.chat.models import AddUserPublicKeyRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.add_user_public_key( + id="2244994945", + body=AddUserPublicKeyRequest(public_key={"public_key": "example"}) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `AddUserPublicKeyResponse` + +--- + +## `approve_group_admin_request` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/approve` + +**Approve an Admin Request in a Chat Group Conversation** + +Makes the user who requested admin permissions an admin of an encrypted Chat group conversation. Only a group admin can approve. + +```python +import os +from xdk import Client +from xdk.chat.models import ApproveGroupAdminRequestRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.approve_group_admin_request( + id="1895000000000000000", + user_id="2244994945", + body=ApproveGroupAdminRequestRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `ApproveGroupAdminRequestResponse` + +--- + +## `archive_conversation` + +POST `/2/chat/conversations/{id}/archive` + +**Archive a Chat Conversation** + +Archives a Chat conversation for the authenticated user only. Archiving an archived conversation changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client +from xdk.chat.models import ArchiveConversationRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.archive_conversation( + id="1895000000000000000", + body=ArchiveConversationRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `ArchiveConversationResponse` + +--- + +## `create_conversation` + +POST `/2/chat/conversations/group` + +**Create Chat Group Conversation** + +Creates a new encrypted Chat group conversation on behalf of the authenticated user. + +```python +import os +from xdk import Client +from xdk.chat.models import CreateConversationRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.create_conversation( + body=CreateConversationRequest(conversation_id="1500000000000000000", conversation_key_version="example", conversation_participant_keys=[{"user_id": "2244994945", "encrypted_conversation_key": "example", "public_key_version": "example"}], group_members=["example"]) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateConversationResponse` + +--- + +## `create_group_admin_request` + +POST `/2/chat/conversations/{id}/admin_requests` + +**Request Admin Permissions in a Chat Group Conversation** + +Asks the admins of an encrypted Chat group conversation to make the authenticated user an admin. An admin approves or rejects the request. + +```python +import os +from xdk import Client +from xdk.chat.models import CreateGroupAdminRequestRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.create_group_admin_request( + id="1895000000000000000", + body=CreateGroupAdminRequestRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `CreateGroupAdminRequestResponse` + +--- + +## `create_group_join_request` + +POST `/2/chat/conversations/{id}/join_requests` + +**Request to Join a Chat Group** + +Asks to join an encrypted Chat group conversation through its invite link. The request stays pending until a group admin adds the user to the group. + +```python +import os +from xdk import Client +from xdk.chat.models import CreateGroupJoinRequestRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.create_group_join_request( + id="1895000000000000000", + body=CreateGroupJoinRequestRequest(token="example") +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `CreateGroupJoinRequestResponse` + +--- + +## `delete_conversation` + +DELETE `/2/chat/conversations/{id}` + +**Delete a Chat Conversation** + +Deletes a Chat conversation for the authenticated user only; other participants keep it. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Deleting a pending message request's conversation deletes the request, like Delete in the X app. + +```python +import os +from xdk import Client +from xdk.chat.models import DeleteConversationRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.delete_conversation( + id="1895000000000000000", + body=DeleteConversationRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `DeleteConversationResponse` + +--- + +## `delete_conversation_message_ttl` + +DELETE `/2/chat/conversations/{id}/message_ttl` + +**Turn Off Disappearing Messages in a Chat Conversation** + +Stops new messages in a 1:1 or group Chat conversation from disappearing, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client +from xdk.chat.models import DeleteConversationMessageTtlRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.delete_conversation_message_ttl( + id="1895000000000000000", + body=DeleteConversationMessageTtlRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `DeleteConversationMessageTtlResponse` + +--- + +## `delete_messages` + +POST `/2/chat/conversations/{id}/messages/delete` + +**Delete Chat Messages** + +Deletes one or more messages from a Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Delete for all removes a message you sent (or, in groups you administer, any message) for every participant; delete for self removes any message only from your own view. + +```python +import os +from xdk import Client +from xdk.chat.models import DeleteMessagesRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.delete_messages( + id="1895000000000000000", + body=DeleteMessagesRequest(sequence_ids=["1895000000000000000"], delete_message_action="delete_for_all", action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `DeleteMessagesResponse` + +--- + +## `disable_group_invite` + +DELETE `/2/chat/conversations/{id}/invite` + +**Disable a Chat Group Invite Link** + +Turns off the invite link for an encrypted Chat group conversation. The existing link stops working. + +```python +import os +from xdk import Client +from xdk.chat.models import DisableGroupInviteRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.disable_group_invite( + id="1895000000000000000", + body=DisableGroupInviteRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `DisableGroupInviteResponse` + +--- + +## `enable_group_invite` + +POST `/2/chat/conversations/{id}/invite` + +**Enable a Chat Group Invite Link** + +Turns on the invite link for an encrypted Chat group conversation and returns the link details. The client builds the link and sends it as invite_url, in the form https://x.com/i/chat/group_join/<conversation_id>/<token>, where the token is exactly 10 letters, digits, '-' or '_'. invite_url is required when action_signatures is sent. To make the link expire, send validity_duration_msec or validity_expiry_timestamp_msec. With action_signatures, send validity_expiry_timestamp_msec, because the signed payload carries the expiry. The group name and avatar sent here are stored unencrypted and shown to anyone who opens the link. + +```python +import os +from xdk import Client +from xdk.chat.models import EnableGroupInviteRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.enable_group_invite( + id="1895000000000000000", + body=EnableGroupInviteRequest(affiliate_user_id="1895000000000000000") +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `EnableGroupInviteResponse` + +--- + +## `get_conversation` + +GET `/2/chat/conversations/{id}` + +**Get Chat Conversation** + +Returns metadata for a Chat conversation including type, muted status, group details, and your unread state. For the unread state, request chat_conversation.fields=unread,last_read_event_id,newest_event_id: those fields give your read state, computed from your latest read receipt and the conversation's latest notifying message. Use chat_conversation.fields to select which fields are returned. Use expansions to hydrate member, admin, or participant user objects. Use user.fields to control which profile fields are returned for expanded users; in a 1:1 chat, user.fields=receives_your_chat on the participant says how you can message them: encrypted, unencrypted, or none. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.get_conversation(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ChatConversation fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `GetConversationResponse` + +--- + +## `get_conversation_events` + +GET `/2/chat/conversations/{id}/events` Paginated + +**Get Chat Conversation Events** + +Retrieves the events of a specific Chat conversation, newest first, with pagination support: messages, key changes, group changes, and read receipts. Events with an id above the conversation's last_read_event_id are unread: they come after the point you read up to. To collect them, page until an event's id is at or below it. Only `id` and `encoded_event` are always present. Events are either end-to-end encrypted or unencrypted, such as messages sent before the conversation was encrypted. Encrypted events carry `conversation_key_version`, and usually `conversation_token` and `message_event_signature`; treat an encrypted event without `message_event_signature` as unverified. An event without `conversation_key_version` is unencrypted. Decode each `encoded_event` client-side, and decrypt it with the conversation key named by `conversation_key_version` when that is present. A page holds up to `max_results` events and can hold fewer while `has_more` is true. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.chat.get_conversation_events(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of events to return. + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatMessageEvent fields to display. + + + + +**Returns:** `Iterator[GetConversationEventsResponse]` + +--- + +## `get_conversation_pinned_messages` + +GET `/2/chat/conversations/{id}/pinned_messages` Paginated + +**Get Chat Conversation Pinned Messages** + +Retrieves the pinned message events of a Chat conversation with pagination support. Each event is a Base64-encoded Thrift pin event whose contents are end-to-end encrypted; decode and decrypt it client-side. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.chat.get_conversation_pinned_messages(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatPinnedMessage fields to display. + + + + +**Returns:** `Iterator[GetConversationPinnedMessagesResponse]` + +--- + +## `get_conversations` + +GET `/2/chat/conversations` Paginated + +**Get Chat Conversations** + +Retrieves a list of Chat conversations for the authenticated user's inbox, newest first: the most recently active conversation comes first. To find the chat with a particular person, start with participant_query set to their @username or name; with expansions=participant_ids, user.fields=receives_your_chat says how you can message each match. The unread, last_read_event_id and newest_event_id fields give your read state, computed from your latest read receipt and each conversation's latest notifying message. Request them with chat_conversation.fields=unread,last_read_event_id,newest_event_id. + +The filters unread_only, type, is_archived, is_muted, participant_ids, participant_query, start_time and end_time are optional, and all filters must match (AND). participant_query keeps conversations where another participant's username, or a word of their display name, starts with the query, ignoring case and accents; with a leading @ it matches usernames only. It considers the 100 people who best match the query, uses only public profile information, and never matches group names, nicknames or messages. start_time and end_time apply to the time of each conversation's latest message. + +Each page covers max_results conversations and returns those that match, so a page can hold fewer than max_results, or none, while meta.next_token is set and has_more is true: keep paging, passing meta.next_token as pagination_token. Once a page reaches a conversation whose latest message is older than start_time, has_more is false. A pagination_token only works with the same filters as the request that returned it; with other filters, the request fails with a 400. + +When both are provided, `start_time` must be earlier than `end_time`. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.chat.get_conversations(): + print(page.data) +``` + +### Parameters + + + + + Conversations covered per page (1-1000, default 200). Filtered pages can return fewer. + + + + meta.next_token from the previous page. Send the same filters with it, or the request fails. + + + + Return only unread conversations. A page can be short; keep paging while has_more. + + + + Only direct (1:1) or only group conversations. Omit for both. + + + + true: only archived; false: only not archived. Omit for both. + + + + true: only muted; false: only not muted. Omit for both. + + + + Comma-separated numeric user IDs (1-10), all in the chat. Names or @handles: use participant_query. + + + + Start here to find someone's chat: their @username or a word of their name (1-50 chars). + + + + ISO 8601, e.g. 2026-10-16T00:00:00Z. Chats whose latest message is at or after this time. + + + + ISO 8601, e.g. 2026-10-17T00:00:00Z. Chats whose latest message is before this time. + + + + A comma separated list of ChatConversation fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Iterator[GetConversationsResponse]` + +--- + +## `get_group_admin_requests` + +GET `/2/chat/conversations/{id}/admin_requests` Paginated + +**Get Pending Admin Requests for a Chat Group Conversation** + +Returns the users who have asked to become admins of an encrypted Chat group conversation. Only a group admin can list admin requests. Use user.fields to select which profile fields are returned. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.chat.get_group_admin_requests(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetGroupAdminRequestsResponse]` + +--- + +## `get_group_invite` + +GET `/2/chat/conversations/{id}/invites/{token}` + +**Get a Chat Group Invite Link** + +Returns the preview of an encrypted Chat group conversation from its invite link: group name, avatar, member count, and the authenticated user's join state. The conversation ID and the token both come from the invite link. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.get_group_invite(id="1895000000000000000", token="example") +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The 10-character invite token from the group's invite link. + + + + + + A comma separated list of ChatGroupInvite fields to display. + + + + +**Returns:** `GetGroupInviteResponse` + +--- + +## `get_message_request` + +GET `/2/chat/message_requests/{id}` + +**Get Chat Message Request** + +Retrieves the message request state of a 1:1 Chat conversation and its newest message events. Like opening the request in an X app, reading it marks the returned messages as delivered and updates the unread badge. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.get_message_request(id="1895000000000000000") +print(response) +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + + + + + A comma separated list of ChatMessageRequestDetail fields to display. + + + + +**Returns:** `GetMessageRequestResponse` + +--- + +## `get_message_requests` + +GET `/2/chat/message_requests` Paginated + +**Get Chat Message Requests** + +Retrieves the authenticated user's pending Chat message requests from one inbox. Message contents are end-to-end encrypted unless the conversation is unencrypted. Accepting or deleting requests between pages can skip or repeat requests, and a page can be empty while `next_token` is set. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.chat.get_message_requests(): + print(page.data) +``` + +### Parameters + + + + + Which message request inbox to list: `you_may_know` (the apps' Priority tab) or `low_quality` (the apps' Hidden tab). + + + + The maximum number of message requests to return. + + + + The next_token from a previous response, to fetch the next page. + + + + A comma separated list of ChatMessageRequest fields to display. + + + + +**Returns:** `Iterator[GetMessageRequestsResponse]` + +--- + +## `get_settings` + +GET `/2/chat/settings` + +**Get Chat Settings** + +Returns the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.get_settings() +print(response) +``` + +### Parameters + + + + + A comma separated list of ChatSettings fields to display. + + + + +**Returns:** `GetSettingsResponse` + +--- + +## `initialize_group` + +POST `/2/chat/conversations/group/initialize` + +**Initialize Chat Group** + +Initializes a new Chat group conversation and returns a unique conversation ID. Use the returned conversation_id in a subsequent POST /chat/conversations/group call to fully create and configure the group. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.initialize_group() +print(response) +``` + +**Returns:** `InitializeGroupResponse` + +--- + +## `mark_conversation_read` + +POST `/2/chat/conversations/{id}/read` + +**Mark Conversation as Read** + +Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Without action_signatures the conversation is marked read up to its newest event and the read receipt is unsigned. With one action signature over a MarkConversationReadEvent, the server sends that signed read receipt, marking the conversation read up to the event it names. + +```python +import os +from xdk import Client +from xdk.chat.models import MarkConversationReadRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.mark_conversation_read( + id="1895000000000000000", + body=MarkConversationReadRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `MarkConversationReadResponse` + +--- + +## `mark_conversation_unread` + +POST `/2/chat/conversations/{id}/unread` + +**Mark Conversation as Unread** + +Marks a specific Chat conversation as unread on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.mark_conversation_unread(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `MarkConversationUnreadResponse` + +--- + +## `media_download` + +GET `/2/chat/media/{id}/{media_hash_key}` + +**Download Chat Media** + +Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. A media item too large to return in one response fails with a 413 problem of type `https://api.x.com/2/problems/response-too-large`, and a retry fails the same way. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.media_download(id="1895000000000000000", media_hash_key="example") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `media_hash_key` (path parameter). + + +**Returns:** `bytes` + +--- + +## `media_upload_append` + +POST `/2/chat/media/upload/{id}/append` + +**Append Chat Media Upload** + +Appends media data to an XChat upload session. + +```python +import os +from xdk import Client +from xdk.chat.models import MediaUploadAppendRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.media_upload_append( + id="1895000000000000000", + body=MediaUploadAppendRequest(media="example", segment_index=1, conversation_id="1500000000000000000", media_hash_key="example") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `MediaUploadAppendResponse` + +--- + +## `media_upload_finalize` + +POST `/2/chat/media/upload/{id}/finalize` + +**Finalize Chat Media Upload** + +Finalizes an XChat media upload session. + +```python +import os +from xdk import Client +from xdk.chat.models import MediaUploadFinalizeRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.media_upload_finalize( + id="1895000000000000000", + body=MediaUploadFinalizeRequest(conversation_id="1500000000000000000", media_hash_key="example", num_parts="example") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `MediaUploadFinalizeResponse` + +--- + +## `media_upload_initialize` + +POST `/2/chat/media/upload/initialize` + +**Initialize Chat Media Upload** + +Initializes an XChat media upload session. + +```python +import os +from xdk import Client +from xdk.chat.models import MediaUploadInitializeRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.media_upload_initialize( + body=MediaUploadInitializeRequest(conversation_id="1500000000000000000", total_bytes=1) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `MediaUploadInitializeResponse` + +--- + +## `mute_conversation` + +POST `/2/chat/conversations/{id}/mute` + +**Mute a Chat Conversation** + +Mutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client +from xdk.chat.models import MuteConversationRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.mute_conversation( + id="1895000000000000000", + body=MuteConversationRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `MuteConversationResponse` + +--- + +## `reject_group_admin_request` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/reject` + +**Reject an Admin Request in a Chat Group Conversation** + +Declines a user's pending request for admin permissions in an encrypted Chat group conversation. Only a group admin can reject. + +```python +import os +from xdk import Client +from xdk.chat.models import RejectGroupAdminRequestRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.reject_group_admin_request( + id="1895000000000000000", + user_id="2244994945", + body=RejectGroupAdminRequestRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `RejectGroupAdminRequestResponse` + +--- + +## `reject_group_join_requests` + +POST `/2/chat/conversations/{id}/join_requests/reject` + +**Reject Join Requests for a Chat Group Conversation** + +Rejects pending requests to join an encrypted Chat group conversation. Only group admins can reject requests. To approve a request instead, add the requesting users with addChatGroupMembers; adding a user clears their pending request. + +```python +import os +from xdk import Client +from xdk.chat.models import RejectGroupJoinRequestsRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.reject_group_join_requests( + id="1895000000000000000", + body=RejectGroupJoinRequestsRequest(user_ids=["2244994945"]) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `RejectGroupJoinRequestsResponse` + +--- + +## `remove_group_admins` + +POST `/2/chat/conversations/{id}/admins/remove` + +**Remove Admins from a Chat Group Conversation** + +Revokes admin rights from one or more admins of an existing encrypted Chat group conversation. They stay members of the group. + +```python +import os +from xdk import Client +from xdk.chat.models import RemoveGroupAdminsRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.remove_group_admins( + id="1895000000000000000", + body=RemoveGroupAdminsRequest(user_ids=["2244994945"]) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `RemoveGroupAdminsResponse` + +--- + +## `remove_group_members` + +POST `/2/chat/conversations/{id}/members/remove` + +**Remove Members from a Chat Group Conversation** + +Removes one or more members from an existing encrypted Chat group conversation. To leave a group, pass your own user ID. Leaving does not delete the conversation for the caller. When the removal rotates the conversation key, send group_key_rotation_data and the action signatures for the removal and the key change, in that order. + +```python +import os +from xdk import Client +from xdk.chat.models import RemoveGroupMembersRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.remove_group_members( + id="1895000000000000000", + body=RemoveGroupMembersRequest(user_ids=["2244994945"]) +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `RemoveGroupMembersResponse` + +--- + +## `send_message` + +POST `/2/chat/conversations/{id}/messages` + +**Send Chat Message** + +Sends a message or reaction to a Chat conversation, which you can find with `participant_query` on Get Chat Conversations. Send it end-to-end encrypted by default: `encoded_message_create_event`, built with the Chat XDK. Plaintext `content` is only a fallback for a 1:1 chat that X Chat can't encrypt: use it only when the recipient's `receives_your_chat` user field (`user.fields=receives_your_chat`) is `unencrypted`. When `content` is refused, nothing is sent and the problem's `detail` says why; HTTP 400 https://api.x.com/2/problems/encryption-required means the chat can be encrypted or is a group, so send it encrypted instead. A recipient you can't message (closed inbox, system account, or a block) returns HTTP 403 https://api.x.com/2/problems/recipient-not-messageable. + +```python +import os +from xdk import Client +from xdk.chat.models import SendMessageRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.send_message( + id="1895000000000000000", + body=SendMessageRequest(message_id="1895000000000000000") +) +print(response) +``` + +### Parameters + + + A conversation's id from Get Chat Conversations, or the recipient's user ID for a 1:1 chat. + + + + At least one of `encoded_message_create_event`, `content` is required. + + +**Returns:** `SendMessageResponse` + +--- + +## `send_typing_indicator` + +POST `/2/chat/conversations/{id}/typing` + +**Send Typing Indicator** + +Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.send_typing_indicator(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `SendTypingIndicatorResponse` + +--- + +## `unarchive_conversation` + +DELETE `/2/chat/conversations/{id}/archive` + +**Unarchive a Chat Conversation** + +Unarchives a Chat conversation for the authenticated user only. Unarchiving a conversation that is not archived changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client +from xdk.chat.models import UnarchiveConversationRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.unarchive_conversation( + id="1895000000000000000", + body=UnarchiveConversationRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `UnarchiveConversationResponse` + +--- + +## `unmute_conversation` + +DELETE `/2/chat/conversations/{id}/mute` + +**Unmute a Chat Conversation** + +Unmutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client +from xdk.chat.models import UnmuteConversationRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.unmute_conversation( + id="1895000000000000000", + body=UnmuteConversationRequest(action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `UnmuteConversationResponse` + +--- + +## `update_conversation_message_ttl` + +PUT `/2/chat/conversations/{id}/message_ttl` + +**Turn On Disappearing Messages in a Chat Conversation** + +Sets how long new messages in a 1:1 or group Chat conversation last before they disappear, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client +from xdk.chat.models import UpdateConversationMessageTtlRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.update_conversation_message_ttl( + id="1895000000000000000", + body=UpdateConversationMessageTtlRequest(message_ttl_ms="example") +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `UpdateConversationMessageTtlResponse` + +--- + +## `update_conversation_screen_capture` + +PUT `/2/chat/conversations/{id}/screen_capture` + +**Update Screen Capture Settings for a Chat Conversation** + +Turns screenshot blocking or screenshot detection on or off in a Chat conversation, for every participant. In a group conversation, only admins can change these settings. Each request changes one setting: send either blocking or detection. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```python +import os +from xdk import Client +from xdk.chat.models import UpdateConversationScreenCaptureRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.update_conversation_screen_capture( + id="1895000000000000000", + body=UpdateConversationScreenCaptureRequest(blocking_action_signatures=[{"message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {}}]) +) +print(response) +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + At least one of `blocking`, `detection` is required. + + +**Returns:** `UpdateConversationScreenCaptureResponse` + +--- + +## `update_group` + +PUT `/2/chat/conversations/{id}` + +**Update a Chat Group Conversation** + +Renames an encrypted Chat group conversation, changes its avatar, or sets its description. The client encrypts each value with the conversation key and lists the values it changed in modified_fields. + +```python +import os +from xdk import Client +from xdk.chat.models import UpdateGroupRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.update_group( + id="1895000000000000000", + body=UpdateGroupRequest(modified_fields=["group_name"], conversation_key_version="example") +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `UpdateGroupResponse` + +--- + +## `update_group_admin_settings` + +PUT `/2/chat/conversations/{id}/admin_settings` + +**Update the Admin-Only Settings of a Chat Group Conversation** + +Sets which actions only admins can perform in an existing encrypted Chat group conversation. A setting set to true restricts that action to admins, and false opens it to all members. Setting `send_message` to true makes the group announcement-only. Omitted settings keep their stored value. When sending `action_signatures`, sign over the full merged settings: the stored values with this request's changes applied, not only the settings in the request. + +```python +import os +from xdk import Client +from xdk.chat.models import UpdateGroupAdminSettingsRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.update_group_admin_settings( + id="1895000000000000000", + body=UpdateGroupAdminSettingsRequest(block_screen_capture=True) +) +print(response) +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + At least one of `add_member`, `edit_group_info`, `send_message`, `start_call`, `edit_message_ttl`, `block_screen_capture` is required. + + +**Returns:** `UpdateGroupAdminSettingsResponse` + +--- + +## `update_settings` + +PUT `/2/chat/settings` + +**Update Chat Settings** + +Updates the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. allow_dms_from, dm_receipt_settings, and dm_quality_filter accept only their listed values, matched exactly and case-sensitively; anything else is a 400. av_settings must set at least one of its settings. Whether settings omitted from a partial av_settings keep their values or are reset is not yet confirmed; send every av_settings field you want to keep. + +```python +import os +from xdk import Client +from xdk.chat.models import UpdateSettingsRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.chat.update_settings(body=UpdateSettingsRequest(always_allow_dms_from_subscribers=True)) +print(response) +``` + +### Parameters + + + At least one of `allow_dms_from`, `always_allow_dms_from_subscribers`, `dm_quality_filter`, `dm_receipt_settings`, `av_settings` is required. + + +**Returns:** `UpdateSettingsResponse` + +--- + diff --git a/xdks/python/reference/clients/communities.mdx b/xdks/python/reference/clients/communities.mdx new file mode 100644 index 000000000..1333b9d61 --- /dev/null +++ b/xdks/python/reference/clients/communities.mdx @@ -0,0 +1,99 @@ +--- +title: "CommunitiesClient (Python XDK)" +sidebarTitle: "Communities" +description: "Python XDK CommunitiesClient reference — 2 methods for X API v2 Communities endpoints." +--- + +Access **Communities** endpoints via `client.communities` (`CommunitiesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get_by_id`](#get_by_id) | `GET /2/communities/{id}` | Standard | Get Community by ID | +| [`search`](#search) | `GET /2/communities/search` | Paginated | Search Communities | + +## `get_by_id` + +GET `/2/communities/{id}` + +**Get Community by ID** + +Retrieves details of a specific Community by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.communities.get_by_id(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Community fields to display. + + + + +**Returns:** `GetByIdResponse` + +--- + +## `search` + +GET `/2/communities/search` Paginated + +**Search Communities** + +Retrieves a list of Communities matching the specified search query. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.communities.search(query="from:XDevelopers"): + print(page.data) +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Community fields to display. + + + + +**Returns:** `Iterator[SearchResponse]` + +--- + diff --git a/xdks/python/reference/clients/community-notes.mdx b/xdks/python/reference/clients/community-notes.mdx new file mode 100644 index 000000000..efd3ca429 --- /dev/null +++ b/xdks/python/reference/clients/community-notes.mdx @@ -0,0 +1,220 @@ +--- +title: "CommunityNotesClient (Python XDK)" +sidebarTitle: "Community Notes" +description: "Python XDK CommunityNotesClient reference — 5 methods for X API v2 Community Notes endpoints." +--- + +Access **Community Notes** endpoints via `client.community_notes` (`CommunityNotesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/notes` | Standard | Create a Community Note | +| [`delete`](#delete) | `DELETE /2/notes/{id}` | Standard | Delete a Community Note | +| [`evaluate`](#evaluate) | `POST /2/notes/evaluate` | Standard | Evaluate a Community Note | +| [`search_eligible_posts`](#search_eligible_posts) | `GET /2/notes/search/posts_eligible_for_notes` | Paginated | Search for Posts Eligible for Community Notes | +| [`search_written`](#search_written) | `GET /2/notes/search/notes_written` | Paginated | Search for Community Notes Written | + +## `create` + +POST `/2/notes` + +**Create a Community Note** + +Creates a Community Note on a Post. With test_mode set to true, the note is only for testing and is not publicly visible. + +```python +import os +from xdk import Client +from xdk.community_notes.models import CreateRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.community_notes.create( + body=CreateRequest(test_mode=True, post_id="1895000000000000000", info={"text": "Hello from XDK!", "classification": "misinformed_or_potentially_misleading", "misleading_tags": ["disputed_claim_as_fact"], "trustworthy_sources": True}) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateResponse` + +--- + +## `delete` + +DELETE `/2/notes/{id}` + +**Delete a Community Note** + +Deletes a community note. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.community_notes.delete(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `DeleteResponse` + +--- + +## `evaluate` + +POST `/2/notes/evaluate` + +**Evaluate a Community Note** + +Evaluates the text of a proposed Community Note on a Post and returns its claim-opinion score. + +```python +import os +from xdk import Client +from xdk.community_notes.models import EvaluateRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.community_notes.evaluate( + body=EvaluateRequest(post_id="1895000000000000000", note_text="example") +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `EvaluateResponse` + +--- + +## `search_eligible_posts` + +GET `/2/notes/search/posts_eligible_for_notes` Paginated + +**Search for Posts Eligible for Community Notes** + +Retrieves Posts that are eligible for Community Notes. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.community_notes.search_eligible_posts(test_mode=True): + print(page.data) +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + `post_selection` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[SearchEligiblePostsResponse]` + +--- + +## `search_written` + +GET `/2/notes/search/notes_written` Paginated + +**Search for Community Notes Written** + +Retrieves the Community Notes written by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.community_notes.search_written(test_mode=True): + print(page.data) +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Note fields to display. + + + + +**Returns:** `Iterator[SearchWrittenResponse]` + +--- + diff --git a/xdks/python/reference/clients/compliance.mdx b/xdks/python/reference/clients/compliance.mdx new file mode 100644 index 000000000..3acfdd7bc --- /dev/null +++ b/xdks/python/reference/clients/compliance.mdx @@ -0,0 +1,252 @@ +--- +title: "ComplianceClient (Python XDK)" +sidebarTitle: "Compliance" +description: "Python XDK ComplianceClient reference — 6 methods for X API v2 Compliance endpoints." +--- + +Access **Compliance** endpoints via `client.compliance` (`ComplianceClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create_jobs`](#create_jobs) | `POST /2/compliance/jobs` | Standard | Create Compliance Job | +| [`delete_jobs_by_id`](#delete_jobs_by_id) | `DELETE /2/compliance/jobs/{id}` | Standard | Cancel Compliance Job | +| [`download_job_results`](#download_job_results) | `GET /2/compliance/jobs/{id}/download` | Standard | Download Compliance Job Results | +| [`get_jobs`](#get_jobs) | `GET /2/compliance/jobs` | Standard | Get Compliance Jobs | +| [`get_jobs_by_id`](#get_jobs_by_id) | `GET /2/compliance/jobs/{id}` | Standard | Get Compliance Job by ID | +| [`upload_job_submission`](#upload_job_submission) | `PUT /2/compliance/jobs/{id}/upload` | Standard | Upload Compliance Job Submission | + +## `create_jobs` + +POST `/2/compliance/jobs` + +**Create Compliance Job** + +Creates a new Compliance Job for the specified job type. + +```python +import os +from xdk import Client +from xdk.compliance.models import CreateJobsRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.compliance.create_jobs(body=CreateJobsRequest(type="tweets")) +print(response) +``` + +### Parameters + + + Request payload. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `CreateJobsResponse` + +--- + +## `delete_jobs_by_id` + +DELETE `/2/compliance/jobs/{id}` + +**Cancel Compliance Job** + +Cancels a Compliance Job that has not finished processing; its status becomes failed and a new job of the same type can be created. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.compliance.delete_jobs_by_id(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `DeleteJobsByIdResponse` + +--- + +## `download_job_results` + +GET `/2/compliance/jobs/{id}/download` + +**Download Compliance Job Results** + +Downloads the results file of a completed Compliance Job using the signed URL returned at job creation. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.compliance.download_job_results(id="1895000000000000000", token="example") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Signed download token from the job's download_url. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `bytes` + +--- + +## `get_jobs` + +GET `/2/compliance/jobs` + +**Get Compliance Jobs** + +Retrieves a list of Compliance Jobs filtered by job type and optional status. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.compliance.get_jobs(type="tweets") +print(response) +``` + +### Parameters + + + `type` (query parameter). + + + + + + `status` (query parameter). + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `GetJobsResponse` + +--- + +## `get_jobs_by_id` + +GET `/2/compliance/jobs/{id}` + +**Get Compliance Job by ID** + +Retrieves details of a specific Compliance Job by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.compliance.get_jobs_by_id(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `GetJobsByIdResponse` + +--- + +## `upload_job_submission` + +PUT `/2/compliance/jobs/{id}/upload` + +**Upload Compliance Job Submission** + +Uploads the newline-delimited ID file for a Compliance Job using the signed URL returned at job creation. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.compliance.upload_job_submission(id="1895000000000000000", token="example", body=b"...") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Signed upload token from the job's upload_url. + + + + Request payload. + + + + + + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `UploadJobSubmissionResponse` + +--- + diff --git a/xdks/python/reference/clients/connections.mdx b/xdks/python/reference/clients/connections.mdx new file mode 100644 index 000000000..af0824533 --- /dev/null +++ b/xdks/python/reference/clients/connections.mdx @@ -0,0 +1,144 @@ +--- +title: "ConnectionsClient (Python XDK)" +sidebarTitle: "Connections" +description: "Python XDK ConnectionsClient reference — 4 methods for X API v2 Connections endpoints." +--- + +Access **Connections** endpoints via `client.connections` (`ConnectionsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`delete_all`](#delete_all) | `DELETE /2/connections/all` | Standard | Terminate All Connections | +| [`delete_by_endpoint`](#delete_by_endpoint) | `DELETE /2/connections/{endpoint_id}` | Standard | Terminate Connections by Endpoint | +| [`delete_by_uuids`](#delete_by_uuids) | `DELETE /2/connections` | Standard | Terminate Multiple Connections | +| [`get_connection_history`](#get_connection_history) | `GET /2/connections` | Paginated | Get Connection History | + +## `delete_all` + +DELETE `/2/connections/all` + +**Terminate All Connections** + +Terminates all active streaming connections for the authenticated application. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.connections.delete_all() +print(response) +``` + +**Returns:** `DeleteAllResponse` + +--- + +## `delete_by_endpoint` + +DELETE `/2/connections/{endpoint_id}` + +**Terminate Connections by Endpoint** + +Terminates all streaming connections for a specific endpoint ID for the authenticated application. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.connections.delete_by_endpoint(endpoint_id="filtered_stream") +print(response) +``` + +### Parameters + + + `endpoint_id` (path parameter). + + +**Returns:** `DeleteByEndpointResponse` + +--- + +## `delete_by_uuids` + +DELETE `/2/connections` + +**Terminate Multiple Connections** + +Terminates multiple streaming connections by their UUIDs for the authenticated application. + +```python +import os +from xdk import Client +from xdk.connections.models import DeleteByUuidsRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.connections.delete_by_uuids(body=DeleteByUuidsRequest(uuids=["example"])) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `DeleteByUuidsResponse` + +--- + +## `get_connection_history` + +GET `/2/connections` Paginated + +**Get Connection History** + +Returns active and historical streaming connections with disconnect reasons for the authenticated application. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.connections.get_connection_history(): + print(page.data) +``` + +### Parameters + + + + + `status` (query parameter). + + + + `endpoints` (query parameter). + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of Connection fields to display. + + + + +**Returns:** `Iterator[GetConnectionHistoryResponse]` + +--- + diff --git a/xdks/python/reference/clients/direct-messages.mdx b/xdks/python/reference/clients/direct-messages.mdx new file mode 100644 index 000000000..c51f67d02 --- /dev/null +++ b/xdks/python/reference/clients/direct-messages.mdx @@ -0,0 +1,433 @@ +--- +title: "DirectMessagesClient (Python XDK)" +sidebarTitle: "Direct Messages" +description: "Python XDK DirectMessagesClient reference — 9 methods for X API v2 Direct Messages endpoints." +--- + +Access **Direct Messages** endpoints via `client.direct_messages` (`DirectMessagesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create_by_conversation_id`](#create_by_conversation_id) | `POST /2/dm_conversations/{dm_conversation_id}/messages` | Standard | Create DM Message by Conversation ID | +| [`create_by_participant_id`](#create_by_participant_id) | `POST /2/dm_conversations/with/{participant_id}/messages` | Standard | Create DM Message by Participant ID | +| [`create_conversation`](#create_conversation) | `POST /2/dm_conversations` | Standard | Create DM Conversation | +| [`delete_events`](#delete_events) | `DELETE /2/dm_events/{event_id}` | Standard | Delete DM Event | +| [`dm_conversations_media_download`](#dm_conversations_media_download) | `GET /2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` | Standard | Download DM Media | +| [`get_events`](#get_events) | `GET /2/dm_events` | Paginated | Get DM Events | +| [`get_events_by_conversation_id`](#get_events_by_conversation_id) | `GET /2/dm_conversations/{id}/dm_events` | Paginated | Get DM Events by Conversation ID | +| [`get_events_by_id`](#get_events_by_id) | `GET /2/dm_events/{event_id}` | Standard | Get DM Event by ID | +| [`get_events_by_participant_id`](#get_events_by_participant_id) | `GET /2/dm_conversations/with/{participant_id}/dm_events` | Paginated | Get DM Events by Participant ID | + +## `create_by_conversation_id` + +POST `/2/dm_conversations/{dm_conversation_id}/messages` + +**Create DM Message by Conversation ID** + +Sends a new direct message to a specific conversation by its ID. + +```python +import os +from xdk import Client +from xdk.direct_messages.models import CreateByConversationIdRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.direct_messages.create_by_conversation_id( + dm_conversation_id="1500000000000000000", + body=CreateByConversationIdRequest(text="Hello from XDK!") +) +print(response) +``` + +### Parameters + + + `dm_conversation_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `CreateByConversationIdResponse` + +--- + +## `create_by_participant_id` + +POST `/2/dm_conversations/with/{participant_id}/messages` + +**Create DM Message by Participant ID** + +Sends a new direct message to a specific participant by their ID. + +```python +import os +from xdk import Client +from xdk.direct_messages.models import CreateByParticipantIdRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.direct_messages.create_by_participant_id( + participant_id="2244994945", + body=CreateByParticipantIdRequest(text="Hello from XDK!") +) +print(response) +``` + +### Parameters + + + `participant_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `CreateByParticipantIdResponse` + +--- + +## `create_conversation` + +POST `/2/dm_conversations` + +**Create DM Conversation** + +Initiates a new direct message conversation with specified participants. + +```python +import os +from xdk import Client +from xdk.direct_messages.models import CreateConversationRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.direct_messages.create_conversation( + body=CreateConversationRequest(conversation_type="Group", participant_ids=["2244994945"], message={"text": "Hello from XDK!"}) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateConversationResponse` + +--- + +## `delete_events` + +DELETE `/2/dm_events/{event_id}` + +**Delete DM Event** + +Deletes a specific direct message event by its ID, if owned by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.direct_messages.delete_events(event_id="1600000000000000000") +print(response) +``` + +### Parameters + + + `event_id` (path parameter). + + +**Returns:** `DeleteEventsResponse` + +--- + +## `dm_conversations_media_download` + +GET `/2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` + +**Download DM Media** + +Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.direct_messages.dm_conversations_media_download( + dm_id="1895000000000000000", + media_id="3_1895000000000000000", + resource_id="1895000000000000000" +) +print(response) +``` + +### Parameters + + + `dm_id` (path parameter). + + + + `media_id` (path parameter). + + + + `resource_id` (path parameter). + + +**Returns:** `bytes` + +--- + +## `get_events` + +GET `/2/dm_events` Paginated + +**Get DM Events** + +Retrieves a list of recent direct message events across all conversations. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.direct_messages.get_events(): + print(page.data) +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Iterator[GetEventsResponse]` + +--- + +## `get_events_by_conversation_id` + +GET `/2/dm_conversations/{id}/dm_events` Paginated + +**Get DM Events by Conversation ID** + +Retrieves direct message events for a specific conversation by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.direct_messages.get_events_by_conversation_id(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Iterator[GetEventsByConversationIdResponse]` + +--- + +## `get_events_by_id` + +GET `/2/dm_events/{event_id}` + +**Get DM Event by ID** + +Retrieves details of a specific direct message event by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.direct_messages.get_events_by_id(event_id="1600000000000000000") +print(response) +``` + +### Parameters + + + `event_id` (path parameter). + + + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `GetEventsByIdResponse` + +--- + +## `get_events_by_participant_id` + +GET `/2/dm_conversations/with/{participant_id}/dm_events` Paginated + +**Get DM Events by Participant ID** + +Retrieves direct message events for the one-to-one conversation between the authenticated user and a specific participant. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.direct_messages.get_events_by_participant_id(participant_id="2244994945"): + print(page.data) +``` + +### Parameters + + + `participant_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `event_types` (query parameter). + + + + A comma separated list of DmEvent fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `Iterator[GetEventsByParticipantIdResponse]` + +--- + diff --git a/xdks/python/reference/clients/general.mdx b/xdks/python/reference/clients/general.mdx new file mode 100644 index 000000000..c704d1681 --- /dev/null +++ b/xdks/python/reference/clients/general.mdx @@ -0,0 +1,36 @@ +--- +title: "GeneralClient (Python XDK)" +sidebarTitle: "General" +description: "Python XDK GeneralClient reference — 1 methods for X API v2 General endpoints." +--- + +Access **General** endpoints via `client.general` (`GeneralClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get_open_api_spec`](#get_open_api_spec) | `GET /2/openapi.json` | Standard | Get OpenAPI Spec | + +## `get_open_api_spec` + +GET `/2/openapi.json` + +**Get OpenAPI Spec** + +Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md) + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.general.get_open_api_spec() +print(response) +``` + +**Returns:** `GetOpenApiSpecResponse` + +--- + diff --git a/xdks/python/reference/clients/lists.mdx b/xdks/python/reference/clients/lists.mdx new file mode 100644 index 000000000..69e184b4a --- /dev/null +++ b/xdks/python/reference/clients/lists.mdx @@ -0,0 +1,392 @@ +--- +title: "ListsClient (Python XDK)" +sidebarTitle: "Lists" +description: "Python XDK ListsClient reference — 9 methods for X API v2 Lists endpoints." +--- + +Access **Lists** endpoints via `client.lists` (`ListsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`add_member`](#add_member) | `POST /2/lists/{id}/members` | Standard | Add List Member | +| [`create`](#create) | `POST /2/lists` | Standard | Create List | +| [`delete`](#delete) | `DELETE /2/lists/{id}` | Standard | Delete List | +| [`get_by_id`](#get_by_id) | `GET /2/lists/{id}` | Standard | Get List by ID | +| [`get_followers`](#get_followers) | `GET /2/lists/{id}/followers` | Paginated | Get List Followers | +| [`get_members`](#get_members) | `GET /2/lists/{id}/members` | Paginated | Get List Members | +| [`get_posts`](#get_posts) | `GET /2/lists/{id}/tweets` | Paginated | Get List Posts | +| [`remove_member_by_user_id`](#remove_member_by_user_id) | `DELETE /2/lists/{id}/members/{user_id}` | Standard | Remove List Member | +| [`update`](#update) | `PUT /2/lists/{id}` | Standard | Update List | + +## `add_member` + +POST `/2/lists/{id}/members` + +**Add List Member** + +Adds a User to a specific List by its ID. + +```python +import os +from xdk import Client +from xdk.lists.models import AddMemberRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.lists.add_member( + id="1450000000000000000", + body=AddMemberRequest(user_id="2244994945") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `AddMemberResponse` + +--- + +## `create` + +POST `/2/lists` + +**Create List** + +Creates a new List for the authenticated user. + +```python +import os +from xdk import Client +from xdk.lists.models import CreateRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.lists.create(body=CreateRequest(name="My List")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateResponse` + +--- + +## `delete` + +DELETE `/2/lists/{id}` + +**Delete List** + +Deletes a specific List owned by the authenticated user by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.lists.delete(id="1450000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `DeleteResponse` + +--- + +## `get_by_id` + +GET `/2/lists/{id}` + +**Get List by ID** + +Retrieves details of a specific List by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.lists.get_by_id(id="1450000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `GetByIdResponse` + +--- + +## `get_followers` + +GET `/2/lists/{id}/followers` Paginated + +**Get List Followers** + +Retrieves a list of Users who follow a specific List by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.lists.get_followers(id="1450000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetFollowersResponse]` + +--- + +## `get_members` + +GET `/2/lists/{id}/members` Paginated + +**Get List Members** + +Retrieves a list of Users who are members of a specific List by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.lists.get_members(id="1450000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetMembersResponse]` + +--- + +## `get_posts` + +GET `/2/lists/{id}/tweets` Paginated + +**Get List Posts** + +Retrieves a list of Posts associated with a specific List by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.lists.get_posts(id="1450000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetPostsResponse]` + +--- + +## `remove_member_by_user_id` + +DELETE `/2/lists/{id}/members/{user_id}` + +**Remove List Member** + +Removes a User from a List by their ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.lists.remove_member_by_user_id(id="1450000000000000000", user_id="2244994945") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `RemoveMemberByUserIdResponse` + +--- + +## `update` + +PUT `/2/lists/{id}` + +**Update List** + +Updates the details of a specific List owned by the authenticated user by its ID. + +```python +import os +from xdk import Client +from xdk.lists.models import UpdateRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.lists.update(id="1450000000000000000", body=UpdateRequest(name="My List")) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `UpdateResponse` + +--- + diff --git a/xdks/python/reference/clients/media.mdx b/xdks/python/reference/clients/media.mdx new file mode 100644 index 000000000..df8b2bc05 --- /dev/null +++ b/xdks/python/reference/clients/media.mdx @@ -0,0 +1,646 @@ +--- +title: "MediaClient (Python XDK)" +sidebarTitle: "Media" +description: "Python XDK MediaClient reference — 19 methods for X API v2 Media endpoints." +--- + +Access **Media** endpoints via `client.media` (`MediaClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`add_post_to_amplify_programs`](#add_post_to_amplify_programs) | `POST /2/media/amplify/posts` | Standard | Add Post to Amplify Programs | +| [`add_to_library`](#add_to_library) | `POST /2/media/library` | Standard | Add Media to Library | +| [`append_upload`](#append_upload) | `POST /2/media/upload/{id}/append` | Standard | Append Media Upload | +| [`create_metadata`](#create_metadata) | `POST /2/media/metadata` | Standard | Create Media Metadata | +| [`create_subtitles`](#create_subtitles) | `POST /2/media/subtitles` | Standard | Create Media Subtitles | +| [`delete_subtitles`](#delete_subtitles) | `DELETE /2/media/subtitles` | Standard | Delete Media Subtitles | +| [`finalize_upload`](#finalize_upload) | `POST /2/media/upload/{id}/finalize` | Standard | Finalize Media Upload | +| [`get_amplify_program`](#get_amplify_program) | `GET /2/media/amplify/programs/{program_id}` | Standard | Get Amplify Program | +| [`get_amplify_program_posts`](#get_amplify_program_posts) | `GET /2/media/amplify/programs/{program_id}/posts` | Standard | Get Amplify Program Posts | +| [`get_amplify_programs`](#get_amplify_programs) | `GET /2/media/amplify/programs` | Standard | Get Amplify Programs | +| [`get_analytics`](#get_analytics) | `GET /2/media/analytics` | Standard | Get Media Analytics | +| [`get_by_key`](#get_by_key) | `GET /2/media/{media_key}` | Standard | Get Media by Media Key | +| [`get_by_keys`](#get_by_keys) | `GET /2/media` | Standard | Get Media by Media Keys | +| [`get_library_categories`](#get_library_categories) | `GET /2/media/library/categories` | Standard | Get Media Library Categories | +| [`get_upload_status`](#get_upload_status) | `GET /2/media/upload` | Standard | Get Media Upload Status | +| [`initialize_upload`](#initialize_upload) | `POST /2/media/upload/initialize` | Standard | Initialize Media Upload | +| [`remove_from_library`](#remove_from_library) | `DELETE /2/media/library/{media_key}` | Standard | Remove Media Library Item | +| [`update_in_library`](#update_in_library) | `PUT /2/media/library/{media_key}` | Standard | Update Media Library Item | +| [`upload`](#upload) | `POST /2/media/upload` | Standard | Upload Media | + +## `add_post_to_amplify_programs` + +POST `/2/media/amplify/posts` + +**Add Post to Amplify Programs** + +Publishes one of the authenticated user's video posts into one or more active Amplify pre-roll programs the user is enrolled in as a publisher. + +```python +import os +from xdk import Client +from xdk.media.models import AddPostToAmplifyProgramsRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.add_post_to_amplify_programs( + body=AddPostToAmplifyProgramsRequest(post_id="1895000000000000000", program_ids=["1895000000000000000"]) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `AddPostToAmplifyProgramsResponse` + +--- + +## `add_to_library` + +POST `/2/media/library` + +**Add Media to Library** + +Adds previously uploaded media to the authenticated user's Media Library with its library metadata. The user must own the media. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```python +import os +from xdk import Client +from xdk.media.models import AddToLibraryRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.add_to_library(body=AddToLibraryRequest(media_key="3_1895000000000000000")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `AddToLibraryResponse` + +--- + +## `append_upload` + +POST `/2/media/upload/{id}/append` + +**Append Media Upload** + +Appends one segment of the file to a chunked upload. Send the segment base64-encoded in media (raw bytes in multipart bodies) and its position in the file in segment_index, counting from 0. A segment can be up to 8 MB; in a JSON body keep it to 4 MB or less, because base64 adds a third. After the last segment, call Finalize Media Upload. + +```python +import os +from xdk import Client +from xdk.media.models import AppendUploadRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.append_upload( + id="1895000000000000000", + body=AppendUploadRequest(media="example", segment_index=1) +) +print(response) +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + + + Request payload. + + +**Returns:** `AppendUploadResponse` + +--- + +## `create_metadata` + +POST `/2/media/metadata` + +**Create Media Metadata** + +Creates metadata for a Media file. + +```python +import os +from xdk import Client +from xdk.media.models import CreateMetadataRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.create_metadata( + body=CreateMetadataRequest(id="1895000000000000000", metadata={"shared_info": {"shared": "example"}}) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateMetadataResponse` + +--- + +## `create_subtitles` + +POST `/2/media/subtitles` + +**Create Media Subtitles** + +Creates subtitles for a specific Media file. + +```python +import os +from xdk import Client +from xdk.media.models import CreateSubtitlesRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.create_subtitles( + body=CreateSubtitlesRequest(id="1895000000000000000", media_category="AmplifyVideo", subtitles={"language_code": "example"}) +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateSubtitlesResponse` + +--- + +## `delete_subtitles` + +DELETE `/2/media/subtitles` + +**Delete Media Subtitles** + +Deletes subtitles for a specific Media file. + +```python +import os +from xdk import Client +from xdk.media.models import DeleteSubtitlesRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.delete_subtitles( + body=DeleteSubtitlesRequest(id="1895000000000000000", media_category="example", language_code="example") +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `DeleteSubtitlesResponse` + +--- + +## `finalize_upload` + +POST `/2/media/upload/{id}/finalize` + +**Finalize Media Upload** + +Completes a chunked upload once every segment is appended. For video the result carries processing_info: the media can go on a Post only when its state is succeeded, so call Get Media Upload Status until it is. A result without processing_info is ready to use. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.finalize_upload(id="1895000000000000000") +print(response) +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + +**Returns:** `FinalizeUploadResponse` + +--- + +## `get_amplify_program` + +GET `/2/media/amplify/programs/{program_id}` + +**Get Amplify Program** + +Returns one Amplify pre-roll program the authenticated user is enrolled in as a publisher. A program the user is not enrolled in is reported as not found. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.get_amplify_program(program_id="1895000000000000000") +print(response) +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `GetAmplifyProgramResponse` + +--- + +## `get_amplify_program_posts` + +GET `/2/media/amplify/programs/{program_id}/posts` + +**Get Amplify Program Posts** + +Returns the posts published into an Amplify pre-roll program the authenticated user is enrolled in as a publisher. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.get_amplify_program_posts(program_id="1895000000000000000") +print(response) +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `GetAmplifyProgramPostsResponse` + +--- + +## `get_amplify_programs` + +GET `/2/media/amplify/programs` + +**Get Amplify Programs** + +Returns the Amplify pre-roll programs the authenticated user is enrolled in as a publisher. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.get_amplify_programs() +print(response) +``` + +**Returns:** `GetAmplifyProgramsResponse` + +--- + +## `get_analytics` + +GET `/2/media/analytics` + +**Get Media Analytics** + +Retrieves analytics data for media. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.get_analytics( + media_keys=["3_1895000000000000000"], + start_time="2026-01-01T00:00:00Z", + end_time="2026-01-02T00:00:00Z" +) +print(response) +``` + +### Parameters + + + `media_keys` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + + + A comma separated list of MediaAnalytics fields to display. + + + + +**Returns:** `GetAnalyticsResponse` + +--- + +## `get_by_key` + +GET `/2/media/{media_key}` + +**Get Media by Media Key** + +Retrieves details of a specific Media file by its media key. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.media.get_by_key(media_key="3_1895000000000000000") +print(response) +``` + +### Parameters + + + `media_key` (path parameter). + + + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `GetByKeyResponse` + +--- + +## `get_by_keys` + +GET `/2/media` + +**Get Media by Media Keys** + +Retrieves details of Media files by their media keys. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.media.get_by_keys(media_keys=["3_1895000000000000000"]) +print(response) +``` + +### Parameters + + + `media_keys` (query parameter). + + + + + + A comma separated list of Media fields to display. + + + + +**Returns:** `GetByKeysResponse` + +--- + +## `get_library_categories` + +GET `/2/media/library/categories` + +**Get Media Library Categories** + +Returns the video categories a publisher can assign to a media library item and the advertiser categories whose ads can be blocked from running against it. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.get_library_categories() +print(response) +``` + +### Parameters + + + + + Language tag for category descriptions, e.g. `en` or `pt-BR`. + + + + +**Returns:** `GetLibraryCategoriesResponse` + +--- + +## `get_upload_status` + +GET `/2/media/upload` + +**Get Media Upload Status** + +Returns how far X has processed an uploaded media file, in processing_info.state: pending, in_progress, succeeded or failed. Call it after Finalize Media Upload returns processing_info, waiting check_after_secs between calls, until the state is succeeded. A failed state means the media can't be used. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.get_upload_status(media_id="3_1895000000000000000") +print(response) +``` + +### Parameters + + + The media id from Initialize Media Upload. + + + + + + Always STATUS; can be left out. + + + + +**Returns:** `GetUploadStatusResponse` + +--- + +## `initialize_upload` + +POST `/2/media/upload/initialize` + +**Initialize Media Upload** + +Starts a chunked media upload and returns its id. Use it for video and for other files too large for one request. For a video on a Post, set media_category to tweet_video, media_type to the file's type (for example video/mp4) and total_bytes to the file's size. Send the file with Append Media Upload, call Finalize Media Upload, then pass the id in media.media_ids on Create or Edit Post. + +```python +import os +from xdk import Client +from xdk.media.models import InitializeUploadRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.initialize_upload(body=InitializeUploadRequest(media_category="amplify_video")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `InitializeUploadResponse` + +--- + +## `remove_from_library` + +DELETE `/2/media/library/{media_key}` + +**Remove Media Library Item** + +Removes an item from the authenticated user's Media Library. Posts scheduled through the API that have not yet been published and still use the media are cancelled. Published posts and the underlying media are not affected. + +```python +import os +from xdk import Client +from xdk.media.models import RemoveFromLibraryRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.remove_from_library(media_key="3_1895000000000000000", body=RemoveFromLibraryRequest()) +print(response) +``` + +### Parameters + + + The media key of the library item to remove. + + + + Request payload. + + +**Returns:** `RemoveFromLibraryResponse` + +--- + +## `update_in_library` + +PUT `/2/media/library/{media_key}` + +**Update Media Library Item** + +Updates the library metadata of an item in the authenticated user's Media Library. Only the fields sent are changed; the others keep their values. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```python +import os +from xdk import Client +from xdk.media.models import UpdateInLibraryRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.update_in_library( + media_key="3_1895000000000000000", + body=UpdateInLibraryRequest(name="My List") +) +print(response) +``` + +### Parameters + + + The media key of the library item to update. + + + + Request payload. + + +**Returns:** `UpdateInLibraryResponse` + +--- + +## `upload` + +POST `/2/media/upload` + +**Upload Media** + +Uploads a media file in one request and returns its id. Send the file base64-encoded in media (raw bytes in multipart bodies). For a Post, set media_category to tweet_image (JPG, PNG, GIF or WEBP, up to 5 MB) or tweet_gif, then pass the returned id in media.media_ids on Create or Edit Post. DM media uses dm_image or dm_gif. For video, use Initialize Media Upload. + +```python +import os +from xdk import Client +from xdk.media.models import UploadRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.media.upload(body=UploadRequest(media="example", media_category="tweet_image")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `UploadResponse` + +--- + diff --git a/xdks/python/reference/clients/news.mdx b/xdks/python/reference/clients/news.mdx new file mode 100644 index 000000000..64443a429 --- /dev/null +++ b/xdks/python/reference/clients/news.mdx @@ -0,0 +1,95 @@ +--- +title: "NewsClient (Python XDK)" +sidebarTitle: "News" +description: "Python XDK NewsClient reference — 2 methods for X API v2 News endpoints." +--- + +Access **News** endpoints via `client.news` (`NewsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get`](#get) | `GET /2/news/{id}` | Standard | Get News Stories by ID | +| [`search`](#search) | `GET /2/news/search` | Standard | Search News | + +## `get` + +GET `/2/news/{id}` + +**Get News Stories by ID** + +Retrieves news story by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.news.get(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of News fields to display. + + + + +**Returns:** `GetResponse` + +--- + +## `search` + +GET `/2/news/search` + +**Search News** + +Retrieves a list of News stories matching the specified search query. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.news.search(query="from:XDevelopers") +print(response) +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `max_age_hours` (query parameter). + + + + A comma separated list of News fields to display. + + + + +**Returns:** `SearchResponse` + +--- + diff --git a/xdks/python/reference/clients/posts.mdx b/xdks/python/reference/clients/posts.mdx new file mode 100644 index 000000000..6fc31ee6e --- /dev/null +++ b/xdks/python/reference/clients/posts.mdx @@ -0,0 +1,925 @@ +--- +title: "PostsClient (Python XDK)" +sidebarTitle: "Posts" +description: "Python XDK PostsClient reference — 17 methods for X API v2 Posts endpoints." +--- + +Access **Posts** endpoints via `client.posts` (`PostsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/tweets` | Standard | Create or Edit Post | +| [`create_post_draft`](#create_post_draft) | `POST /2/posts/drafts` | Standard | Create Post Draft | +| [`delete`](#delete) | `DELETE /2/tweets/{id}` | Standard | Delete Post | +| [`delete_post_draft`](#delete_post_draft) | `DELETE /2/posts/drafts/{id}` | Standard | Delete Post Draft | +| [`get_analytics`](#get_analytics) | `GET /2/tweets/analytics` | Standard | Get Post Analytics | +| [`get_by_id`](#get_by_id) | `GET /2/tweets/{id}` | Standard | Get Post by ID | +| [`get_by_ids`](#get_by_ids) | `GET /2/tweets` | Standard | Get Posts by IDs | +| [`get_counts_all`](#get_counts_all) | `GET /2/tweets/counts/all` | Paginated | Get Count of All Posts | +| [`get_counts_recent`](#get_counts_recent) | `GET /2/tweets/counts/recent` | Paginated | Get Count of Recent Posts | +| [`get_liking_users`](#get_liking_users) | `GET /2/tweets/{id}/liking_users` | Paginated | Get Liking Users | +| [`get_post_drafts`](#get_post_drafts) | `GET /2/posts/drafts` | Paginated | Get Post Drafts | +| [`get_quoted`](#get_quoted) | `GET /2/tweets/{id}/quote_tweets` | Paginated | Get Quoted Posts | +| [`get_reposted_by`](#get_reposted_by) | `GET /2/tweets/{id}/retweeted_by` | Paginated | Get Reposted By | +| [`get_reposts`](#get_reposts) | `GET /2/tweets/{id}/retweets` | Paginated | Get Reposts | +| [`hide_reply`](#hide_reply) | `PUT /2/tweets/{tweet_id}/hidden` | Standard | Hide Reply | +| [`search_all`](#search_all) | `GET /2/tweets/search/all` | Paginated | Search All Posts | +| [`search_recent`](#search_recent) | `GET /2/tweets/search/recent` | Paginated | Search Recent Posts | + +## `create` + +POST `/2/tweets` + +**Create or Edit Post** + +Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Media in media.media_ids is attached in the order given; get the ids by uploading each image with Upload Media, or a video with Initialize Media Upload. Supports paid partnership disclosure via the paid_partnership field. To share a clip of another Post's video, set clip to that Post's id and a range of 5 to 60 seconds. + +```python +import os +from xdk import Client +from xdk.posts.models import CreateRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.posts.create(body=CreateRequest(text="Hello from XDK!")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateResponse` + +--- + +## `create_post_draft` + +POST `/2/posts/drafts` + +**Create Post Draft** + +Saves a Post draft to the authenticated user's X account without publishing it. Takes the body of Create or Edit Post, of which a draft stores text, media with tagged users, a reply and the AI and paid partnership disclosures. Any other field that is set is a 400 that names it. + +```python +import os +from xdk import Client +from xdk.posts.models import CreatePostDraftRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.posts.create_post_draft(body=CreatePostDraftRequest(text="Hello from XDK!")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreatePostDraftResponse` + +--- + +## `delete` + +DELETE `/2/tweets/{id}` + +**Delete Post** + +Deletes a specific Post by its ID, if owned by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.posts.delete(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `DeleteResponse` + +--- + +## `delete_post_draft` + +DELETE `/2/posts/drafts/{id}` + +**Delete Post Draft** + +Deletes one of the authenticated user's Post drafts by its ID. The whole draft is deleted, including any part Get Post Drafts does not list, and cannot be restored. An ID that is not one of the user's drafts also returns deleted: true. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.posts.delete_post_draft(id="1895000000000000000") +print(response) +``` + +### Parameters + + + The ID of the draft to delete. + + +**Returns:** `DeletePostDraftResponse` + +--- + +## `get_analytics` + +GET `/2/tweets/analytics` + +**Get Post Analytics** + +Retrieves analytics data for specified Posts within a defined time range. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.posts.get_analytics( + ids=["1895000000000000000"], + start_time="2026-01-01T00:00:00Z", + end_time="2026-01-02T00:00:00Z" +) +print(response) +``` + +### Parameters + + + `ids` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + + + A comma separated list of Analytics fields to display. + + + + +**Returns:** `GetAnalyticsResponse` + +--- + +## `get_by_id` + +GET `/2/tweets/{id}` + +**Get Post by ID** + +Retrieves details of a specific Post by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.posts.get_by_id(id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `GetByIdResponse` + +--- + +## `get_by_ids` + +GET `/2/tweets` + +**Get Posts by IDs** + +Retrieves details of multiple Posts by their IDs. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.posts.get_by_ids(ids=["1895000000000000000"]) +print(response) +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `GetByIdsResponse` + +--- + +## `get_counts_all` + +GET `/2/tweets/counts/all` Paginated + +**Get Count of All Posts** + +Retrieves the count of Posts matching a search query from the full archive. + +At most one of `pagination_token`, `next_token` may be provided. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.get_counts_all(query="from:XDevelopers"): + print(page.data) +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Iterator[GetCountsAllResponse]` + +--- + +## `get_counts_recent` + +GET `/2/tweets/counts/recent` Paginated + +**Get Count of Recent Posts** + +Retrieves the count of Posts from the last 7 days matching a search query. + +At most one of `pagination_token`, `next_token` may be provided. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.get_counts_recent(query="from:XDevelopers"): + print(page.data) +``` + +### Parameters + + + `query` (query parameter). + + + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Iterator[GetCountsRecentResponse]` + +--- + +## `get_liking_users` + +GET `/2/tweets/{id}/liking_users` Paginated + +**Get Liking Users** + +Retrieves a list of Users who liked a specific Post by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.posts.get_liking_users(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetLikingUsersResponse]` + +--- + +## `get_post_drafts` + +GET `/2/posts/drafts` Paginated + +**Get Post Drafts** + +Returns the authenticated user's Post drafts, newest first, in the fields of the Create or Edit Post body. thread holds the Posts after the first. A draft with unsupported_content is not listed in full: do not publish it from this list or delete it unless the user asks. Needs the tweet.write scope. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.posts.get_post_drafts(): + print(page.data) +``` + +### Parameters + + + + + The maximum number of drafts to return. + + + + The meta.next_token of the previous page. + + + + +**Returns:** `Iterator[GetPostDraftsResponse]` + +--- + +## `get_quoted` + +GET `/2/tweets/{id}/quote_tweets` Paginated + +**Get Quoted Posts** + +Retrieves a list of Posts that quote a specific Post by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.get_quoted(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetQuotedResponse]` + +--- + +## `get_reposted_by` + +GET `/2/tweets/{id}/retweeted_by` Paginated + +**Get Reposted By** + +Retrieves a list of Users who reposted a specific Post by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.get_reposted_by(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetRepostedByResponse]` + +--- + +## `get_reposts` + +GET `/2/tweets/{id}/retweets` Paginated + +**Get Reposts** + +Retrieves a list of Posts that repost a specific Post by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.get_reposts(id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetRepostsResponse]` + +--- + +## `hide_reply` + +PUT `/2/tweets/{tweet_id}/hidden` + +**Hide Reply** + +Hides or unhides a reply to a conversation owned by the authenticated user. + +```python +import os +from xdk import Client +from xdk.posts.models import HideReplyRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.posts.hide_reply(tweet_id="1895000000000000000", body=HideReplyRequest(hidden=True)) +print(response) +``` + +### Parameters + + + `tweet_id` (path parameter). + + + + Request payload. + + +**Returns:** `HideReplyResponse` + +--- + +## `search_all` + +GET `/2/tweets/search/all` Paginated + +**Search All Posts** + +Retrieves Posts from the full archive matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.search_all(query="from:XDevelopers"): + print(page.data) +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `sort_order` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[SearchAllResponse]` + +--- + +## `search_recent` + +GET `/2/tweets/search/recent` Paginated + +**Search Recent Posts** + +Retrieves Posts from the last 7 days matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.posts.search_recent(query="from:XDevelopers"): + print(page.data) +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `sort_order` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[SearchRecentResponse]` + +--- + diff --git a/xdks/python/reference/clients/spaces.mdx b/xdks/python/reference/clients/spaces.mdx new file mode 100644 index 000000000..fe92a0039 --- /dev/null +++ b/xdks/python/reference/clients/spaces.mdx @@ -0,0 +1,335 @@ +--- +title: "SpacesClient (Python XDK)" +sidebarTitle: "Spaces" +description: "Python XDK SpacesClient reference — 6 methods for X API v2 Spaces endpoints." +--- + +Access **Spaces** endpoints via `client.spaces` (`SpacesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get_buyers`](#get_buyers) | `GET /2/spaces/{id}/buyers` | Paginated | Get Space Ticket Buyers | +| [`get_by_creator_ids`](#get_by_creator_ids) | `GET /2/spaces/by/creator_ids` | Standard | Get Spaces by Creator IDs | +| [`get_by_id`](#get_by_id) | `GET /2/spaces/{id}` | Standard | Get Space by ID | +| [`get_by_ids`](#get_by_ids) | `GET /2/spaces` | Standard | Get Spaces by IDs | +| [`get_posts`](#get_posts) | `GET /2/spaces/{id}/tweets` | Paginated | Get Space Posts | +| [`search`](#search) | `GET /2/spaces/search` | Standard | Search Spaces | + +## `get_buyers` + +GET `/2/spaces/{id}/buyers` Paginated + +**Get Space Ticket Buyers** + +Retrieves a list of Users who purchased tickets to a specific Space by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.spaces.get_buyers(id="1YqKDqWLPPlGV"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetBuyersResponse]` + +--- + +## `get_by_creator_ids` + +GET `/2/spaces/by/creator_ids` + +**Get Spaces by Creator IDs** + +Retrieves details of Spaces created by specified User IDs. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.spaces.get_by_creator_ids(user_ids=["2244994945"]) +print(response) +``` + +### Parameters + + + `user_ids` (query parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `GetByCreatorIdsResponse` + +--- + +## `get_by_id` + +GET `/2/spaces/{id}` + +**Get Space by ID** + +Retrieves details of a specific Space by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.spaces.get_by_id(id="1YqKDqWLPPlGV") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `GetByIdResponse` + +--- + +## `get_by_ids` + +GET `/2/spaces` + +**Get Spaces by IDs** + +Retrieves details of multiple Spaces by their IDs. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.spaces.get_by_ids(ids=["1YqKDqWLPPlGV"]) +print(response) +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `GetByIdsResponse` + +--- + +## `get_posts` + +GET `/2/spaces/{id}/tweets` Paginated + +**Get Space Posts** + +Retrieves a list of Posts shared in a specific Space by its ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.spaces.get_posts(id="1YqKDqWLPPlGV"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetPostsResponse]` + +--- + +## `search` + +GET `/2/spaces/search` + +**Search Spaces** + +Retrieves a list of Spaces matching the specified search query. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.spaces.search(query="from:XDevelopers") +print(response) +``` + +### Parameters + + + `query` (query parameter). + + + + + + `state` (query parameter). + + + + `max_results` (query parameter). + + + + A comma separated list of Space fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Topic fields to display. + + + + +**Returns:** `SearchResponse` + +--- + diff --git a/xdks/python/reference/clients/stream.mdx b/xdks/python/reference/clients/stream.mdx new file mode 100644 index 000000000..5e51484bf --- /dev/null +++ b/xdks/python/reference/clients/stream.mdx @@ -0,0 +1,1008 @@ +--- +title: "StreamClient (Python XDK)" +sidebarTitle: "Stream" +description: "Python XDK StreamClient reference — 18 methods for X API v2 Stream endpoints." +--- + +Access **Stream** endpoints via `client.stream` (`StreamClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`activity`](#activity) | `GET /2/activity/stream` | Streaming | Activity Stream | +| [`get_rule_counts`](#get_rule_counts) | `GET /2/tweets/search/stream/rules/counts` | Standard | Get Stream Rule Counts | +| [`get_rules`](#get_rules) | `GET /2/tweets/search/stream/rules` | Paginated | Get Stream Rules | +| [`labels_compliance`](#labels_compliance) | `GET /2/tweets/label/stream` | Streaming | Stream Post Labels | +| [`likes_compliance`](#likes_compliance) | `GET /2/likes/compliance/stream` | Streaming | Stream Likes Compliance Data | +| [`likes_firehose`](#likes_firehose) | `GET /2/likes/firehose/stream` | Streaming | Stream All Likes | +| [`likes_sample10`](#likes_sample10) | `GET /2/likes/sample10/stream` | Streaming | Stream Sampled Likes | +| [`posts`](#posts) | `GET /2/tweets/search/stream` | Streaming | Stream Filtered Posts | +| [`posts_compliance`](#posts_compliance) | `GET /2/tweets/compliance/stream` | Streaming | Stream Posts Compliance Data | +| [`posts_firehose`](#posts_firehose) | `GET /2/tweets/firehose/stream` | Streaming | Stream All Posts | +| [`posts_firehose_en`](#posts_firehose_en) | `GET /2/tweets/firehose/stream/lang/en` | Streaming | Stream English Posts | +| [`posts_firehose_ja`](#posts_firehose_ja) | `GET /2/tweets/firehose/stream/lang/ja` | Streaming | Stream Japanese Posts | +| [`posts_firehose_ko`](#posts_firehose_ko) | `GET /2/tweets/firehose/stream/lang/ko` | Streaming | Stream Korean Posts | +| [`posts_firehose_pt`](#posts_firehose_pt) | `GET /2/tweets/firehose/stream/lang/pt` | Streaming | Stream Portuguese Posts | +| [`posts_sample`](#posts_sample) | `GET /2/tweets/sample/stream` | Streaming | Stream Sampled Posts | +| [`posts_sample10`](#posts_sample10) | `GET /2/tweets/sample10/stream` | Streaming | Stream 10% Sampled Posts | +| [`update_rules`](#update_rules) | `POST /2/tweets/search/stream/rules` | Standard | Update Stream Rules | +| [`users_compliance`](#users_compliance) | `GET /2/users/compliance/stream` | Streaming | Stream Users Compliance Data | + +## `activity` + +GET `/2/activity/stream` Streaming + +**Activity Stream** + +Stream of X Activities + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.activity(): + print(event) +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the activities will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the activities will be provided. + + + + +**Returns:** `Generator[ActivityResponse, None, None]` + +--- + +## `get_rule_counts` + +GET `/2/tweets/search/stream/rules/counts` + +**Get Stream Rule Counts** + +Retrieves the count of rules in the active rule set for the filtered stream. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.stream.get_rule_counts() +print(response) +``` + +### Parameters + + + + + `rules_count.fields` (query parameter). + + + + +**Returns:** `GetRuleCountsResponse` + +--- + +## `get_rules` + +GET `/2/tweets/search/stream/rules` Paginated + +**Get Stream Rules** + +Returns the active filtered-stream rules for the authenticated app. Provide `ids` to fetch specific rules; omit it to list all rules. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.stream.get_rules(): + print(page.data) +``` + +### Parameters + + + + + `ids` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 8 bytes. + + + + +**Returns:** `Iterator[GetRulesResponse]` + +--- + +## `labels_compliance` + +GET `/2/tweets/label/stream` Streaming + +**Stream Post Labels** + +Streams all labeling events applied to Posts. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.labels_compliance(): + print(event) +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. + + + + +**Returns:** `Generator[LabelsComplianceResponse, None, None]` + +--- + +## `likes_compliance` + +GET `/2/likes/compliance/stream` Streaming + +**Stream Likes Compliance Data** + +Streams all compliance data related to Likes for Users. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.likes_compliance(): + print(event) +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided. + + + + +**Returns:** `Generator[LikesComplianceResponse, None, None]` + +--- + +## `likes_firehose` + +GET `/2/likes/firehose/stream` Streaming + +**Stream All Likes** + +Streams all public Likes in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.likes_firehose(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of LikeWithTweetAuthor fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Tweet fields to display. + + + + +**Returns:** `Generator[LikesFirehoseResponse, None, None]` + +--- + +## `likes_sample10` + +GET `/2/likes/sample10/stream` Streaming + +**Stream Sampled Likes** + +Streams a 10% sample of public Likes in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.likes_sample10(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of LikeWithTweetAuthor fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Tweet fields to display. + + + + +**Returns:** `Generator[LikesSample10Response, None, None]` + +--- + +## `posts` + +GET `/2/tweets/search/stream` Streaming + +**Stream Filtered Posts** + +Streams Posts in real-time matching the active rule set. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts(): + print(event) +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Generator[PostsResponse, None, None]` + +--- + +## `posts_compliance` + +GET `/2/tweets/compliance/stream` Streaming + +**Stream Posts Compliance Data** + +Streams all compliance data related to Posts. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_compliance(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post Compliance events will be provided. + + + + +**Returns:** `Generator[PostsComplianceResponse, None, None]` + +--- + +## `posts_firehose` + +GET `/2/tweets/firehose/stream` Streaming + +**Stream All Posts** + +Streams all public Posts in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_firehose(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Generator[PostsFirehoseResponse, None, None]` + +--- + +## `posts_firehose_en` + +GET `/2/tweets/firehose/stream/lang/en` Streaming + +**Stream English Posts** + +Streams all public English-language Posts in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_firehose_en(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Generator[PostsFirehoseEnResponse, None, None]` + +--- + +## `posts_firehose_ja` + +GET `/2/tweets/firehose/stream/lang/ja` Streaming + +**Stream Japanese Posts** + +Streams all public Japanese-language Posts in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_firehose_ja(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Generator[PostsFirehoseJaResponse, None, None]` + +--- + +## `posts_firehose_ko` + +GET `/2/tweets/firehose/stream/lang/ko` Streaming + +**Stream Korean Posts** + +Streams all public Korean-language Posts in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_firehose_ko(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Generator[PostsFirehoseKoResponse, None, None]` + +--- + +## `posts_firehose_pt` + +GET `/2/tweets/firehose/stream/lang/pt` Streaming + +**Stream Portuguese Posts** + +Streams all public Portuguese-language Posts in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_firehose_pt(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Generator[PostsFirehosePtResponse, None, None]` + +--- + +## `posts_sample` + +GET `/2/tweets/sample/stream` Streaming + +**Stream Sampled Posts** + +Streams a 1% sample of public Posts in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_sample(): + print(event) +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Generator[PostsSampleResponse, None, None]` + +--- + +## `posts_sample10` + +GET `/2/tweets/sample10/stream` Streaming + +**Stream 10% Sampled Posts** + +Streams a 10% sample of public Posts in real-time. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.posts_sample10(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + A comma separated list of Tweet fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Generator[PostsSample10Response, None, None]` + +--- + +## `update_rules` + +POST `/2/tweets/search/stream/rules` + +**Update Stream Rules** + +Adds or deletes rules from the active rule set for the filtered stream. Exactly one of `add`, `delete`, or `?delete_all=true` must be specified. Use `?dry_run=true` to validate without committing. + +```python +import os +from xdk import Client +from xdk.stream.models import UpdateRulesRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.stream.update_rules(body=UpdateRulesRequest(add=[{"value": "from:XDevelopers"}])) +print(response) +``` + +### Parameters + + + Request payload. + + + + + + `dry_run` (query parameter). + + + + `delete_all` (query parameter). + + + + +**Returns:** `UpdateRulesResponse` + +--- + +## `users_compliance` + +GET `/2/users/compliance/stream` Streaming + +**Stream Users Compliance Data** + +Streams all compliance data related to Users. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for event in client.stream.users_compliance(partition=1): + print(event) +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided. + + + + +**Returns:** `Generator[UsersComplianceResponse, None, None]` + +--- + diff --git a/xdks/python/reference/clients/trends.mdx b/xdks/python/reference/clients/trends.mdx new file mode 100644 index 000000000..d920a6062 --- /dev/null +++ b/xdks/python/reference/clients/trends.mdx @@ -0,0 +1,120 @@ +--- +title: "TrendsClient (Python XDK)" +sidebarTitle: "Trends" +description: "Python XDK TrendsClient reference — 3 methods for X API v2 Trends endpoints." +--- + +Access **Trends** endpoints via `client.trends` (`TrendsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get_by_woeid`](#get_by_woeid) | `GET /2/trends/by/woeid/{woeid}` | Standard | Get Trends by WOEID | +| [`get_locations`](#get_locations) | `GET /2/trends/locations` | Standard | Get Trend Locations | +| [`get_personalized`](#get_personalized) | `GET /2/users/personalized_trends` | Standard | Get Personalized Trends | + +## `get_by_woeid` + +GET `/2/trends/by/woeid/{woeid}` + +**Get Trends by WOEID** + +Retrieves trending topics for a specific location identified by its WOEID. `meta.location` describes that location: its `woeid` and `name`, and when they are known its `country`, `country_code`, `place_type` (`town`, `country` or `supername`) and `parent_id`, the WOEID of the place that contains it. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.trends.get_by_woeid(woeid=1) +print(response) +``` + +### Parameters + + + `woeid` (path parameter). + + + + + + `max_trends` (query parameter). + + + + A comma separated list of Trend fields to display. + + + + +**Returns:** `GetByWoeidResponse` + +--- + +## `get_locations` + +GET `/2/trends/locations` + +**Get Trend Locations** + +Retrieves every location that has trends. Each location has a WOEID to pass to `GET /2/trends/by/woeid/{woeid}`. The list is short and is returned whole, so the route takes no paging parameters. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.trends.get_locations() +print(response) +``` + +### Parameters + + + + + A comma separated list of TrendLocation fields to display. + + + + +**Returns:** `GetLocationsResponse` + +--- + +## `get_personalized` + +GET `/2/users/personalized_trends` + +**Get Personalized Trends** + +Retrieves personalized trending topics for the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.trends.get_personalized() +print(response) +``` + +### Parameters + + + + + A comma separated list of PersonalizedTrend fields to display. + + + + +**Returns:** `GetPersonalizedResponse` + +--- + diff --git a/xdks/python/reference/clients/usage.mdx b/xdks/python/reference/clients/usage.mdx new file mode 100644 index 000000000..734379e79 --- /dev/null +++ b/xdks/python/reference/clients/usage.mdx @@ -0,0 +1,73 @@ +--- +title: "UsageClient (Python XDK)" +sidebarTitle: "Usage" +description: "Python XDK UsageClient reference — 2 methods for X API v2 Usage endpoints." +--- + +Access **Usage** endpoints via `client.usage` (`UsageClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get`](#get) | `GET /2/usage/tweets` | Standard | Get Usage | +| [`get_credits`](#get_credits) | `GET /2/usage/credits` | Standard | Get Usage Credits | + +## `get` + +GET `/2/usage/tweets` + +**Get Usage** + +Retrieves usage statistics for Posts over a specified number of days. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.usage.get() +print(response) +``` + +### Parameters + + + + + `days` (query parameter). + + + + A comma separated list of Usage fields to display. + + + + +**Returns:** `GetResponse` + +--- + +## `get_credits` + +GET `/2/usage/credits` + +**Get Usage Credits** + +Returns the payer's developer-platform credit balance in USD. total_balance is max(0, prepaid_balance + free_balance); prepaid_balance may be negative. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.usage.get_credits() +print(response) +``` + +**Returns:** `GetCreditsResponse` + +--- + diff --git a/xdks/python/reference/clients/users.mdx b/xdks/python/reference/clients/users.mdx new file mode 100644 index 000000000..a2eb7219e --- /dev/null +++ b/xdks/python/reference/clients/users.mdx @@ -0,0 +1,2106 @@ +--- +title: "UsersClient (Python XDK)" +sidebarTitle: "Users" +description: "Python XDK UsersClient reference — 46 methods for X API v2 Users endpoints." +--- + +Access **Users** endpoints via `client.users` (`UsersClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`block_dms`](#block_dms) | `POST /2/users/{id}/dm/block` | Standard | Block DMs | +| [`create_bookmark`](#create_bookmark) | `POST /2/users/{id}/bookmarks` | Standard | Create Bookmark | +| [`create_bookmark_folder`](#create_bookmark_folder) | `POST /2/users/{id}/bookmarks/folders` | Standard | Create Bookmark Folder | +| [`delete_bookmark`](#delete_bookmark) | `DELETE /2/users/{id}/bookmarks/{tweet_id}` | Standard | Delete Bookmark | +| [`follow_list`](#follow_list) | `POST /2/users/{id}/followed_lists` | Standard | Follow List | +| [`follow_user`](#follow_user) | `POST /2/users/{id}/following` | Standard | Follow User | +| [`get_affiliates`](#get_affiliates) | `GET /2/users/{id}/affiliates` | Paginated | Get Affiliates | +| [`get_blocking`](#get_blocking) | `GET /2/users/{id}/blocking` | Paginated | Get Blocked Users | +| [`get_bookmark_folders`](#get_bookmark_folders) | `GET /2/users/{id}/bookmarks/folders` | Paginated | Get Bookmark Folders | +| [`get_bookmarks`](#get_bookmarks) | `GET /2/users/{id}/bookmarks` | Paginated | Get Bookmarks | +| [`get_bookmarks_by_folder_id`](#get_bookmarks_by_folder_id) | `GET /2/users/{id}/bookmarks/folders/{folder_id}` | Paginated | Get Bookmarks by Folder ID | +| [`get_by_id`](#get_by_id) | `GET /2/users/{id}` | Standard | Get User by ID | +| [`get_by_ids`](#get_by_ids) | `GET /2/users` | Standard | Get Users by IDs | +| [`get_by_username`](#get_by_username) | `GET /2/users/by/username/{username}` | Standard | Get User by Username | +| [`get_by_usernames`](#get_by_usernames) | `GET /2/users/by` | Standard | Get Users by Usernames | +| [`get_followed_lists`](#get_followed_lists) | `GET /2/users/{id}/followed_lists` | Paginated | Get Followed Lists | +| [`get_followers`](#get_followers) | `GET /2/users/{id}/followers` | Paginated | Get Followers | +| [`get_following`](#get_following) | `GET /2/users/{id}/following` | Paginated | Get Following | +| [`get_liked_posts`](#get_liked_posts) | `GET /2/users/{id}/liked_tweets` | Paginated | Get Liked Posts | +| [`get_list_memberships`](#get_list_memberships) | `GET /2/users/{id}/list_memberships` | Paginated | Get List Memberships | +| [`get_me`](#get_me) | `GET /2/users/me` | Standard | Get My User | +| [`get_me_followers`](#get_me_followers) | `GET /2/users/me/followers` | Paginated | Get the Authenticated User's Followers | +| [`get_me_following`](#get_me_following) | `GET /2/users/me/following` | Paginated | Get the Users the Authenticated User Follows | +| [`get_mentions`](#get_mentions) | `GET /2/users/{id}/mentions` | Paginated | Get Mentions | +| [`get_muting`](#get_muting) | `GET /2/users/{id}/muting` | Paginated | Get Muting | +| [`get_owned_lists`](#get_owned_lists) | `GET /2/users/{id}/owned_lists` | Paginated | Get Owned Lists | +| [`get_pinned_lists`](#get_pinned_lists) | `GET /2/users/{id}/pinned_lists` | Standard | Get Pinned Lists | +| [`get_posts`](#get_posts) | `GET /2/users/{id}/tweets` | Paginated | Get Posts | +| [`get_public_key`](#get_public_key) | `GET /2/users/{id}/public_keys` | Standard | Get User Public Keys | +| [`get_public_keys`](#get_public_keys) | `GET /2/users/public_keys` | Standard | Get Public Keys for Multiple Users | +| [`get_reposts_of_me`](#get_reposts_of_me) | `GET /2/users/reposts_of_me` | Paginated | Get Reposts of Me | +| [`get_timeline`](#get_timeline) | `GET /2/users/{id}/timelines/reverse_chronological` | Paginated | Get Timeline | +| [`id_block`](#id_block) | `POST /2/users/{id}/blocking` | Standard | Block User | +| [`id_unblock`](#id_unblock) | `DELETE /2/users/{source_user_id}/blocking/{target_user_id}` | Standard | Unblock User | +| [`like_post`](#like_post) | `POST /2/users/{id}/likes` | Standard | Like Post | +| [`mute_user`](#mute_user) | `POST /2/users/{id}/muting` | Standard | Mute User | +| [`pin_list`](#pin_list) | `POST /2/users/{id}/pinned_lists` | Standard | Pin List | +| [`repost_post`](#repost_post) | `POST /2/users/{id}/retweets` | Standard | Repost Post | +| [`search`](#search) | `GET /2/users/search` | Paginated | Search Users | +| [`unblock_dms`](#unblock_dms) | `POST /2/users/{id}/dm/unblock` | Standard | Unblock DMs | +| [`unfollow_list`](#unfollow_list) | `DELETE /2/users/{id}/followed_lists/{list_id}` | Standard | Unfollow List | +| [`unfollow_user`](#unfollow_user) | `DELETE /2/users/{source_user_id}/following/{target_user_id}` | Standard | Unfollow User | +| [`unlike_post`](#unlike_post) | `DELETE /2/users/{id}/likes/{tweet_id}` | Standard | Unlike Post | +| [`unmute_user`](#unmute_user) | `DELETE /2/users/{source_user_id}/muting/{target_user_id}` | Standard | Unmute User | +| [`unpin_list`](#unpin_list) | `DELETE /2/users/{id}/pinned_lists/{list_id}` | Standard | Unpin List | +| [`unrepost_post`](#unrepost_post) | `DELETE /2/users/{id}/retweets/{source_tweet_id}` | Standard | Unrepost Post | + +## `block_dms` + +POST `/2/users/{id}/dm/block` + +**Block DMs** + +Blocks direct messages to or from a specific User by their ID for the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.block_dms(id="2244994945") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `BlockDmsResponse` + +--- + +## `create_bookmark` + +POST `/2/users/{id}/bookmarks` + +**Create Bookmark** + +Adds one or more Posts to the authenticated user's Bookmarks. Supply `tweet_id` for a single Post, or `tweet_ids` (at most 25) to bookmark several in one request. Optional `folder_id` applies to every Post in the request. Billing and rate limits still apply per HTTP request. + +```python +import os +from xdk import Client +from xdk.users.models import CreateBookmarkRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.create_bookmark( + id="2244994945", + body=CreateBookmarkRequest(tweet_id="1895000000000000000") +) +print(response) +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + At least one of `tweet_id`, `tweet_ids` is required. + + +**Returns:** `CreateBookmarkResponse` + +--- + +## `create_bookmark_folder` + +POST `/2/users/{id}/bookmarks/folders` + +**Create Bookmark Folder** + +Creates a new Bookmark folder for the authenticated user. + +```python +import os +from xdk import Client +from xdk.users.models import CreateBookmarkFolderRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.create_bookmark_folder(id="2244994945", body=CreateBookmarkFolderRequest(name="My List")) +print(response) +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + Request payload. + + +**Returns:** `CreateBookmarkFolderResponse` + +--- + +## `delete_bookmark` + +DELETE `/2/users/{id}/bookmarks/{tweet_id}` + +**Delete Bookmark** + +Removes a Post from the authenticated user's Bookmarks by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.delete_bookmark(id="2244994945", tweet_id="1895000000000000000") +print(response) +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `tweet_id` (path parameter). + + +**Returns:** `DeleteBookmarkResponse` + +--- + +## `follow_list` + +POST `/2/users/{id}/followed_lists` + +**Follow List** + +Causes the authenticated user to follow a specific List by its ID. + +```python +import os +from xdk import Client +from xdk.users.models import FollowListRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.follow_list( + id="2244994945", + body=FollowListRequest(list_id="1450000000000000000") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `FollowListResponse` + +--- + +## `follow_user` + +POST `/2/users/{id}/following` + +**Follow User** + +Causes the authenticated user to follow a specific User by their ID. + +```python +import os +from xdk import Client +from xdk.users.models import FollowUserRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.follow_user(id="2244994945", body=FollowUserRequest(target_user_id="2244994945")) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `FollowUserResponse` + +--- + +## `get_affiliates` + +GET `/2/users/{id}/affiliates` Paginated + +**Get Affiliates** + +Retrieves a list of Users who are affiliated with a specific organization User by their ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_affiliates(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetAffiliatesResponse]` + +--- + +## `get_blocking` + +GET `/2/users/{id}/blocking` Paginated + +**Get Blocked Users** + +Returns the Users that the given User is blocking. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_blocking(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetBlockingResponse]` + +--- + +## `get_bookmark_folders` + +GET `/2/users/{id}/bookmarks/folders` Paginated + +**Get Bookmark Folders** + +Retrieves a list of Bookmark folders created by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_bookmark_folders(id="2244994945"): + print(page.data) +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Iterator[GetBookmarkFoldersResponse]` + +--- + +## `get_bookmarks` + +GET `/2/users/{id}/bookmarks` Paginated + +**Get Bookmarks** + +Retrieves a list of Posts bookmarked by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_bookmarks(id="2244994945"): + print(page.data) +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetBookmarksResponse]` + +--- + +## `get_bookmarks_by_folder_id` + +GET `/2/users/{id}/bookmarks/folders/{folder_id}` Paginated + +**Get Bookmarks by Folder ID** + +Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_bookmarks_by_folder_id(id="2244994945", folder_id="1895000000000000000"): + print(page.data) +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `folder_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Iterator[GetBookmarksByFolderIdResponse]` + +--- + +## `get_by_id` + +GET `/2/users/{id}` + +**Get User by ID** + +Retrieves details of a specific User by their ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.users.get_by_id(id="2244994945") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `GetByIdResponse` + +--- + +## `get_by_ids` + +GET `/2/users` + +**Get Users by IDs** + +Retrieves details of multiple Users by their IDs. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.users.get_by_ids(ids=["2244994945"]) +print(response) +``` + +### Parameters + + + `ids` (query parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `GetByIdsResponse` + +--- + +## `get_by_username` + +GET `/2/users/by/username/{username}` + +**Get User by Username** + +Retrieves details of a specific User by their username. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.users.get_by_username(username="XDevelopers") +print(response) +``` + +### Parameters + + + `username` (path parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `GetByUsernameResponse` + +--- + +## `get_by_usernames` + +GET `/2/users/by` + +**Get Users by Usernames** + +Retrieves details of multiple Users by their usernames. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.users.get_by_usernames(usernames=["XDevelopers"]) +print(response) +``` + +### Parameters + + + `usernames` (query parameter). + + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `GetByUsernamesResponse` + +--- + +## `get_followed_lists` + +GET `/2/users/{id}/followed_lists` Paginated + +**Get Followed Lists** + +Retrieves a list of Lists followed by a specific User by their ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_followed_lists(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Iterator[GetFollowedListsResponse]` + +--- + +## `get_followers` + +GET `/2/users/{id}/followers` Paginated + +**Get Followers** + +Retrieves a list of Users who follow a specific User by their ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_followers(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetFollowersResponse]` + +--- + +## `get_following` + +GET `/2/users/{id}/following` Paginated + +**Get Following** + +Retrieves a list of Users followed by a specific User by their ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_following(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetFollowingResponse]` + +--- + +## `get_liked_posts` + +GET `/2/users/{id}/liked_tweets` Paginated + +**Get Liked Posts** + +Retrieves a list of Posts liked by a specific User by their ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_liked_posts(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetLikedPostsResponse]` + +--- + +## `get_list_memberships` + +GET `/2/users/{id}/list_memberships` Paginated + +**Get List Memberships** + +Retrieves a list of Lists that a specific User is a member of by their ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_list_memberships(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Iterator[GetListMembershipsResponse]` + +--- + +## `get_me` + +GET `/2/users/me` + +**Get My User** + +Retrieves details of the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.get_me() +print(response) +``` + +### Parameters + + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `GetMeResponse` + +--- + +## `get_me_followers` + +GET `/2/users/me/followers` Paginated + +**Get the Authenticated User's Followers** + +Returns the Users who follow the authenticated user. Same results as `GET /2/users/{id}/followers` with your own user ID, without looking it up. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_me_followers(): + print(page.data) +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetMeFollowersResponse]` + +--- + +## `get_me_following` + +GET `/2/users/me/following` Paginated + +**Get the Users the Authenticated User Follows** + +Returns the Users the authenticated user follows. Same results as `GET /2/users/{id}/following` with your own user ID, without looking it up. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_me_following(): + print(page.data) +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetMeFollowingResponse]` + +--- + +## `get_mentions` + +GET `/2/users/{id}/mentions` Paginated + +**Get Mentions** + +Retrieves a list of Posts that mention a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_mentions(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetMentionsResponse]` + +--- + +## `get_muting` + +GET `/2/users/{id}/muting` Paginated + +**Get Muting** + +Retrieves a list of Users muted by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_muting(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[GetMutingResponse]` + +--- + +## `get_owned_lists` + +GET `/2/users/{id}/owned_lists` Paginated + +**Get Owned Lists** + +Retrieves a list of Lists owned by a specific User by their ID. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_owned_lists(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `Iterator[GetOwnedListsResponse]` + +--- + +## `get_pinned_lists` + +GET `/2/users/{id}/pinned_lists` + +**Get Pinned Lists** + +Retrieves a list of Lists pinned by the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.get_pinned_lists(id="2244994945") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + + + A comma separated list of List fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + +**Returns:** `GetPinnedListsResponse` + +--- + +## `get_posts` + +GET `/2/users/{id}/tweets` Paginated + +**Get Posts** + +Retrieves a list of Posts authored by a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.get_posts(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetPostsResponse]` + +--- + +## `get_public_key` + +GET `/2/users/{id}/public_keys` + +**Get User Public Keys** + +Returns a user's registered public keys for X Chat encryption. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version and juicebox_config. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.get_public_key(id="2244994945") +print(response) +``` + +### Parameters + + + Numeric user ID, not `me`. For your own keys, use the `id` from Get My User (`GET /2/users/me`). + + + + + + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `GetPublicKeyResponse` + +--- + +## `get_public_keys` + +GET `/2/users/public_keys` + +**Get Public Keys for Multiple Users** + +Returns the public keys that up to 100 users registered for X Chat encryption, looked up by numeric user ID. Each key carries the user_id of the user it belongs to. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version, juicebox_config and user_id. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.get_public_keys(ids=["2244994945"]) +print(response) +``` + +### Parameters + + + Comma-separated numeric user IDs (1-100), not @usernames. + + + + + + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `GetPublicKeysResponse` + +--- + +## `get_reposts_of_me` + +GET `/2/users/reposts_of_me` Paginated + +**Get Reposts of Me** + +Retrieves a list of Posts that repost content from the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_reposts_of_me(): + print(page.data) +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetRepostsOfMeResponse]` + +--- + +## `get_timeline` + +GET `/2/users/{id}/timelines/reverse_chronological` Paginated + +**Get Timeline** + +Retrieves a reverse chronological list of Posts in the authenticated user's Timeline. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +for page in client.users.get_timeline(id="2244994945"): + print(page.data) +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `exclude` (query parameter). + + + + A comma separated list of Post fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of User fields to display. + + + + A comma separated list of Media fields to display. + + + + A comma separated list of Poll fields to display. + + + + A comma separated list of Place fields to display. + + + + +**Returns:** `Iterator[GetTimelineResponse]` + +--- + +## `id_block` + +POST `/2/users/{id}/blocking` + +**Block User** + +Causes the source User to block the target User. A block also removes any follow between the two Users, in both directions, and unblocking does not restore it. Each call blocks one account: block only accounts the authenticated User named or approved, because finding or reviewing accounts is not approval to block them. + +```python +import os +from xdk import Client +from xdk.users.models import IdBlockRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.id_block(id="2244994945", body=IdBlockRequest(target_user_id="2244994945")) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `IdBlockResponse` + +--- + +## `id_unblock` + +DELETE `/2/users/{source_user_id}/blocking/{target_user_id}` + +**Unblock User** + +Causes the source User to unblock the target User. Unblocking does not restore any follow the block removed, so blocking and then unblocking a follower removes them as a follower: do that only for followers the authenticated User approved removing. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.id_unblock(source_user_id="2244994945", target_user_id="2244994945") +print(response) +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `IdUnblockResponse` + +--- + +## `like_post` + +POST `/2/users/{id}/likes` + +**Like Post** + +Causes the authenticated user to like a specific Post by its ID. + +```python +import os +from xdk import Client +from xdk.users.models import LikePostRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.like_post( + id="2244994945", + body=LikePostRequest(tweet_id="1895000000000000000") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `LikePostResponse` + +--- + +## `mute_user` + +POST `/2/users/{id}/muting` + +**Mute User** + +Causes the authenticated user to mute a specific User by their ID. + +```python +import os +from xdk import Client +from xdk.users.models import MuteUserRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.mute_user(id="2244994945", body=MuteUserRequest(target_user_id="2244994945")) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `MuteUserResponse` + +--- + +## `pin_list` + +POST `/2/users/{id}/pinned_lists` + +**Pin List** + +Causes the authenticated user to pin a specific List by its ID. + +```python +import os +from xdk import Client +from xdk.users.models import PinListRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.pin_list(id="2244994945", body=PinListRequest(list_id="1450000000000000000")) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `PinListResponse` + +--- + +## `repost_post` + +POST `/2/users/{id}/retweets` + +**Repost Post** + +Causes the authenticated user to repost a specific Post by its ID. + +```python +import os +from xdk import Client +from xdk.users.models import RepostPostRequest + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.repost_post( + id="2244994945", + body=RepostPostRequest(tweet_id="1895000000000000000") +) +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `RepostPostResponse` + +--- + +## `search` + +GET `/2/users/search` Paginated + +**Search Users** + +Retrieves a list of Users matching a search query. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +for page in client.users.search(query="from:XDevelopers"): + print(page.data) +``` + +### Parameters + + + A name or @username (1-50 chars): letters and digits in any language, spaces, and _ ' . - @ & " + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + + + A comma separated list of User fields to display. + + + + A comma separated list of fields to expand. + + + + A comma separated list of Post fields to display. + + + + +**Returns:** `Iterator[SearchResponse]` + +--- + +## `unblock_dms` + +POST `/2/users/{id}/dm/unblock` + +**Unblock DMs** + +Unblocks direct messages to or from a specific User by their ID for the authenticated user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.unblock_dms(id="2244994945") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `UnblockDmsResponse` + +--- + +## `unfollow_list` + +DELETE `/2/users/{id}/followed_lists/{list_id}` + +**Unfollow List** + +Causes the authenticated user to unfollow a List by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.unfollow_list(id="2244994945", list_id="1450000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `UnfollowListResponse` + +--- + +## `unfollow_user` + +DELETE `/2/users/{source_user_id}/following/{target_user_id}` + +**Unfollow User** + +Causes the authenticated user to unfollow a specific user by their ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.unfollow_user(source_user_id="2244994945", target_user_id="2244994945") +print(response) +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `UnfollowUserResponse` + +--- + +## `unlike_post` + +DELETE `/2/users/{id}/likes/{tweet_id}` + +**Unlike Post** + +Causes the authenticated user to unlike a specific Post by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.unlike_post(id="2244994945", tweet_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `tweet_id` (path parameter). + + +**Returns:** `UnlikePostResponse` + +--- + +## `unmute_user` + +DELETE `/2/users/{source_user_id}/muting/{target_user_id}` + +**Unmute User** + +Causes the authenticated user to unmute the target user. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.unmute_user(source_user_id="2244994945", target_user_id="2244994945") +print(response) +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `UnmuteUserResponse` + +--- + +## `unpin_list` + +DELETE `/2/users/{id}/pinned_lists/{list_id}` + +**Unpin List** + +Causes the authenticated user to unpin a List by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.unpin_list(id="2244994945", list_id="1450000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `UnpinListResponse` + +--- + +## `unrepost_post` + +DELETE `/2/users/{id}/retweets/{source_tweet_id}` + +**Unrepost Post** + +Causes the authenticated user to unrepost a specific Post by its ID. + +```python +import os +from xdk import Client + +client = Client(access_token=os.environ["X_ACCESS_TOKEN"]) + +response = client.users.unrepost_post(id="2244994945", source_tweet_id="1895000000000000000") +print(response) +``` + +### Parameters + + + `id` (path parameter). + + + + `source_tweet_id` (path parameter). + + +**Returns:** `UnrepostPostResponse` + +--- + diff --git a/xdks/python/reference/clients/webhooks.mdx b/xdks/python/reference/clients/webhooks.mdx new file mode 100644 index 000000000..0416fa190 --- /dev/null +++ b/xdks/python/reference/clients/webhooks.mdx @@ -0,0 +1,247 @@ +--- +title: "WebhooksClient (Python XDK)" +sidebarTitle: "Webhooks" +description: "Python XDK WebhooksClient reference — 8 methods for X API v2 Webhooks endpoints." +--- + +Access **Webhooks** endpoints via `client.webhooks` (`WebhooksClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/webhooks` | Standard | Create Webhook | +| [`create_stream_link`](#create_stream_link) | `POST /2/tweets/search/webhooks/{webhook_id}` | Standard | Create Stream Link | +| [`create_webhook_replay_job`](#create_webhook_replay_job) | `POST /2/webhooks/replay` | Standard | Create Replay Job for Webhook | +| [`delete`](#delete) | `DELETE /2/webhooks/{webhook_id}` | Standard | Delete Webhook | +| [`delete_stream_link`](#delete_stream_link) | `DELETE /2/tweets/search/webhooks/{webhook_id}` | Standard | Delete Stream Link | +| [`get`](#get) | `GET /2/webhooks` | Standard | Get Webhook | +| [`get_stream_links`](#get_stream_links) | `GET /2/tweets/search/webhooks` | Standard | Get Stream Links | +| [`validate`](#validate) | `PUT /2/webhooks/{webhook_id}` | Standard | Validate Webhook | + +## `create` + +POST `/2/webhooks` + +**Create Webhook** + +Creates a new webhook configuration. + +```python +import os +from xdk import Client +from xdk.webhooks.models import CreateRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.create(body=CreateRequest(url="https://example.com/webhook")) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateResponse` + +--- + +## `create_stream_link` + +POST `/2/tweets/search/webhooks/{webhook_id}` + +**Create Stream Link** + +Creates a link to deliver FilteredStream events to the given webhook. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.create_stream_link(webhook_id="1234567890") +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `CreateStreamLinkResponse` + +--- + +## `create_webhook_replay_job` + +POST `/2/webhooks/replay` + +**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. + +```python +import os +from xdk import Client +from xdk.webhooks.models import CreateWebhookReplayJobRequest + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.create_webhook_replay_job( + body=CreateWebhookReplayJobRequest(webhook_id="1234567890", from_date="example", to_date="example") +) +print(response) +``` + +### Parameters + + + Request payload. + + +**Returns:** `CreateWebhookReplayJobResponse` + +--- + +## `delete` + +DELETE `/2/webhooks/{webhook_id}` + +**Delete Webhook** + +Deletes an existing webhook configuration. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.delete(webhook_id="1234567890") +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `DeleteResponse` + +--- + +## `delete_stream_link` + +DELETE `/2/tweets/search/webhooks/{webhook_id}` + +**Delete Stream Link** + +Deletes the link delivering FilteredStream events to the given webhook. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.delete_stream_link(webhook_id="1234567890") +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `DeleteStreamLinkResponse` + +--- + +## `get` + +GET `/2/webhooks` + +**Get Webhook** + +Get a list of webhook configs associated with a client app. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.get() +print(response) +``` + +### Parameters + + + + + A comma separated list of WebhookConfig fields to display. + + + + +**Returns:** `GetResponse` + +--- + +## `get_stream_links` + +GET `/2/tweets/search/webhooks` + +**Get Stream Links** + +Get a list of webhook links associated with a filtered stream ruleset. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.get_stream_links() +print(response) +``` + +**Returns:** `GetStreamLinksResponse` + +--- + +## `validate` + +PUT `/2/webhooks/{webhook_id}` + +**Validate Webhook** + +Triggers a CRC check for a given webhook. + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) + +response = client.webhooks.validate(webhook_id="1234567890") +print(response) +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `ValidateResponse` + +--- + diff --git a/xdks/python/reference/index.mdx b/xdks/python/reference/index.mdx deleted file mode 100644 index 6a490673f..000000000 --- a/xdks/python/reference/index.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "X API SDK Documentation" -sidebarTitle: "X API SDK Documentation" -description: "Index of the X API Python SDK reference: top-level package, client modules, and request/response models for every X API v2 endpoint group." ---- - -Welcome to the X API SDK documentation. - -# API Reference: - -* [xdk](/xdks/python/reference/modules) - * [xdk package](/xdks/python/reference/xdk) - -{/* Sphinx-generated indices (genindex, py-modindex, search) are not currently available in this docs site. */} diff --git a/xdks/python/reference/modules.mdx b/xdks/python/reference/modules.mdx deleted file mode 100644 index 038757b87..000000000 --- a/xdks/python/reference/modules.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: "xdk" -sidebarTitle: "API Reference" -description: "List of every module in the X API Python SDK reference, linking to clients, request/response models, and helpers for each X API v2 endpoint group." ---- - - - - - [Client](/xdks/python/reference/xdk.account_activity.client) - - [Core](/xdks/python/reference/xdk.account_activity) - - [Models](/xdks/python/reference/xdk.account_activity.models) - - - - [Client](/xdks/python/reference/xdk.activity.client) - - [Core](/xdks/python/reference/xdk.activity) - - [Models](/xdks/python/reference/xdk.activity.models) - - - - [Client](/xdks/python/reference/xdk.client) - - - - [Client](/xdks/python/reference/xdk.communities.client) - - [Core](/xdks/python/reference/xdk.communities) - - [Models](/xdks/python/reference/xdk.communities.models) - - - - [Client](/xdks/python/reference/xdk.community_notes.client) - - [Core](/xdks/python/reference/xdk.community_notes) - - [Models](/xdks/python/reference/xdk.community_notes.models) - - - - [Client](/xdks/python/reference/xdk.compliance.client) - - [Core](/xdks/python/reference/xdk.compliance) - - [Models](/xdks/python/reference/xdk.compliance.models) - - - - [Client](/xdks/python/reference/xdk.connections.client) - - [Core](/xdks/python/reference/xdk.connections) - - [Models](/xdks/python/reference/xdk.connections.models) - - - - [Client](/xdks/python/reference/xdk.direct_messages.client) - - [Core](/xdks/python/reference/xdk.direct_messages) - - [Models](/xdks/python/reference/xdk.direct_messages.models) - - - - [Client](/xdks/python/reference/xdk.general.client) - - [Core](/xdks/python/reference/xdk.general) - - [Models](/xdks/python/reference/xdk.general.models) - - - - [Client](/xdks/python/reference/xdk.lists.client) - - [Core](/xdks/python/reference/xdk.lists) - - [Models](/xdks/python/reference/xdk.lists.models) - - - - [Client](/xdks/python/reference/xdk.media.client) - - [Core](/xdks/python/reference/xdk.media) - - [Models](/xdks/python/reference/xdk.media.models) - - - - [Client](/xdks/python/reference/xdk.news.client) - - [Core](/xdks/python/reference/xdk.news) - - [Models](/xdks/python/reference/xdk.news.models) - - - - [Core](/xdks/python/reference/xdk.oauth1_auth) - - - - [Core](/xdks/python/reference/xdk.oauth2_auth) - - - - [Core](/xdks/python/reference/xdk.paginator) - - - - [Client](/xdks/python/reference/xdk.posts.client) - - [Core](/xdks/python/reference/xdk.posts) - - [Models](/xdks/python/reference/xdk.posts.models) - - - - [Client](/xdks/python/reference/xdk.spaces.client) - - [Core](/xdks/python/reference/xdk.spaces) - - [Models](/xdks/python/reference/xdk.spaces.models) - - - - [Client](/xdks/python/reference/xdk.stream.client) - - [Core](/xdks/python/reference/xdk.stream) - - [Models](/xdks/python/reference/xdk.stream.models) - - - - [Core](/xdks/python/reference/xdk.streaming) - - - - [Client](/xdks/python/reference/xdk.trends.client) - - [Core](/xdks/python/reference/xdk.trends) - - [Models](/xdks/python/reference/xdk.trends.models) - - - - [Client](/xdks/python/reference/xdk.usage.client) - - [Core](/xdks/python/reference/xdk.usage) - - [Models](/xdks/python/reference/xdk.usage.models) - - - - [Client](/xdks/python/reference/xdk.users.client) - - [Core](/xdks/python/reference/xdk.users) - - [Models](/xdks/python/reference/xdk.users.models) - - - - [Client](/xdks/python/reference/xdk.webhooks.client) - - [Core](/xdks/python/reference/xdk.webhooks) - - [Models](/xdks/python/reference/xdk.webhooks.models) - - - - [Core](/xdks/python/reference/xdk) - - - diff --git a/xdks/python/reference/overview.mdx b/xdks/python/reference/overview.mdx new file mode 100644 index 000000000..76db919ad --- /dev/null +++ b/xdks/python/reference/overview.mdx @@ -0,0 +1,79 @@ +--- +title: "Python XDK API Reference" +sidebarTitle: "Overview" +description: "Complete API reference for the official Python XDK (xdk v0.11.2) across all X API v2 resource clients." +--- + +The official **Python XDK** (`xdk`, `v0.11.2`) provides typed resource clients, authentication helpers, automatic pagination, and real-time streaming for the X API v2. + + + + Install `xdk` (`v0.11.2`) — requires Python 3.8+. + + + Source code, release notes, and issue tracker for `xdk`. + + + +## Installation + +```bash +pip install xdk +``` + +## `Client` Initialization + +```python +import os +from xdk import Client + +client = Client(bearer_token=os.environ["X_BEARER_TOKEN"]) +``` + + + App-only OAuth 2.0 Bearer Token for public read and search endpoints. + + + OAuth 2.0 user-context access token for endpoints acting on behalf of a user. + + + Configured `OAuth1` instance for OAuth 1.0a HMAC-SHA1 user-context signing. + + + Base URL for X API requests. + + + Per-request HTTP timeout in seconds. + + + Maximum retry attempts for transient network or 5xx failures. + + +## Resource Clients + +| Resource | Accessor | Client Class | Operations | +| :--- | :--- | :--- | ---: | +| [Account](/xdks/python/reference/clients/account) | `client.account` | `AccountClient` | 2 | +| [Account Activity](/xdks/python/reference/clients/account-activity) | `client.account_activity` | `AccountActivityClient` | 5 | +| [Activity](/xdks/python/reference/clients/activity) | `client.activity` | `ActivityClient` | 5 | +| [Articles](/xdks/python/reference/clients/articles) | `client.articles` | `ArticlesClient` | 2 | +| [Bots](/xdks/python/reference/clients/bots) | `client.bots` | `BotsClient` | 6 | +| [Broadcasts](/xdks/python/reference/clients/broadcasts) | `client.broadcasts` | `BroadcastsClient` | 41 | +| [Calls](/xdks/python/reference/clients/calls) | `client.calls` | `CallsClient` | 10 | +| [Chat](/xdks/python/reference/clients/chat) | `client.chat` | `ChatClient` | 45 | +| [Communities](/xdks/python/reference/clients/communities) | `client.communities` | `CommunitiesClient` | 2 | +| [Community Notes](/xdks/python/reference/clients/community-notes) | `client.community_notes` | `CommunityNotesClient` | 5 | +| [Compliance](/xdks/python/reference/clients/compliance) | `client.compliance` | `ComplianceClient` | 6 | +| [Connections](/xdks/python/reference/clients/connections) | `client.connections` | `ConnectionsClient` | 4 | +| [Direct Messages](/xdks/python/reference/clients/direct-messages) | `client.direct_messages` | `DirectMessagesClient` | 9 | +| [General](/xdks/python/reference/clients/general) | `client.general` | `GeneralClient` | 1 | +| [Lists](/xdks/python/reference/clients/lists) | `client.lists` | `ListsClient` | 9 | +| [Media](/xdks/python/reference/clients/media) | `client.media` | `MediaClient` | 19 | +| [News](/xdks/python/reference/clients/news) | `client.news` | `NewsClient` | 2 | +| [Posts](/xdks/python/reference/clients/posts) | `client.posts` | `PostsClient` | 17 | +| [Spaces](/xdks/python/reference/clients/spaces) | `client.spaces` | `SpacesClient` | 6 | +| [Stream](/xdks/python/reference/clients/stream) | `client.stream` | `StreamClient` | 18 | +| [Trends](/xdks/python/reference/clients/trends) | `client.trends` | `TrendsClient` | 3 | +| [Usage](/xdks/python/reference/clients/usage) | `client.usage` | `UsageClient` | 2 | +| [Users](/xdks/python/reference/clients/users) | `client.users` | `UsersClient` | 46 | +| [Webhooks](/xdks/python/reference/clients/webhooks) | `client.webhooks` | `WebhooksClient` | 8 | diff --git a/xdks/python/reference/xdk.account_activity.client.mdx b/xdks/python/reference/xdk.account_activity.client.mdx deleted file mode 100644 index 7a0c9807c..000000000 --- a/xdks/python/reference/xdk.account_activity.client.mdx +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "AccountActivityClient" -sidebarTitle: "AccountActivityClient" -description: "Reference for the account_activity.client Python module in the X API SDK. Client class and methods for calling the account activity endpoints of the X API v2." ---- - -## AccountActivityClient - -Class - -Bases: object - -Client for account activity operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `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 - - -The unique identifier for the webhook configuration. - - - -The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in yyyymmddhhmm format. - - - -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 - - -The webhook ID to check subscription against. - - - -Request body - - -### `delete_subscription` - -Delete subscription -Deletes an Account Activity subscription for the given webhook and user ID. - -#### Parameters - - -The webhook ID to check subscription against. - - - -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 - - -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 - - -The webhook ID to check subscription against. - - -#### Returns - -`ValidateSubscriptionResponse` - Response data - diff --git a/xdks/python/reference/xdk.account_activity.mdx b/xdks/python/reference/xdk.account_activity.mdx deleted file mode 100644 index 7db40f417..000000000 --- a/xdks/python/reference/xdk.account_activity.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -title: "AccountActivityClient" -sidebarTitle: "AccountActivityClient" -description: "Reference for the account_activity Python package in the X API SDK, grouping the client and Pydantic models for the account activity endpoints of the X API." ---- - -## Submodules - -* [xdk.account_activity.client module](/xdks/python/reference/xdk.account_activity.client) - * [`AccountActivityClient`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient) - * [`AccountActivityClient.__init__()`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient.__init__) - * [`AccountActivityClient.create_replay_job()`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient.create_replay_job) - * [`AccountActivityClient.create_subscription()`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient.create_subscription) - * [`AccountActivityClient.delete_subscription()`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient.delete_subscription) - * [`AccountActivityClient.get_subscription_count()`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient.get_subscription_count) - * [`AccountActivityClient.get_subscriptions()`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient.get_subscriptions) - * [`AccountActivityClient.validate_subscription()`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient.validate_subscription) -* [xdk.account_activity.models module](/xdks/python/reference/xdk.account_activity.models) - * [`CreateReplayJobResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateReplayJobResponse) - * [`CreateReplayJobResponse.model_config`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateReplayJobResponse.model_config) - * [`CreateSubscriptionRequest`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateSubscriptionRequest) - * [`CreateSubscriptionRequest.model_config`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateSubscriptionRequest.model_config) - * [`CreateSubscriptionResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateSubscriptionResponse) - * [`CreateSubscriptionResponse.model_config`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateSubscriptionResponse.model_config) - * [`DeleteSubscriptionResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.DeleteSubscriptionResponse) - * [`DeleteSubscriptionResponse.model_config`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.DeleteSubscriptionResponse.model_config) - * [`GetSubscriptionCountResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.GetSubscriptionCountResponse) - * [`GetSubscriptionCountResponse.model_config`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.GetSubscriptionCountResponse.model_config) - * [`GetSubscriptionsResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.GetSubscriptionsResponse) - * [`GetSubscriptionsResponse.model_config`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.GetSubscriptionsResponse.model_config) - * [`ValidateSubscriptionResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.ValidateSubscriptionResponse) - * [`ValidateSubscriptionResponse.model_config`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.ValidateSubscriptionResponse.model_config) - -## 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 - - - -### `__init__` - -#### Parameters - - - -### `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 - - -The unique identifier for the webhook configuration. - - - -The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in yyyymmddhhmm format. - - - -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 - - -The webhook ID to check subscription against. - - - -Request body - - -### `delete_subscription` - -Delete subscription -Deletes an Account Activity subscription for the given webhook and user ID. - -#### Parameters - - -The webhook ID to check subscription against. - - - -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 - - -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 - - -The webhook ID to check subscription against. - - -#### Returns - -`ValidateSubscriptionResponse` - Response data - diff --git a/xdks/python/reference/xdk.account_activity.models.mdx b/xdks/python/reference/xdk.account_activity.models.mdx deleted file mode 100644 index 7ebd81996..000000000 --- a/xdks/python/reference/xdk.account_activity.models.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "Account_activity.Models" -sidebarTitle: "Account_activity.Models" -description: "Reference for the Python XDK account_activity.models module, listing Pydantic response classes for replay jobs, subscriptions, and subscription counts." ---- - -This module provides Pydantic models for request and response data structures -for the account activity endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## CreateReplayJobResponse - -Class - -Bases: BaseModel - -Response model for create_replay_job - -## Methods - -### `class xdk.account_activity.models.CreateReplayJobResponse` - -Response model for create_replay_job - -### `class xdk.account_activity.models.CreateSubscriptionResponse` - -Response model for create_subscription - -### `class xdk.account_activity.models.DeleteSubscriptionResponse` - -Response model for delete_subscription - -### `class xdk.account_activity.models.GetSubscriptionCountResponse` - -Response model for get_subscription_count - -### `class xdk.account_activity.models.GetSubscriptionsResponse` - -Response model for get_subscriptions - -### `class xdk.account_activity.models.ValidateSubscriptionResponse` - -Response model for validate_subscription - diff --git a/xdks/python/reference/xdk.activity.client.mdx b/xdks/python/reference/xdk.activity.client.mdx deleted file mode 100644 index 13ea154aa..000000000 --- a/xdks/python/reference/xdk.activity.client.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: "ActivityClient" -sidebarTitle: "ActivityClient" -description: "Reference for the activity.client Python module in the X API SDK. Client class and methods for calling the activity endpoints of the X API v2." ---- - -This module provides a client for interacting with the activity endpoints of the X API. -Real-time streaming operations return generators that yield data as it arrives. -Streaming connections are automatically managed with exponential backoff retry logic for robust handling. -## ActivityClient - -Class - -Bases: object - -Streaming Client for activity operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `create_subscription` - -Create X activity subscription -Creates a subscription for an X activity event -body: Request body -:returns: Response data -:rtype: CreateSubscriptionResponse - -#### Parameters - - - -### `delete_subscription` - -Deletes X activity subscription -Deletes a subscription for an X activity event - -#### Parameters - - -The ID of the subscription to delete. - - -#### Returns - -`DeleteSubscriptionResponse` - Response data - -### `get_subscriptions` - -Get X activity subscriptions -Get a list of active subscriptions for XAA -:returns: Response data -:rtype: GetSubscriptionsResponse - -#### Returns - -`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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `update_subscription` - -Update X activity subscription -Updates a subscription for an X activity event - -#### Parameters - - -The ID of the subscription to update. - - - -Request body - - diff --git a/xdks/python/reference/xdk.activity.mdx b/xdks/python/reference/xdk.activity.mdx deleted file mode 100644 index 2d387ecca..000000000 --- a/xdks/python/reference/xdk.activity.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: "ActivityClient" -sidebarTitle: "ActivityClient" -description: "Reference for the activity Python package in the X API SDK, grouping the client and Pydantic models for the activity endpoints of the X API v2." ---- - -## Submodules - -* [xdk.activity.client module](/xdks/python/reference/xdk.activity.client) - * [`ActivityClient`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient) - * [`ActivityClient.__init__()`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient.__init__) - * [`ActivityClient.create_subscription()`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient.create_subscription) - * [`ActivityClient.delete_subscription()`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient.delete_subscription) - * [`ActivityClient.get_subscriptions()`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient.get_subscriptions) - * [`ActivityClient.stream()`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient.stream) - * [`ActivityClient.update_subscription()`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient.update_subscription) -* [xdk.activity.models module](/xdks/python/reference/xdk.activity.models) - * [`CreateSubscriptionRequest`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.CreateSubscriptionRequest) - * [`CreateSubscriptionRequest.model_config`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.CreateSubscriptionRequest.model_config) - * [`CreateSubscriptionResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.CreateSubscriptionResponse) - * [`CreateSubscriptionResponse.model_config`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.CreateSubscriptionResponse.model_config) - * [`DeleteSubscriptionResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.DeleteSubscriptionResponse) - * [`DeleteSubscriptionResponse.model_config`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.DeleteSubscriptionResponse.model_config) - * [`GetSubscriptionsResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.GetSubscriptionsResponse) - * [`GetSubscriptionsResponse.model_config`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.GetSubscriptionsResponse.model_config) - * [`StreamResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.StreamResponse) - * [`StreamResponse.model_config`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.StreamResponse.model_config) - * [`UpdateSubscriptionRequest`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.UpdateSubscriptionRequest) - * [`UpdateSubscriptionRequest.model_config`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.UpdateSubscriptionRequest.model_config) - * [`UpdateSubscriptionResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.UpdateSubscriptionResponse) - * [`UpdateSubscriptionResponse.model_config`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.UpdateSubscriptionResponse.model_config) - -## Module contents - -This module provides access to the activity endpoints of the X API -and serves as the main entry point for all activity-related functionality. - -### `class xdk.activity.ActivityClient` - -Streaming Client for activity operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `create_subscription` - -Create X activity subscription -Creates a subscription for an X activity event -body: Request body -:returns: Response data -:rtype: CreateSubscriptionResponse - -#### Parameters - - - -### `delete_subscription` - -Deletes X activity subscription -Deletes a subscription for an X activity event - -#### Parameters - - -The ID of the subscription to delete. - - -#### Returns - -`DeleteSubscriptionResponse` - Response data - -### `get_subscriptions` - -Get X activity subscriptions -Get a list of active subscriptions for XAA -:returns: Response data -:rtype: GetSubscriptionsResponse - -#### Returns - -`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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `update_subscription` - -Update X activity subscription -Updates a subscription for an X activity event - -#### Parameters - - -The ID of the subscription to update. - - - -Request body - - diff --git a/xdks/python/reference/xdk.activity.models.mdx b/xdks/python/reference/xdk.activity.models.mdx deleted file mode 100644 index 60e260a79..000000000 --- a/xdks/python/reference/xdk.activity.models.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "Activity.Models" -sidebarTitle: "Activity.Models" -description: "Reference for the activity.models Python module in the X API SDK. Pydantic request and response models for the activity endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the activity endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.activity.models.CreateSubscriptionRequest - -Request model for create_subscription - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## CreateSubscriptionResponse - -Class - -Bases: BaseModel - -Response model for create_subscription - -## Methods - -### `class xdk.activity.models.CreateSubscriptionResponse` - -Response model for create_subscription - -### `class xdk.activity.models.DeleteSubscriptionResponse` - -Response model for delete_subscription - -### `class xdk.activity.models.GetSubscriptionsResponse` - -Response model for get_subscriptions - -### `class xdk.activity.models.StreamResponse` - -Response model for stream - -### `class xdk.activity.models.UpdateSubscriptionResponse` - -Response model for update_subscription - diff --git a/xdks/python/reference/xdk.client.mdx b/xdks/python/reference/xdk.client.mdx deleted file mode 100644 index a67b91d07..000000000 --- a/xdks/python/reference/xdk.client.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: "Client" -sidebarTitle: "Client" -description: "Reference for the client Python package in the X API SDK, grouping the client and Pydantic models for the client endpoints of the X API v2." ---- - -This module provides the primary Client class for interacting with the X API. -It coordinates all sub-clients and handles authentication, session management, -and OAuth2 PKCE flows. All functionality is generated from the OpenAPI specification. - -## Client - -Class - -Bases: object - -| None = None) - -Client for interacting with the X API. - -## Constructors - -### `__init__` - -Initialize the X API client. - -#### Parameters - - -The base URL for the X API (defaults to [https://api.x.com](https://api.x.com)). - - - -The bearer token for the X API (app-only authentication). - - - -The OAuth2 access token for user context (can be used directly as bearer token). - - - -The client ID for the X API (required for OAuth2 PKCE flow). - - - -The client secret for the X API. - - - -The redirect URI for OAuth2 authorization. - - - -An existing OAuth2 token dictionary (if available). If provided, access_token will be extracted. - - - -Space-separated string or list of strings for OAuth2 authorization scopes. - - - -The base URL for OAuth2 authorization (defaults to [https://x.com/i](https://x.com/i)). - - - -OAuth1 instance for OAuth1.0a authentication. - - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -### `exchange_code` - -Exchange authorization code for tokens (matches TypeScript API). - -#### Parameters - - -The authorization code from the callback. - - - -Optional code verifier (uses stored verifier if not provided). - - -### `fetch_token` - -Fetch token using authorization response URL (legacy method). - -#### Parameters - - -The full callback URL received after authorization. - - -### `get_authorization_url` - -Get the authorization URL for the OAuth2 PKCE flow. - -#### Parameters - - -Optional state parameter for security. - - -### `is_token_expired` - -Check if the OAuth2 token is expired. - -### `refresh_token` - -Refresh the OAuth2 token. - diff --git a/xdks/python/reference/xdk.communities.client.mdx b/xdks/python/reference/xdk.communities.client.mdx deleted file mode 100644 index 122416683..000000000 --- a/xdks/python/reference/xdk.communities.client.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "CommunitiesClient" -sidebarTitle: "CommunitiesClient" -description: "Reference for the communities.client Python module in the X API SDK. Client class and methods for calling the communities endpoints of the X API v2." ---- - -## CommunitiesClient - -Class - -Bases: object - -Client for communities operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `get_by_id` - -Get Community by ID -Retrieves details of a specific Community by its ID. - -#### Parameters - - -The ID of the Community. - - - -A comma separated list of Community fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `search` - -Search Communities -Retrieves a list of Communities matching the specified search query. - -#### Parameters - - -Query to search communities. - - - -The maximum number of search results to be returned by a request. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -A comma separated list of Community fields to display. - - -#### Returns - -`IteratorSearchResponse` - diff --git a/xdks/python/reference/xdk.communities.mdx b/xdks/python/reference/xdk.communities.mdx deleted file mode 100644 index cfea9491c..000000000 --- a/xdks/python/reference/xdk.communities.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "CommunitiesClient" -sidebarTitle: "CommunitiesClient" -description: "Reference for the communities Python package in the X API SDK, grouping the client and Pydantic models for the communities endpoints of the X API v2." ---- - -## Submodules - -* [xdk.communities.client module](/xdks/python/reference/xdk.communities.client) - * [`CommunitiesClient`](/xdks/python/reference/xdk.communities.client#xdk.communities.client.CommunitiesClient) - * [`CommunitiesClient.__init__()`](/xdks/python/reference/xdk.communities.client#xdk.communities.client.CommunitiesClient.__init__) - * [`CommunitiesClient.get_by_id()`](/xdks/python/reference/xdk.communities.client#xdk.communities.client.CommunitiesClient.get_by_id) - * [`CommunitiesClient.search()`](/xdks/python/reference/xdk.communities.client#xdk.communities.client.CommunitiesClient.search) -* [xdk.communities.models module](/xdks/python/reference/xdk.communities.models) - * [`GetByIdResponse`](/xdks/python/reference/xdk.communities.models#xdk.communities.models.GetByIdResponse) - * [`GetByIdResponse.model_config`](/xdks/python/reference/xdk.communities.models#xdk.communities.models.GetByIdResponse.model_config) - * [`SearchResponse`](/xdks/python/reference/xdk.communities.models#xdk.communities.models.SearchResponse) - * [`SearchResponse.model_config`](/xdks/python/reference/xdk.communities.models#xdk.communities.models.SearchResponse.model_config) - -## Module contents - -This module provides access to the communities endpoints of the X API -and serves as the main entry point for all communities-related functionality. - -### `class xdk.communities.CommunitiesClient` - -Client for communities operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `get_by_id` - -Get Community by ID -Retrieves details of a specific Community by its ID. - -#### Parameters - - -The ID of the Community. - - - -A comma separated list of Community fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `search` - -Search Communities -Retrieves a list of Communities matching the specified search query. - -#### Parameters - - -Query to search communities. - - - -The maximum number of search results to be returned by a request. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -A comma separated list of Community fields to display. - - -#### Returns - -`IteratorSearchResponse` - diff --git a/xdks/python/reference/xdk.communities.models.mdx b/xdks/python/reference/xdk.communities.models.mdx deleted file mode 100644 index e011f5158..000000000 --- a/xdks/python/reference/xdk.communities.models.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: "Communities.Models" -sidebarTitle: "Communities.Models" -description: "Reference for the communities.models Python module in the X API SDK. Pydantic request and response models for the communities endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the communities endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## GetByIdResponse - -Class - -Bases: BaseModel - -Response model for get_by_id - -## Methods - -### `class xdk.communities.models.GetByIdResponse` - -Response model for get_by_id - -### `class xdk.communities.models.SearchResponse` - -Response model for search - diff --git a/xdks/python/reference/xdk.community_notes.client.mdx b/xdks/python/reference/xdk.community_notes.client.mdx deleted file mode 100644 index adfdef54e..000000000 --- a/xdks/python/reference/xdk.community_notes.client.mdx +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "CommunityNotesClient" -sidebarTitle: "CommunityNotesClient" -description: "Reference for the community_notes.client Python module in the X API SDK. Client class and methods for calling the community notes endpoints of the X API v2." ---- - -## CommunityNotesClient - -Class - -Bases: object - -Client for community notes operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `create` - -Create a Community Note -Creates a community note endpoint for LLM use case. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `delete` - -Delete a Community Note -Deletes a community note. - -#### Parameters - - -The community note id to delete. - - -#### Returns - -`DeleteResponse` - Response data - -### `evaluate` - -Evaluate a Community Note -Endpoint to evaluate a community note. -body: Request body -:returns: Response data -:rtype: EvaluateResponse - -#### Parameters - - - -### `search_eligible_posts` - -Search for Posts Eligible for Community Notes -Returns all the posts that are eligible for community notes. - -#### Parameters - - -If true, return a list of posts that are for the test. If false, return a list of posts that the bots can write proposed notes on the product. - - - -Pagination token to get next set of posts eligible for notes. - - - -Max results to return. - - - -The selection of posts to return. Valid values are ‘feed_size: small’ and ‘feed_size: large’. Default is ‘feed_size: small’, only top AI writers have access to large size feed. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorSearchEligiblePostsResponse` - -### `search_written` - -Search for Community Notes Written -Returns all the community notes written by the user. - -#### Parameters - - -If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product. - - - -Pagination token to get next set of posts eligible for notes. - - - -Max results to return. - - - -A comma separated list of Note fields to display. - - -#### Returns - -`IteratorSearchWrittenResponse` - diff --git a/xdks/python/reference/xdk.community_notes.mdx b/xdks/python/reference/xdk.community_notes.mdx deleted file mode 100644 index 5c4fceace..000000000 --- a/xdks/python/reference/xdk.community_notes.mdx +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: "CommunityNotesClient" -sidebarTitle: "CommunityNotesClient" -description: "Reference for the community_notes Python package in the X API SDK, grouping the client and Pydantic models for the community notes endpoints of the X API v2." ---- - -## Submodules - -* [xdk.community_notes.client module](/xdks/python/reference/xdk.community_notes.client) - * [`CommunityNotesClient`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient) - * [`CommunityNotesClient.__init__()`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient.__init__) - * [`CommunityNotesClient.create()`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient.create) - * [`CommunityNotesClient.delete()`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient.delete) - * [`CommunityNotesClient.evaluate()`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient.evaluate) - * [`CommunityNotesClient.search_eligible_posts()`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient.search_eligible_posts) - * [`CommunityNotesClient.search_written()`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient.search_written) -* [xdk.community_notes.models module](/xdks/python/reference/xdk.community_notes.models) - * [`CreateRequest`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.CreateRequest) - * [`CreateRequest.model_config`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.CreateRequest.model_config) - * [`CreateResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.CreateResponse) - * [`CreateResponse.model_config`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.CreateResponse.model_config) - * [`DeleteResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.DeleteResponse) - * [`DeleteResponse.model_config`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.DeleteResponse.model_config) - * [`EvaluateRequest`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.EvaluateRequest) - * [`EvaluateRequest.model_config`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.EvaluateRequest.model_config) - * [`EvaluateResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.EvaluateResponse) - * [`EvaluateResponse.model_config`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.EvaluateResponse.model_config) - * [`SearchEligiblePostsResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.SearchEligiblePostsResponse) - * [`SearchEligiblePostsResponse.model_config`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.SearchEligiblePostsResponse.model_config) - * [`SearchWrittenResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.SearchWrittenResponse) - * [`SearchWrittenResponse.model_config`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.SearchWrittenResponse.model_config) - -## Module contents - -This module provides access to the community notes endpoints of the X API -and serves as the main entry point for all community notes-related functionality. - -### `class xdk.community_notes.CommunityNotesClient` - -Client for community notes operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `create` - -Create a Community Note -Creates a community note endpoint for LLM use case. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `delete` - -Delete a Community Note -Deletes a community note. - -#### Parameters - - -The community note id to delete. - - -#### Returns - -`DeleteResponse` - Response data - -### `evaluate` - -Evaluate a Community Note -Endpoint to evaluate a community note. -body: Request body -:returns: Response data -:rtype: EvaluateResponse - -#### Parameters - - - -### `search_eligible_posts` - -Search for Posts Eligible for Community Notes -Returns all the posts that are eligible for community notes. - -#### Parameters - - -If true, return a list of posts that are for the test. If false, return a list of posts that the bots can write proposed notes on the product. - - - -Pagination token to get next set of posts eligible for notes. - - - -Max results to return. - - - -The selection of posts to return. Valid values are ‘feed_size: small’ and ‘feed_size: large’. Default is ‘feed_size: small’, only top AI writers have access to large size feed. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorSearchEligiblePostsResponse` - -### `search_written` - -Search for Community Notes Written -Returns all the community notes written by the user. - -#### Parameters - - -If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product. - - - -Pagination token to get next set of posts eligible for notes. - - - -Max results to return. - - - -A comma separated list of Note fields to display. - - -#### Returns - -`IteratorSearchWrittenResponse` - diff --git a/xdks/python/reference/xdk.community_notes.models.mdx b/xdks/python/reference/xdk.community_notes.models.mdx deleted file mode 100644 index 93884eaea..000000000 --- a/xdks/python/reference/xdk.community_notes.models.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "Community_notes.Models" -sidebarTitle: "Community_notes.Models" -description: "Reference for the community_notes.models Python module in the X API SDK. Pydantic request and response models for the community notes endpoints of the X API." ---- - -This module provides Pydantic models for request and response data structures -for the community notes endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.community_notes.models.CreateRequest - -Request model for create - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## CreateResponse - -Class - -Bases: BaseModel - -Response model for create - -## Methods - -### `class xdk.community_notes.models.CreateResponse` - -Response model for create - -### `class xdk.community_notes.models.DeleteResponse` - -Response model for delete - -### `class xdk.community_notes.models.EvaluateResponse` - -Response model for evaluate - -### `class xdk.community_notes.models.SearchEligiblePostsResponse` - -Response model for search_eligible_posts - -### `class xdk.community_notes.models.SearchWrittenResponse` - -Response model for search_written - diff --git a/xdks/python/reference/xdk.compliance.client.mdx b/xdks/python/reference/xdk.compliance.client.mdx deleted file mode 100644 index 08703b839..000000000 --- a/xdks/python/reference/xdk.compliance.client.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: "ComplianceClient" -sidebarTitle: "ComplianceClient" -description: "Reference for the compliance.client Python module in the X API SDK. Client class and methods for calling the compliance endpoints of the X API v2." ---- - -## ComplianceClient - -Class - -Bases: object - -Client for compliance operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `create_jobs` - -Create Compliance Job -Creates a new Compliance Job for the specified job type. -body: Request body -:returns: Response data -:rtype: CreateJobsResponse - -#### Parameters - - - -### `get_jobs` - -Get Compliance Jobs -Retrieves a list of Compliance Jobs filtered by job type and optional status. - -#### Parameters - - -Type of Compliance Job to list. - - - -Status of Compliance Job to list. - - - -A comma separated list of ComplianceJob fields to display. - - -#### Returns - -`GetJobsResponse` - Response data - -### `get_jobs_by_id` - -Get Compliance Job by ID -Retrieves details of a specific Compliance Job by its ID. - -#### Parameters - - -The ID of the Compliance Job to retrieve. - - - -A comma separated list of ComplianceJob fields to display. - - -#### Returns - -`GetJobsByIdResponse` - Response data - diff --git a/xdks/python/reference/xdk.compliance.mdx b/xdks/python/reference/xdk.compliance.mdx deleted file mode 100644 index e246e0876..000000000 --- a/xdks/python/reference/xdk.compliance.mdx +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "ComplianceClient" -sidebarTitle: "ComplianceClient" -description: "Reference for the compliance Python package in the X API SDK, grouping the client and Pydantic models for the compliance endpoints of the X API v2." ---- - -## Submodules - -* [xdk.compliance.client module](/xdks/python/reference/xdk.compliance.client) - * [`ComplianceClient`](/xdks/python/reference/xdk.compliance.client#xdk.compliance.client.ComplianceClient) - * [`ComplianceClient.__init__()`](/xdks/python/reference/xdk.compliance.client#xdk.compliance.client.ComplianceClient.__init__) - * [`ComplianceClient.create_jobs()`](/xdks/python/reference/xdk.compliance.client#xdk.compliance.client.ComplianceClient.create_jobs) - * [`ComplianceClient.get_jobs()`](/xdks/python/reference/xdk.compliance.client#xdk.compliance.client.ComplianceClient.get_jobs) - * [`ComplianceClient.get_jobs_by_id()`](/xdks/python/reference/xdk.compliance.client#xdk.compliance.client.ComplianceClient.get_jobs_by_id) -* [xdk.compliance.models module](/xdks/python/reference/xdk.compliance.models) - * [`CreateJobsRequest`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.CreateJobsRequest) - * [`CreateJobsRequest.model_config`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.CreateJobsRequest.model_config) - * [`CreateJobsResponse`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.CreateJobsResponse) - * [`CreateJobsResponse.model_config`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.CreateJobsResponse.model_config) - * [`GetJobsByIdResponse`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.GetJobsByIdResponse) - * [`GetJobsByIdResponse.model_config`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.GetJobsByIdResponse.model_config) - * [`GetJobsResponse`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.GetJobsResponse) - * [`GetJobsResponse.model_config`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.GetJobsResponse.model_config) - -## Module contents - -This module provides access to the compliance endpoints of the X API -and serves as the main entry point for all compliance-related functionality. - -### `class xdk.compliance.ComplianceClient` - -Client for compliance operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `create_jobs` - -Create Compliance Job -Creates a new Compliance Job for the specified job type. -body: Request body -:returns: Response data -:rtype: CreateJobsResponse - -#### Parameters - - - -### `get_jobs` - -Get Compliance Jobs -Retrieves a list of Compliance Jobs filtered by job type and optional status. - -#### Parameters - - -Type of Compliance Job to list. - - - -Status of Compliance Job to list. - - - -A comma separated list of ComplianceJob fields to display. - - -#### Returns - -`GetJobsResponse` - Response data - -### `get_jobs_by_id` - -Get Compliance Job by ID -Retrieves details of a specific Compliance Job by its ID. - -#### Parameters - - -The ID of the Compliance Job to retrieve. - - - -A comma separated list of ComplianceJob fields to display. - - -#### Returns - -`GetJobsByIdResponse` - Response data - diff --git a/xdks/python/reference/xdk.compliance.models.mdx b/xdks/python/reference/xdk.compliance.models.mdx deleted file mode 100644 index 9b38e08f8..000000000 --- a/xdks/python/reference/xdk.compliance.models.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "Compliance.Models" -sidebarTitle: "Compliance.Models" -description: "Reference for the compliance.models Python module in the X API SDK. Pydantic request and response models for the compliance endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the compliance endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.compliance.models.CreateJobsRequest - -Request model for create_jobs - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## CreateJobsResponse - -Class - -Bases: BaseModel - -Response model for create_jobs - -## Methods - -### `class xdk.compliance.models.CreateJobsResponse` - -Response model for create_jobs - -### `class xdk.compliance.models.GetJobsByIdResponse` - -Response model for get_jobs_by_id - -### `class xdk.compliance.models.GetJobsResponse` - -Response model for get_jobs - diff --git a/xdks/python/reference/xdk.connections.client.mdx b/xdks/python/reference/xdk.connections.client.mdx deleted file mode 100644 index 14a80f6eb..000000000 --- a/xdks/python/reference/xdk.connections.client.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "ConnectionsClient" -sidebarTitle: "ConnectionsClient" -description: "Reference for the connections.client Python module in the X API SDK. Client class and methods for calling the connections endpoints of the X API v2." ---- - -## ConnectionsClient - -Class - -Bases: object - -Client for connections operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `delete_all` - -Terminate all connections -Terminates all active streaming connections for the authenticated application. -:returns: Response data -:rtype: DeleteAllResponse - -#### Returns - -`DeleteAllResponse` - diff --git a/xdks/python/reference/xdk.connections.mdx b/xdks/python/reference/xdk.connections.mdx deleted file mode 100644 index f76177206..000000000 --- a/xdks/python/reference/xdk.connections.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "ConnectionsClient" -sidebarTitle: "ConnectionsClient" -description: "Reference for the connections Python package in the X API SDK, grouping the client and Pydantic models for the connections endpoints of the X API v2." ---- - -## Submodules - -* [xdk.connections.client module](/xdks/python/reference/xdk.connections.client) - * [`ConnectionsClient`](/xdks/python/reference/xdk.connections.client#xdk.connections.client.ConnectionsClient) - * [`ConnectionsClient.__init__()`](/xdks/python/reference/xdk.connections.client#xdk.connections.client.ConnectionsClient.__init__) - * [`ConnectionsClient.delete_all()`](/xdks/python/reference/xdk.connections.client#xdk.connections.client.ConnectionsClient.delete_all) -* [xdk.connections.models module](/xdks/python/reference/xdk.connections.models) - * [`DeleteAllResponse`](/xdks/python/reference/xdk.connections.models#xdk.connections.models.DeleteAllResponse) - * [`DeleteAllResponse.model_config`](/xdks/python/reference/xdk.connections.models#xdk.connections.models.DeleteAllResponse.model_config) - -## Module contents - -This module provides access to the connections endpoints of the X API -and serves as the main entry point for all connections-related functionality. - -### `class xdk.connections.ConnectionsClient` - -Client for connections operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `delete_all` - -Terminate all connections -Terminates all active streaming connections for the authenticated application. -:returns: Response data -:rtype: DeleteAllResponse - -#### Returns - -`DeleteAllResponse` - diff --git a/xdks/python/reference/xdk.connections.models.mdx b/xdks/python/reference/xdk.connections.models.mdx deleted file mode 100644 index be9626fcd..000000000 --- a/xdks/python/reference/xdk.connections.models.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Connections.Models" -sidebarTitle: "Connections.Models" -description: "Reference for the connections.models Python module in the X API SDK. Pydantic request and response models for the connections endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the connections endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## DeleteAllResponse - -Class - -Bases: BaseModel - -Response model for delete_all - -## Methods - -### `class xdk.connections.models.DeleteAllResponse` - -Response model for delete_all - diff --git a/xdks/python/reference/xdk.direct_messages.client.mdx b/xdks/python/reference/xdk.direct_messages.client.mdx deleted file mode 100644 index 69ec46535..000000000 --- a/xdks/python/reference/xdk.direct_messages.client.mdx +++ /dev/null @@ -1,251 +0,0 @@ ---- -title: "DirectMessagesClient" -sidebarTitle: "DirectMessagesClient" -description: "Reference for the direct_messages.client Python module in the X API SDK. Client class and methods for calling the direct messages endpoints of the X API v2." ---- - -## DirectMessagesClient - -Class - -Bases: object - -Client for direct messages operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `create_by_conversation_id` - -Create DM message by conversation ID -Sends a new direct message to a specific conversation by its ID. - -#### Parameters - - -The DM Conversation ID. - - - -Request body - - -### `create_by_participant_id` - -Create DM message by participant ID -Sends a new direct message to a specific participant by their ID. - -#### Parameters - - -The ID of the recipient user that will receive the DM. - - - -Request body - - -### `create_conversation` - -Create DM conversation -Initiates a new direct message conversation with specified participants. -body: Request body -:returns: Response data -:rtype: CreateConversationResponse - -#### Parameters - - - -### `delete_events` - -Delete DM event -Deletes a specific direct message event by its ID, if owned by the authenticated user. - -#### Parameters - - -The ID of the direct-message event to delete. - - -#### Returns - -`DeleteEventsResponse` - Response data - -### `get_events` - -Get DM events -Retrieves a list of recent direct message events across all conversations. - -#### Parameters - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of event_types to include in the results. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetEventsResponse` - -### `get_events_by_conversation_id` - -Get DM events for a DM conversation -Retrieves direct message events for a specific conversation. - -#### Parameters - - -The DM conversation ID. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of event_types to include in the results. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetEventsByConversationIdResponse` - -### `get_events_by_id` - -Get DM event by ID -Retrieves details of a specific direct message event by its ID. - -#### Parameters - - -dm event id. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetEventsByIdResponse` - Response data - -### `get_events_by_participant_id` - -Get DM events for a DM conversation -Retrieves direct message events for a specific conversation. - -#### Parameters - - -The ID of the participant user for the One to One DM conversation. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of event_types to include in the results. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetEventsByParticipantIdResponse` - diff --git a/xdks/python/reference/xdk.direct_messages.mdx b/xdks/python/reference/xdk.direct_messages.mdx deleted file mode 100644 index 0d3b6b9d3..000000000 --- a/xdks/python/reference/xdk.direct_messages.mdx +++ /dev/null @@ -1,291 +0,0 @@ ---- -title: "DirectMessagesClient" -sidebarTitle: "DirectMessagesClient" -description: "Reference for the direct_messages Python package in the X API SDK, grouping the client and Pydantic models for the direct messages endpoints of the X API v2." ---- - -## Submodules - -* [xdk.direct_messages.client module](/xdks/python/reference/xdk.direct_messages.client) - * [`DirectMessagesClient`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient) - * [`DirectMessagesClient.__init__()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.__init__) - * [`DirectMessagesClient.create_by_conversation_id()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.create_by_conversation_id) - * [`DirectMessagesClient.create_by_participant_id()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.create_by_participant_id) - * [`DirectMessagesClient.create_conversation()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.create_conversation) - * [`DirectMessagesClient.delete_events()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.delete_events) - * [`DirectMessagesClient.get_events()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events) - * [`DirectMessagesClient.get_events_by_conversation_id()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events_by_conversation_id) - * [`DirectMessagesClient.get_events_by_id()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events_by_id) - * [`DirectMessagesClient.get_events_by_participant_id()`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient.get_events_by_participant_id) -* [xdk.direct_messages.models module](/xdks/python/reference/xdk.direct_messages.models) - * [`CreateByConversationIdRequest`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdRequest) - * [`CreateByConversationIdRequest.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdRequest.model_config) - * [`CreateByConversationIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdResponse) - * [`CreateByConversationIdResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdResponse.model_config) - * [`CreateByParticipantIdRequest`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdRequest) - * [`CreateByParticipantIdRequest.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdRequest.model_config) - * [`CreateByParticipantIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdResponse) - * [`CreateByParticipantIdResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdResponse.model_config) - * [`CreateConversationRequest`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationRequest) - * [`CreateConversationRequest.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationRequest.model_config) - * [`CreateConversationResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationResponse) - * [`CreateConversationResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationResponse.model_config) - * [`DeleteEventsResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.DeleteEventsResponse) - * [`DeleteEventsResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.DeleteEventsResponse.model_config) - * [`GetEventsByConversationIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByConversationIdResponse) - * [`GetEventsByConversationIdResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByConversationIdResponse.model_config) - * [`GetEventsByIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByIdResponse) - * [`GetEventsByIdResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByIdResponse.model_config) - * [`GetEventsByParticipantIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByParticipantIdResponse) - * [`GetEventsByParticipantIdResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByParticipantIdResponse.model_config) - * [`GetEventsResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsResponse) - * [`GetEventsResponse.model_config`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsResponse.model_config) - -## Module contents - -This module provides access to the direct messages endpoints of the X API -and serves as the main entry point for all direct messages-related functionality. - -### `class xdk.direct_messages.DirectMessagesClient` - -Client for direct messages operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `create_by_conversation_id` - -Create DM message by conversation ID -Sends a new direct message to a specific conversation by its ID. - -#### Parameters - - -The DM Conversation ID. - - - -Request body - - -### `create_by_participant_id` - -Create DM message by participant ID -Sends a new direct message to a specific participant by their ID. - -#### Parameters - - -The ID of the recipient user that will receive the DM. - - - -Request body - - -### `create_conversation` - -Create DM conversation -Initiates a new direct message conversation with specified participants. -body: Request body -:returns: Response data -:rtype: CreateConversationResponse - -#### Parameters - - - -### `delete_events` - -Delete DM event -Deletes a specific direct message event by its ID, if owned by the authenticated user. - -#### Parameters - - -The ID of the direct-message event to delete. - - -#### Returns - -`DeleteEventsResponse` - Response data - -### `get_events` - -Get DM events -Retrieves a list of recent direct message events across all conversations. - -#### Parameters - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of event_types to include in the results. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetEventsResponse` - -### `get_events_by_conversation_id` - -Get DM events for a DM conversation -Retrieves direct message events for a specific conversation. - -#### Parameters - - -The DM conversation ID. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of event_types to include in the results. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetEventsByConversationIdResponse` - -### `get_events_by_id` - -Get DM event by ID -Retrieves details of a specific direct message event by its ID. - -#### Parameters - - -dm event id. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetEventsByIdResponse` - Response data - -### `get_events_by_participant_id` - -Get DM events for a DM conversation -Retrieves direct message events for a specific conversation. - -#### Parameters - - -The ID of the participant user for the One to One DM conversation. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of event_types to include in the results. - - - -A comma separated list of DmEvent fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetEventsByParticipantIdResponse` - diff --git a/xdks/python/reference/xdk.direct_messages.models.mdx b/xdks/python/reference/xdk.direct_messages.models.mdx deleted file mode 100644 index fde343e45..000000000 --- a/xdks/python/reference/xdk.direct_messages.models.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "Direct_messages.Models" -sidebarTitle: "Direct_messages.Models" -description: "Reference for the direct_messages.models Python module in the X API SDK. Pydantic request and response models for the direct messages endpoints of the X API." ---- - -This module provides Pydantic models for request and response data structures -for the direct messages endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.direct_messages.models.CreateByConversationIdRequest - -Request model for create_by_conversation_id - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## CreateByConversationIdResponse - -Class - -Bases: BaseModel - -Response model for create_by_conversation_id - -## Methods - -### `class xdk.direct_messages.models.CreateByConversationIdResponse` - -Response model for create_by_conversation_id - -### `class xdk.direct_messages.models.CreateByParticipantIdResponse` - -Response model for create_by_participant_id - -### `class xdk.direct_messages.models.CreateConversationResponse` - -Response model for create_conversation - -### `class xdk.direct_messages.models.DeleteEventsResponse` - -Response model for delete_events - -### `class xdk.direct_messages.models.GetEventsByConversationIdResponse` - -Response model for get_events_by_conversation_id - -### `class xdk.direct_messages.models.GetEventsByIdResponse` - -Response model for get_events_by_id - -### `class xdk.direct_messages.models.GetEventsByParticipantIdResponse` - -Response model for get_events_by_participant_id - -### `class xdk.direct_messages.models.GetEventsResponse` - -Response model for get_events - diff --git a/xdks/python/reference/xdk.general.client.mdx b/xdks/python/reference/xdk.general.client.mdx deleted file mode 100644 index c5537a34f..000000000 --- a/xdks/python/reference/xdk.general.client.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "GeneralClient" -sidebarTitle: "GeneralClient" -description: "Reference for the general.client Python module in the X API SDK. Client class and methods for calling the general endpoints of the X API v2." ---- - -## GeneralClient - -Class - -Bases: object - -Client for general operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `get_open_api_spec` - -Get OpenAPI Spec. -Retrieves the full OpenAPI Specification in JSON format. (See [https://github.com/OAI/OpenAPI-Specification/blob/master/README.md](https://github.com/OAI/OpenAPI-Specification/blob/master/README.md)) -:returns: Response data -:rtype: GetOpenApiSpecResponse - -#### Returns - -`GetOpenApiSpecResponse` - diff --git a/xdks/python/reference/xdk.general.mdx b/xdks/python/reference/xdk.general.mdx deleted file mode 100644 index c64c88d39..000000000 --- a/xdks/python/reference/xdk.general.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "GeneralClient" -sidebarTitle: "GeneralClient" -description: "Reference for the general Python package in the X API SDK, grouping the client and Pydantic models for the general endpoints of the X API v2." ---- - -## Submodules - -* [xdk.general.client module](/xdks/python/reference/xdk.general.client) - * [`GeneralClient`](/xdks/python/reference/xdk.general.client#xdk.general.client.GeneralClient) - * [`GeneralClient.__init__()`](/xdks/python/reference/xdk.general.client#xdk.general.client.GeneralClient.__init__) - * [`GeneralClient.get_open_api_spec()`](/xdks/python/reference/xdk.general.client#xdk.general.client.GeneralClient.get_open_api_spec) -* [xdk.general.models module](/xdks/python/reference/xdk.general.models) - * [`GetOpenApiSpecResponse`](/xdks/python/reference/xdk.general.models#xdk.general.models.GetOpenApiSpecResponse) - * [`GetOpenApiSpecResponse.model_config`](/xdks/python/reference/xdk.general.models#xdk.general.models.GetOpenApiSpecResponse.model_config) - -## Module contents - -This module provides access to the general endpoints of the X API -and serves as the main entry point for all general-related functionality. - -### `class xdk.general.GeneralClient` - -Client for general operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `get_open_api_spec` - -Get OpenAPI Spec. -Retrieves the full OpenAPI Specification in JSON format. (See [https://github.com/OAI/OpenAPI-Specification/blob/master/README.md](https://github.com/OAI/OpenAPI-Specification/blob/master/README.md)) -:returns: Response data -:rtype: GetOpenApiSpecResponse - -#### Returns - -`GetOpenApiSpecResponse` - diff --git a/xdks/python/reference/xdk.general.models.mdx b/xdks/python/reference/xdk.general.models.mdx deleted file mode 100644 index f7c0cc91e..000000000 --- a/xdks/python/reference/xdk.general.models.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "General.Models" -sidebarTitle: "General.Models" -description: "Reference for the general.models Python module in the X API SDK. Pydantic request and response models for the general endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the general endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## GetOpenApiSpecResponse - -Class - -Bases: BaseModel - -Response model for get_open_api_spec - -## Methods - -### `class xdk.general.models.GetOpenApiSpecResponse` - -Response model for get_open_api_spec - diff --git a/xdks/python/reference/xdk.lists.client.mdx b/xdks/python/reference/xdk.lists.client.mdx deleted file mode 100644 index a8c1b844d..000000000 --- a/xdks/python/reference/xdk.lists.client.mdx +++ /dev/null @@ -1,242 +0,0 @@ ---- -title: "ListsClient" -sidebarTitle: "ListsClient" -description: "Reference for the lists.client Python module in the X API SDK. Client class and methods for calling the lists endpoints of the X API v2." ---- - -## ListsClient - -Class - -Bases: object - -Client for lists operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `add_member` - -Add List member -Adds a User to a specific List by its ID. - -#### Parameters - - -The ID of the List for which to add a member. - - - -Request body - - -### `create` - -Create List -Creates a new List for the authenticated user. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `delete` - -Delete List -Deletes a specific List owned by the authenticated user by its ID. - -#### Parameters - - -The ID of the List to delete. - - -#### Returns - -`DeleteResponse` - Response data - -### `get_by_id` - -Get List by ID -Retrieves details of a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_followers` - -Get List followers -Retrieves a list of Users who follow a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetFollowersResponse` - -### `get_members` - -Get List members -Retrieves a list of Users who are members of a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetMembersResponse` - -### `get_posts` - -Get List Posts -Retrieves a list of Posts associated with a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetPostsResponse` - -### `remove_member_by_user_id` - -Remove List member -Removes a User from a specific List by its ID and the User’s ID. - -#### Parameters - - -The ID of the List to remove a member. - - - -The ID of User that will be removed from the List. - - -#### Returns - -`RemoveMemberByUserIdResponse` - Response data - -### `update` - -Update List -Updates the details of a specific List owned by the authenticated user by its ID. - -#### Parameters - - -The ID of the List to modify. - - - -Request body - - diff --git a/xdks/python/reference/xdk.lists.mdx b/xdks/python/reference/xdk.lists.mdx deleted file mode 100644 index ceaa53d57..000000000 --- a/xdks/python/reference/xdk.lists.mdx +++ /dev/null @@ -1,285 +0,0 @@ ---- -title: "ListsClient" -sidebarTitle: "ListsClient" -description: "Reference for the lists Python package in the X API SDK, grouping the client and Pydantic models for the lists endpoints of the X API v2." ---- - -## Submodules - -* [xdk.lists.client module](/xdks/python/reference/xdk.lists.client) - * [`ListsClient`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient) - * [`ListsClient.__init__()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.__init__) - * [`ListsClient.add_member()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.add_member) - * [`ListsClient.create()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.create) - * [`ListsClient.delete()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.delete) - * [`ListsClient.get_by_id()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.get_by_id) - * [`ListsClient.get_followers()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.get_followers) - * [`ListsClient.get_members()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.get_members) - * [`ListsClient.get_posts()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.get_posts) - * [`ListsClient.remove_member_by_user_id()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.remove_member_by_user_id) - * [`ListsClient.update()`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient.update) -* [xdk.lists.models module](/xdks/python/reference/xdk.lists.models) - * [`AddMemberRequest`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.AddMemberRequest) - * [`AddMemberRequest.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.AddMemberRequest.model_config) - * [`AddMemberResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.AddMemberResponse) - * [`AddMemberResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.AddMemberResponse.model_config) - * [`CreateRequest`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.CreateRequest) - * [`CreateRequest.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.CreateRequest.model_config) - * [`CreateResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.CreateResponse) - * [`CreateResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.CreateResponse.model_config) - * [`DeleteResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.DeleteResponse) - * [`DeleteResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.DeleteResponse.model_config) - * [`GetByIdResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetByIdResponse) - * [`GetByIdResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetByIdResponse.model_config) - * [`GetFollowersResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetFollowersResponse) - * [`GetFollowersResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetFollowersResponse.model_config) - * [`GetMembersResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetMembersResponse) - * [`GetMembersResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetMembersResponse.model_config) - * [`GetPostsResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetPostsResponse) - * [`GetPostsResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetPostsResponse.model_config) - * [`RemoveMemberByUserIdResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.RemoveMemberByUserIdResponse) - * [`RemoveMemberByUserIdResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.RemoveMemberByUserIdResponse.model_config) - * [`UpdateRequest`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.UpdateRequest) - * [`UpdateRequest.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.UpdateRequest.model_config) - * [`UpdateResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.UpdateResponse) - * [`UpdateResponse.model_config`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.UpdateResponse.model_config) - -## Module contents - -This module provides access to the lists endpoints of the X API -and serves as the main entry point for all lists-related functionality. - -### `class xdk.lists.ListsClient` - -Client for lists operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `add_member` - -Add List member -Adds a User to a specific List by its ID. - -#### Parameters - - -The ID of the List for which to add a member. - - - -Request body - - -### `create` - -Create List -Creates a new List for the authenticated user. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `delete` - -Delete List -Deletes a specific List owned by the authenticated user by its ID. - -#### Parameters - - -The ID of the List to delete. - - -#### Returns - -`DeleteResponse` - Response data - -### `get_by_id` - -Get List by ID -Retrieves details of a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_followers` - -Get List followers -Retrieves a list of Users who follow a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetFollowersResponse` - -### `get_members` - -Get List members -Retrieves a list of Users who are members of a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetMembersResponse` - -### `get_posts` - -Get List Posts -Retrieves a list of Posts associated with a specific List by its ID. - -#### Parameters - - -The ID of the List. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetPostsResponse` - -### `remove_member_by_user_id` - -Remove List member -Removes a User from a specific List by its ID and the User’s ID. - -#### Parameters - - -The ID of the List to remove a member. - - - -The ID of User that will be removed from the List. - - -#### Returns - -`RemoveMemberByUserIdResponse` - Response data - -### `update` - -Update List -Updates the details of a specific List owned by the authenticated user by its ID. - -#### Parameters - - -The ID of the List to modify. - - - -Request body - - diff --git a/xdks/python/reference/xdk.lists.models.mdx b/xdks/python/reference/xdk.lists.models.mdx deleted file mode 100644 index 2aba09b79..000000000 --- a/xdks/python/reference/xdk.lists.models.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "Lists.Models" -sidebarTitle: "Lists.Models" -description: "Reference for the lists.models Python module in the X API SDK. Pydantic request and response models for the lists endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the lists endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.lists.models.AddMemberRequest - -Request model for add_member - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## AddMemberResponse - -Class - -Bases: BaseModel - -Response model for add_member - -## Methods - -### `class xdk.lists.models.AddMemberResponse` - -Response model for add_member - -### `class xdk.lists.models.CreateResponse` - -Response model for create - -### `class xdk.lists.models.DeleteResponse` - -Response model for delete - -### `class xdk.lists.models.GetByIdResponse` - -Response model for get_by_id - -### `class xdk.lists.models.GetFollowersResponse` - -Response model for get_followers - -### `class xdk.lists.models.GetMembersResponse` - -Response model for get_members - -### `class xdk.lists.models.GetPostsResponse` - -Response model for get_posts - -### `class xdk.lists.models.RemoveMemberByUserIdResponse` - -Response model for remove_member_by_user_id - -### `class xdk.lists.models.UpdateResponse` - -Response model for update - diff --git a/xdks/python/reference/xdk.mdx b/xdks/python/reference/xdk.mdx deleted file mode 100644 index bbee86820..000000000 --- a/xdks/python/reference/xdk.mdx +++ /dev/null @@ -1,853 +0,0 @@ ---- -title: "Client" -sidebarTitle: "Client" -description: "Reference for the xdk top-level Python package in the X API SDK. Re-exported clients, models, and utilities for calling the X API v2 from Python." ---- - -## Subpackages - -* [xdk.account_activity package](/xdks/python/reference/xdk.account_activity) - * [Submodules](/xdks/python/reference/xdk.account_activity#submodules) - * [xdk.account_activity.client module](/xdks/python/reference/xdk.account_activity.client) - * [`AccountActivityClient`](/xdks/python/reference/xdk.account_activity.client#xdk.account_activity.client.AccountActivityClient) - * [xdk.account_activity.models module](/xdks/python/reference/xdk.account_activity.models) - * [`CreateReplayJobResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateReplayJobResponse) - * [`CreateSubscriptionRequest`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateSubscriptionRequest) - * [`CreateSubscriptionResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.CreateSubscriptionResponse) - * [`DeleteSubscriptionResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.DeleteSubscriptionResponse) - * [`GetSubscriptionCountResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.GetSubscriptionCountResponse) - * [`GetSubscriptionsResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.GetSubscriptionsResponse) - * [`ValidateSubscriptionResponse`](/xdks/python/reference/xdk.account_activity.models#xdk.account_activity.models.ValidateSubscriptionResponse) - * [Module contents](/xdks/python/reference/xdk.account_activity#module-xdk.account_activity) - * [`AccountActivityClient`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient) - * [`AccountActivityClient.__init__()`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient.__init__) - * [`AccountActivityClient.create_replay_job()`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient.create_replay_job) - * [`AccountActivityClient.create_subscription()`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient.create_subscription) - * [`AccountActivityClient.delete_subscription()`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient.delete_subscription) - * [`AccountActivityClient.get_subscription_count()`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient.get_subscription_count) - * [`AccountActivityClient.get_subscriptions()`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient.get_subscriptions) - * [`AccountActivityClient.validate_subscription()`](/xdks/python/reference/xdk.account_activity#xdk.account_activity.AccountActivityClient.validate_subscription) -* [xdk.activity package](/xdks/python/reference/xdk.activity) - * [Submodules](/xdks/python/reference/xdk.activity#submodules) - * [xdk.activity.client module](/xdks/python/reference/xdk.activity.client) - * [`ActivityClient`](/xdks/python/reference/xdk.activity.client#xdk.activity.client.ActivityClient) - * [xdk.activity.models module](/xdks/python/reference/xdk.activity.models) - * [`CreateSubscriptionRequest`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.CreateSubscriptionRequest) - * [`CreateSubscriptionResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.CreateSubscriptionResponse) - * [`DeleteSubscriptionResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.DeleteSubscriptionResponse) - * [`GetSubscriptionsResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.GetSubscriptionsResponse) - * [`StreamResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.StreamResponse) - * [`UpdateSubscriptionRequest`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.UpdateSubscriptionRequest) - * [`UpdateSubscriptionResponse`](/xdks/python/reference/xdk.activity.models#xdk.activity.models.UpdateSubscriptionResponse) - * [Module contents](/xdks/python/reference/xdk.activity#module-xdk.activity) - * [`ActivityClient`](/xdks/python/reference/xdk.activity#xdk.activity.ActivityClient) - * [`ActivityClient.__init__()`](/xdks/python/reference/xdk.activity#xdk.activity.ActivityClient.__init__) - * [`ActivityClient.create_subscription()`](/xdks/python/reference/xdk.activity#xdk.activity.ActivityClient.create_subscription) - * [`ActivityClient.delete_subscription()`](/xdks/python/reference/xdk.activity#xdk.activity.ActivityClient.delete_subscription) - * [`ActivityClient.get_subscriptions()`](/xdks/python/reference/xdk.activity#xdk.activity.ActivityClient.get_subscriptions) - * [`ActivityClient.stream()`](/xdks/python/reference/xdk.activity#xdk.activity.ActivityClient.stream) - * [`ActivityClient.update_subscription()`](/xdks/python/reference/xdk.activity#xdk.activity.ActivityClient.update_subscription) -* [xdk.communities package](/xdks/python/reference/xdk.communities) - * [Submodules](/xdks/python/reference/xdk.communities#submodules) - * [xdk.communities.client module](/xdks/python/reference/xdk.communities.client) - * [`CommunitiesClient`](/xdks/python/reference/xdk.communities.client#xdk.communities.client.CommunitiesClient) - * [xdk.communities.models module](/xdks/python/reference/xdk.communities.models) - * [`GetByIdResponse`](/xdks/python/reference/xdk.communities.models#xdk.communities.models.GetByIdResponse) - * [`SearchResponse`](/xdks/python/reference/xdk.communities.models#xdk.communities.models.SearchResponse) - * [Module contents](/xdks/python/reference/xdk.communities#module-xdk.communities) - * [`CommunitiesClient`](/xdks/python/reference/xdk.communities#xdk.communities.CommunitiesClient) - * [`CommunitiesClient.__init__()`](/xdks/python/reference/xdk.communities#xdk.communities.CommunitiesClient.__init__) - * [`CommunitiesClient.get_by_id()`](/xdks/python/reference/xdk.communities#xdk.communities.CommunitiesClient.get_by_id) - * [`CommunitiesClient.search()`](/xdks/python/reference/xdk.communities#xdk.communities.CommunitiesClient.search) -* [xdk.community_notes package](/xdks/python/reference/xdk.community_notes) - * [Submodules](/xdks/python/reference/xdk.community_notes#submodules) - * [xdk.community_notes.client module](/xdks/python/reference/xdk.community_notes.client) - * [`CommunityNotesClient`](/xdks/python/reference/xdk.community_notes.client#xdk.community_notes.client.CommunityNotesClient) - * [xdk.community_notes.models module](/xdks/python/reference/xdk.community_notes.models) - * [`CreateRequest`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.CreateRequest) - * [`CreateResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.CreateResponse) - * [`DeleteResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.DeleteResponse) - * [`EvaluateRequest`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.EvaluateRequest) - * [`EvaluateResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.EvaluateResponse) - * [`SearchEligiblePostsResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.SearchEligiblePostsResponse) - * [`SearchWrittenResponse`](/xdks/python/reference/xdk.community_notes.models#xdk.community_notes.models.SearchWrittenResponse) - * [Module contents](/xdks/python/reference/xdk.community_notes#module-xdk.community_notes) - * [`CommunityNotesClient`](/xdks/python/reference/xdk.community_notes#xdk.community_notes.CommunityNotesClient) - * [`CommunityNotesClient.__init__()`](/xdks/python/reference/xdk.community_notes#xdk.community_notes.CommunityNotesClient.__init__) - * [`CommunityNotesClient.create()`](/xdks/python/reference/xdk.community_notes#xdk.community_notes.CommunityNotesClient.create) - * [`CommunityNotesClient.delete()`](/xdks/python/reference/xdk.community_notes#xdk.community_notes.CommunityNotesClient.delete) - * [`CommunityNotesClient.evaluate()`](/xdks/python/reference/xdk.community_notes#xdk.community_notes.CommunityNotesClient.evaluate) - * [`CommunityNotesClient.search_eligible_posts()`](/xdks/python/reference/xdk.community_notes#xdk.community_notes.CommunityNotesClient.search_eligible_posts) - * [`CommunityNotesClient.search_written()`](/xdks/python/reference/xdk.community_notes#xdk.community_notes.CommunityNotesClient.search_written) -* [xdk.compliance package](/xdks/python/reference/xdk.compliance) - * [Submodules](/xdks/python/reference/xdk.compliance#submodules) - * [xdk.compliance.client module](/xdks/python/reference/xdk.compliance.client) - * [`ComplianceClient`](/xdks/python/reference/xdk.compliance.client#xdk.compliance.client.ComplianceClient) - * [xdk.compliance.models module](/xdks/python/reference/xdk.compliance.models) - * [`CreateJobsRequest`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.CreateJobsRequest) - * [`CreateJobsResponse`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.CreateJobsResponse) - * [`GetJobsByIdResponse`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.GetJobsByIdResponse) - * [`GetJobsResponse`](/xdks/python/reference/xdk.compliance.models#xdk.compliance.models.GetJobsResponse) - * [Module contents](/xdks/python/reference/xdk.compliance#module-xdk.compliance) - * [`ComplianceClient`](/xdks/python/reference/xdk.compliance#xdk.compliance.ComplianceClient) - * [`ComplianceClient.__init__()`](/xdks/python/reference/xdk.compliance#xdk.compliance.ComplianceClient.__init__) - * [`ComplianceClient.create_jobs()`](/xdks/python/reference/xdk.compliance#xdk.compliance.ComplianceClient.create_jobs) - * [`ComplianceClient.get_jobs()`](/xdks/python/reference/xdk.compliance#xdk.compliance.ComplianceClient.get_jobs) - * [`ComplianceClient.get_jobs_by_id()`](/xdks/python/reference/xdk.compliance#xdk.compliance.ComplianceClient.get_jobs_by_id) -* [xdk.connections package](/xdks/python/reference/xdk.connections) - * [Submodules](/xdks/python/reference/xdk.connections#submodules) - * [xdk.connections.client module](/xdks/python/reference/xdk.connections.client) - * [`ConnectionsClient`](/xdks/python/reference/xdk.connections.client#xdk.connections.client.ConnectionsClient) - * [xdk.connections.models module](/xdks/python/reference/xdk.connections.models) - * [`DeleteAllResponse`](/xdks/python/reference/xdk.connections.models#xdk.connections.models.DeleteAllResponse) - * [Module contents](/xdks/python/reference/xdk.connections#module-xdk.connections) - * [`ConnectionsClient`](/xdks/python/reference/xdk.connections#xdk.connections.ConnectionsClient) - * [`ConnectionsClient.__init__()`](/xdks/python/reference/xdk.connections#xdk.connections.ConnectionsClient.__init__) - * [`ConnectionsClient.delete_all()`](/xdks/python/reference/xdk.connections#xdk.connections.ConnectionsClient.delete_all) -* [xdk.direct_messages package](/xdks/python/reference/xdk.direct_messages) - * [Submodules](/xdks/python/reference/xdk.direct_messages#submodules) - * [xdk.direct_messages.client module](/xdks/python/reference/xdk.direct_messages.client) - * [`DirectMessagesClient`](/xdks/python/reference/xdk.direct_messages.client#xdk.direct_messages.client.DirectMessagesClient) - * [xdk.direct_messages.models module](/xdks/python/reference/xdk.direct_messages.models) - * [`CreateByConversationIdRequest`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdRequest) - * [`CreateByConversationIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByConversationIdResponse) - * [`CreateByParticipantIdRequest`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdRequest) - * [`CreateByParticipantIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateByParticipantIdResponse) - * [`CreateConversationRequest`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationRequest) - * [`CreateConversationResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.CreateConversationResponse) - * [`DeleteEventsResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.DeleteEventsResponse) - * [`GetEventsByConversationIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByConversationIdResponse) - * [`GetEventsByIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByIdResponse) - * [`GetEventsByParticipantIdResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsByParticipantIdResponse) - * [`GetEventsResponse`](/xdks/python/reference/xdk.direct_messages.models#xdk.direct_messages.models.GetEventsResponse) - * [Module contents](/xdks/python/reference/xdk.direct_messages#module-xdk.direct_messages) - * [`DirectMessagesClient`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient) - * [`DirectMessagesClient.__init__()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.__init__) - * [`DirectMessagesClient.create_by_conversation_id()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.create_by_conversation_id) - * [`DirectMessagesClient.create_by_participant_id()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.create_by_participant_id) - * [`DirectMessagesClient.create_conversation()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.create_conversation) - * [`DirectMessagesClient.delete_events()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.delete_events) - * [`DirectMessagesClient.get_events()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.get_events) - * [`DirectMessagesClient.get_events_by_conversation_id()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.get_events_by_conversation_id) - * [`DirectMessagesClient.get_events_by_id()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.get_events_by_id) - * [`DirectMessagesClient.get_events_by_participant_id()`](/xdks/python/reference/xdk.direct_messages#xdk.direct_messages.DirectMessagesClient.get_events_by_participant_id) -* [xdk.general package](/xdks/python/reference/xdk.general) - * [Submodules](/xdks/python/reference/xdk.general#submodules) - * [xdk.general.client module](/xdks/python/reference/xdk.general.client) - * [`GeneralClient`](/xdks/python/reference/xdk.general.client#xdk.general.client.GeneralClient) - * [xdk.general.models module](/xdks/python/reference/xdk.general.models) - * [`GetOpenApiSpecResponse`](/xdks/python/reference/xdk.general.models#xdk.general.models.GetOpenApiSpecResponse) - * [Module contents](/xdks/python/reference/xdk.general#module-xdk.general) - * [`GeneralClient`](/xdks/python/reference/xdk.general#xdk.general.GeneralClient) - * [`GeneralClient.__init__()`](/xdks/python/reference/xdk.general#xdk.general.GeneralClient.__init__) - * [`GeneralClient.get_open_api_spec()`](/xdks/python/reference/xdk.general#xdk.general.GeneralClient.get_open_api_spec) -* [xdk.lists package](/xdks/python/reference/xdk.lists) - * [Submodules](/xdks/python/reference/xdk.lists#submodules) - * [xdk.lists.client module](/xdks/python/reference/xdk.lists.client) - * [`ListsClient`](/xdks/python/reference/xdk.lists.client#xdk.lists.client.ListsClient) - * [xdk.lists.models module](/xdks/python/reference/xdk.lists.models) - * [`AddMemberRequest`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.AddMemberRequest) - * [`AddMemberResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.AddMemberResponse) - * [`CreateRequest`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.CreateRequest) - * [`CreateResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.CreateResponse) - * [`DeleteResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.DeleteResponse) - * [`GetByIdResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetByIdResponse) - * [`GetFollowersResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetFollowersResponse) - * [`GetMembersResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetMembersResponse) - * [`GetPostsResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.GetPostsResponse) - * [`RemoveMemberByUserIdResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.RemoveMemberByUserIdResponse) - * [`UpdateRequest`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.UpdateRequest) - * [`UpdateResponse`](/xdks/python/reference/xdk.lists.models#xdk.lists.models.UpdateResponse) - * [Module contents](/xdks/python/reference/xdk.lists#module-xdk.lists) - * [`ListsClient`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient) - * [`ListsClient.__init__()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.__init__) - * [`ListsClient.add_member()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.add_member) - * [`ListsClient.create()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.create) - * [`ListsClient.delete()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.delete) - * [`ListsClient.get_by_id()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.get_by_id) - * [`ListsClient.get_followers()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.get_followers) - * [`ListsClient.get_members()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.get_members) - * [`ListsClient.get_posts()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.get_posts) - * [`ListsClient.remove_member_by_user_id()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.remove_member_by_user_id) - * [`ListsClient.update()`](/xdks/python/reference/xdk.lists#xdk.lists.ListsClient.update) -* [xdk.media package](/xdks/python/reference/xdk.media) - * [Submodules](/xdks/python/reference/xdk.media#submodules) - * [xdk.media.client module](/xdks/python/reference/xdk.media.client) - * [`MediaClient`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient) - * [xdk.media.models module](/xdks/python/reference/xdk.media.models) - * [`AppendUploadRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.AppendUploadRequest) - * [`AppendUploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.AppendUploadResponse) - * [`CreateMetadataRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateMetadataRequest) - * [`CreateMetadataResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateMetadataResponse) - * [`CreateSubtitlesRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateSubtitlesRequest) - * [`CreateSubtitlesResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateSubtitlesResponse) - * [`DeleteSubtitlesRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.DeleteSubtitlesRequest) - * [`DeleteSubtitlesResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.DeleteSubtitlesResponse) - * [`FinalizeUploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.FinalizeUploadResponse) - * [`GetAnalyticsResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetAnalyticsResponse) - * [`GetByKeyResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetByKeyResponse) - * [`GetByKeysResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetByKeysResponse) - * [`GetUploadStatusResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetUploadStatusResponse) - * [`InitializeUploadRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.InitializeUploadRequest) - * [`InitializeUploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.InitializeUploadResponse) - * [`UploadRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.UploadRequest) - * [`UploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.UploadResponse) - * [Module contents](/xdks/python/reference/xdk.media#module-xdk.media) - * [`MediaClient`](/xdks/python/reference/xdk.media#xdk.media.MediaClient) - * [`MediaClient.__init__()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.__init__) - * [`MediaClient.append_upload()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.append_upload) - * [`MediaClient.create_metadata()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.create_metadata) - * [`MediaClient.create_subtitles()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.create_subtitles) - * [`MediaClient.delete_subtitles()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.delete_subtitles) - * [`MediaClient.finalize_upload()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.finalize_upload) - * [`MediaClient.get_analytics()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.get_analytics) - * [`MediaClient.get_by_key()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.get_by_key) - * [`MediaClient.get_by_keys()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.get_by_keys) - * [`MediaClient.get_upload_status()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.get_upload_status) - * [`MediaClient.initialize_upload()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.initialize_upload) - * [`MediaClient.upload()`](/xdks/python/reference/xdk.media#xdk.media.MediaClient.upload) -* [xdk.news package](/xdks/python/reference/xdk.news) - * [Submodules](/xdks/python/reference/xdk.news#submodules) - * [xdk.news.client module](/xdks/python/reference/xdk.news.client) - * [`NewsClient`](/xdks/python/reference/xdk.news.client#xdk.news.client.NewsClient) - * [xdk.news.models module](/xdks/python/reference/xdk.news.models) - * [`GetResponse`](/xdks/python/reference/xdk.news.models#xdk.news.models.GetResponse) - * [`SearchResponse`](/xdks/python/reference/xdk.news.models#xdk.news.models.SearchResponse) - * [Module contents](/xdks/python/reference/xdk.news#module-xdk.news) - * [`NewsClient`](/xdks/python/reference/xdk.news#xdk.news.NewsClient) - * [`NewsClient.__init__()`](/xdks/python/reference/xdk.news#xdk.news.NewsClient.__init__) - * [`NewsClient.get()`](/xdks/python/reference/xdk.news#xdk.news.NewsClient.get) - * [`NewsClient.search()`](/xdks/python/reference/xdk.news#xdk.news.NewsClient.search) -* [xdk.posts package](/xdks/python/reference/xdk.posts) - * [Submodules](/xdks/python/reference/xdk.posts#submodules) - * [xdk.posts.client module](/xdks/python/reference/xdk.posts.client) - * [`PostsClient`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient) - * [xdk.posts.models module](/xdks/python/reference/xdk.posts.models) - * [`CreateRequest`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.CreateRequest) - * [`CreateResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.CreateResponse) - * [`DeleteResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.DeleteResponse) - * [`GetAnalyticsResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetAnalyticsResponse) - * [`GetByIdResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetByIdResponse) - * [`GetByIdsResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetByIdsResponse) - * [`GetCountsAllResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetCountsAllResponse) - * [`GetCountsRecentResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetCountsRecentResponse) - * [`GetInsights28hrResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetInsights28hrResponse) - * [`GetInsightsHistoricalResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetInsightsHistoricalResponse) - * [`GetLikingUsersResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetLikingUsersResponse) - * [`GetQuotedResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetQuotedResponse) - * [`GetRepostedByResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetRepostedByResponse) - * [`GetRepostsResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetRepostsResponse) - * [`HideReplyRequest`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.HideReplyRequest) - * [`HideReplyResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.HideReplyResponse) - * [`SearchAllResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.SearchAllResponse) - * [`SearchRecentResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.SearchRecentResponse) - * [Module contents](/xdks/python/reference/xdk.posts#module-xdk.posts) - * [`PostsClient`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient) - * [`PostsClient.__init__()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.__init__) - * [`PostsClient.create()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.create) - * [`PostsClient.delete()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.delete) - * [`PostsClient.get_analytics()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_analytics) - * [`PostsClient.get_by_id()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_by_id) - * [`PostsClient.get_by_ids()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_by_ids) - * [`PostsClient.get_counts_all()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_counts_all) - * [`PostsClient.get_counts_recent()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_counts_recent) - * [`PostsClient.get_insights28hr()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_insights28hr) - * [`PostsClient.get_insights_historical()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_insights_historical) - * [`PostsClient.get_liking_users()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_liking_users) - * [`PostsClient.get_quoted()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_quoted) - * [`PostsClient.get_reposted_by()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_reposted_by) - * [`PostsClient.get_reposts()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.get_reposts) - * [`PostsClient.hide_reply()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.hide_reply) - * [`PostsClient.search_all()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.search_all) - * [`PostsClient.search_recent()`](/xdks/python/reference/xdk.posts#xdk.posts.PostsClient.search_recent) -* [xdk.spaces package](/xdks/python/reference/xdk.spaces) - * [Submodules](/xdks/python/reference/xdk.spaces#submodules) - * [xdk.spaces.client module](/xdks/python/reference/xdk.spaces.client) - * [`SpacesClient`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient) - * [xdk.spaces.models module](/xdks/python/reference/xdk.spaces.models) - * [`GetBuyersResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetBuyersResponse) - * [`GetByCreatorIdsResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByCreatorIdsResponse) - * [`GetByIdResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByIdResponse) - * [`GetByIdsResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByIdsResponse) - * [`GetPostsResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetPostsResponse) - * [`SearchResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.SearchResponse) - * [Module contents](/xdks/python/reference/xdk.spaces#module-xdk.spaces) - * [`SpacesClient`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient) - * [`SpacesClient.__init__()`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient.__init__) - * [`SpacesClient.get_buyers()`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient.get_buyers) - * [`SpacesClient.get_by_creator_ids()`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient.get_by_creator_ids) - * [`SpacesClient.get_by_id()`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient.get_by_id) - * [`SpacesClient.get_by_ids()`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient.get_by_ids) - * [`SpacesClient.get_posts()`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient.get_posts) - * [`SpacesClient.search()`](/xdks/python/reference/xdk.spaces#xdk.spaces.SpacesClient.search) -* [xdk.stream package](/xdks/python/reference/xdk.stream) - * [Submodules](/xdks/python/reference/xdk.stream#submodules) - * [xdk.stream.client module](/xdks/python/reference/xdk.stream.client) - * [`StreamClient`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient) - * [xdk.stream.models module](/xdks/python/reference/xdk.stream.models) - * [`GetRuleCountsResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.GetRuleCountsResponse) - * [`GetRulesResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.GetRulesResponse) - * [`LabelsComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LabelsComplianceResponse) - * [`LikesComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesComplianceResponse) - * [`LikesFirehoseResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesFirehoseResponse) - * [`LikesSample10Response`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesSample10Response) - * [`PostsComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsComplianceResponse) - * [`PostsFirehoseEnResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseEnResponse) - * [`PostsFirehoseJaResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseJaResponse) - * [`PostsFirehoseKoResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseKoResponse) - * [`PostsFirehosePtResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehosePtResponse) - * [`PostsFirehoseResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseResponse) - * [`PostsResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsResponse) - * [`PostsSample10Response`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsSample10Response) - * [`PostsSampleResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsSampleResponse) - * [`UpdateRulesRequest`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UpdateRulesRequest) - * [`UpdateRulesResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UpdateRulesResponse) - * [`UsersComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UsersComplianceResponse) - * [Module contents](/xdks/python/reference/xdk.stream#module-xdk.stream) - * [`StreamClient`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient) - * [`StreamClient.__init__()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.__init__) - * [`StreamClient.get_rule_counts()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.get_rule_counts) - * [`StreamClient.get_rules()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.get_rules) - * [`StreamClient.labels_compliance()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.labels_compliance) - * [`StreamClient.likes_compliance()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.likes_compliance) - * [`StreamClient.likes_firehose()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.likes_firehose) - * [`StreamClient.likes_sample10()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.likes_sample10) - * [`StreamClient.posts()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts) - * [`StreamClient.posts_compliance()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_compliance) - * [`StreamClient.posts_firehose()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_firehose) - * [`StreamClient.posts_firehose_en()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_firehose_en) - * [`StreamClient.posts_firehose_ja()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_firehose_ja) - * [`StreamClient.posts_firehose_ko()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_firehose_ko) - * [`StreamClient.posts_firehose_pt()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_firehose_pt) - * [`StreamClient.posts_sample()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_sample) - * [`StreamClient.posts_sample10()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.posts_sample10) - * [`StreamClient.update_rules()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.update_rules) - * [`StreamClient.users_compliance()`](/xdks/python/reference/xdk.stream#xdk.stream.StreamClient.users_compliance) -* [xdk.trends package](/xdks/python/reference/xdk.trends) - * [Submodules](/xdks/python/reference/xdk.trends#submodules) - * [xdk.trends.client module](/xdks/python/reference/xdk.trends.client) - * [`TrendsClient`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient) - * [xdk.trends.models module](/xdks/python/reference/xdk.trends.models) - * [`GetAiResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetAiResponse) - * [`GetByWoeidResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetByWoeidResponse) - * [`GetPersonalizedResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetPersonalizedResponse) - * [Module contents](/xdks/python/reference/xdk.trends#module-xdk.trends) - * [`TrendsClient`](/xdks/python/reference/xdk.trends#xdk.trends.TrendsClient) - * [`TrendsClient.__init__()`](/xdks/python/reference/xdk.trends#xdk.trends.TrendsClient.__init__) - * [`TrendsClient.get_ai()`](/xdks/python/reference/xdk.trends#xdk.trends.TrendsClient.get_ai) - * [`TrendsClient.get_by_woeid()`](/xdks/python/reference/xdk.trends#xdk.trends.TrendsClient.get_by_woeid) - * [`TrendsClient.get_personalized()`](/xdks/python/reference/xdk.trends#xdk.trends.TrendsClient.get_personalized) -* [xdk.usage package](/xdks/python/reference/xdk.usage) - * [Submodules](/xdks/python/reference/xdk.usage#submodules) - * [xdk.usage.client module](/xdks/python/reference/xdk.usage.client) - * [`UsageClient`](/xdks/python/reference/xdk.usage.client#xdk.usage.client.UsageClient) - * [xdk.usage.models module](/xdks/python/reference/xdk.usage.models) - * [`GetResponse`](/xdks/python/reference/xdk.usage.models#xdk.usage.models.GetResponse) - * [Module contents](/xdks/python/reference/xdk.usage#module-xdk.usage) - * [`UsageClient`](/xdks/python/reference/xdk.usage#xdk.usage.UsageClient) - * [`UsageClient.__init__()`](/xdks/python/reference/xdk.usage#xdk.usage.UsageClient.__init__) - * [`UsageClient.get()`](/xdks/python/reference/xdk.usage#xdk.usage.UsageClient.get) -* [xdk.users package](/xdks/python/reference/xdk.users) - * [Submodules](/xdks/python/reference/xdk.users#submodules) - * [xdk.users.client module](/xdks/python/reference/xdk.users.client) - * [`UsersClient`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient) - * [xdk.users.models module](/xdks/python/reference/xdk.users.models) - * [`BlockDmsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.BlockDmsResponse) - * [`CreateBookmarkRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.CreateBookmarkRequest) - * [`CreateBookmarkResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.CreateBookmarkResponse) - * [`DeleteBookmarkResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.DeleteBookmarkResponse) - * [`FollowListRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowListRequest) - * [`FollowListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowListResponse) - * [`FollowUserRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowUserRequest) - * [`FollowUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowUserResponse) - * [`GetBlockingResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBlockingResponse) - * [`GetBookmarkFoldersResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarkFoldersResponse) - * [`GetBookmarksByFolderIdResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarksByFolderIdResponse) - * [`GetBookmarksResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarksResponse) - * [`GetByIdResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByIdResponse) - * [`GetByIdsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByIdsResponse) - * [`GetByUsernameResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByUsernameResponse) - * [`GetByUsernamesResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByUsernamesResponse) - * [`GetFollowedListsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowedListsResponse) - * [`GetFollowersResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowersResponse) - * [`GetFollowingResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowingResponse) - * [`GetLikedPostsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetLikedPostsResponse) - * [`GetListMembershipsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetListMembershipsResponse) - * [`GetMeResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMeResponse) - * [`GetMentionsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMentionsResponse) - * [`GetMutingResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMutingResponse) - * [`GetOwnedListsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetOwnedListsResponse) - * [`GetPinnedListsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetPinnedListsResponse) - * [`GetPostsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetPostsResponse) - * [`GetRepostsOfMeResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetRepostsOfMeResponse) - * [`GetTimelineResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetTimelineResponse) - * [`LikePostRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.LikePostRequest) - * [`LikePostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.LikePostResponse) - * [`MuteUserRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.MuteUserRequest) - * [`MuteUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.MuteUserResponse) - * [`PinListRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.PinListRequest) - * [`PinListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.PinListResponse) - * [`RepostPostRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.RepostPostRequest) - * [`RepostPostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.RepostPostResponse) - * [`SearchResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.SearchResponse) - * [`UnblockDmsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnblockDmsResponse) - * [`UnfollowListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnfollowListResponse) - * [`UnfollowUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnfollowUserResponse) - * [`UnlikePostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnlikePostResponse) - * [`UnmuteUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnmuteUserResponse) - * [`UnpinListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnpinListResponse) - * [`UnrepostPostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnrepostPostResponse) - * [Module contents](/xdks/python/reference/xdk.users#module-xdk.users) - * [`UsersClient`](/xdks/python/reference/xdk.users#xdk.users.UsersClient) - * [`UsersClient.__init__()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.__init__) - * [`UsersClient.block_dms()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.block_dms) - * [`UsersClient.create_bookmark()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.create_bookmark) - * [`UsersClient.delete_bookmark()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.delete_bookmark) - * [`UsersClient.follow_list()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.follow_list) - * [`UsersClient.follow_user()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.follow_user) - * [`UsersClient.get_blocking()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_blocking) - * [`UsersClient.get_bookmark_folders()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_bookmark_folders) - * [`UsersClient.get_bookmarks()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_bookmarks) - * [`UsersClient.get_bookmarks_by_folder_id()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_bookmarks_by_folder_id) - * [`UsersClient.get_by_id()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_by_id) - * [`UsersClient.get_by_ids()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_by_ids) - * [`UsersClient.get_by_username()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_by_username) - * [`UsersClient.get_by_usernames()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_by_usernames) - * [`UsersClient.get_followed_lists()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_followed_lists) - * [`UsersClient.get_followers()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_followers) - * [`UsersClient.get_following()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_following) - * [`UsersClient.get_liked_posts()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_liked_posts) - * [`UsersClient.get_list_memberships()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_list_memberships) - * [`UsersClient.get_me()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_me) - * [`UsersClient.get_mentions()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_mentions) - * [`UsersClient.get_muting()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_muting) - * [`UsersClient.get_owned_lists()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_owned_lists) - * [`UsersClient.get_pinned_lists()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_pinned_lists) - * [`UsersClient.get_posts()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_posts) - * [`UsersClient.get_reposts_of_me()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_reposts_of_me) - * [`UsersClient.get_timeline()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.get_timeline) - * [`UsersClient.like_post()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.like_post) - * [`UsersClient.mute_user()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.mute_user) - * [`UsersClient.pin_list()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.pin_list) - * [`UsersClient.repost_post()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.repost_post) - * [`UsersClient.search()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.search) - * [`UsersClient.unblock_dms()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.unblock_dms) - * [`UsersClient.unfollow_list()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.unfollow_list) - * [`UsersClient.unfollow_user()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.unfollow_user) - * [`UsersClient.unlike_post()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.unlike_post) - * [`UsersClient.unmute_user()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.unmute_user) - * [`UsersClient.unpin_list()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.unpin_list) - * [`UsersClient.unrepost_post()`](/xdks/python/reference/xdk.users#xdk.users.UsersClient.unrepost_post) -* [xdk.webhooks package](/xdks/python/reference/xdk.webhooks) - * [Submodules](/xdks/python/reference/xdk.webhooks#submodules) - * [xdk.webhooks.client module](/xdks/python/reference/xdk.webhooks.client) - * [`WebhooksClient`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient) - * [xdk.webhooks.models module](/xdks/python/reference/xdk.webhooks.models) - * [`CreateRequest`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateRequest) - * [`CreateResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateResponse) - * [`CreateStreamLinkResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateStreamLinkResponse) - * [`CreateWebhookReplayJobRequest`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateWebhookReplayJobRequest) - * [`CreateWebhookReplayJobResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateWebhookReplayJobResponse) - * [`DeleteResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.DeleteResponse) - * [`DeleteStreamLinkResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.DeleteStreamLinkResponse) - * [`GetResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.GetResponse) - * [`GetStreamLinksResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.GetStreamLinksResponse) - * [`ValidateResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.ValidateResponse) - * [Module contents](/xdks/python/reference/xdk.webhooks#module-xdk.webhooks) - * [`WebhooksClient`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient) - * [`WebhooksClient.__init__()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.__init__) - * [`WebhooksClient.create()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.create) - * [`WebhooksClient.create_stream_link()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.create_stream_link) - * [`WebhooksClient.create_webhook_replay_job()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.create_webhook_replay_job) - * [`WebhooksClient.delete()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.delete) - * [`WebhooksClient.delete_stream_link()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.delete_stream_link) - * [`WebhooksClient.get()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.get) - * [`WebhooksClient.get_stream_links()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.get_stream_links) - * [`WebhooksClient.validate()`](/xdks/python/reference/xdk.webhooks#xdk.webhooks.WebhooksClient.validate) - -## Submodules - -* [xdk.client module](/xdks/python/reference/xdk.client) - * [`Client`](/xdks/python/reference/xdk.client#xdk.client.Client) - * [`Client.__init__()`](/xdks/python/reference/xdk.client#xdk.client.Client.__init__) - * [`Client.access_token`](/xdks/python/reference/xdk.client#xdk.client.Client.access_token) - * [`Client.exchange_code()`](/xdks/python/reference/xdk.client#xdk.client.Client.exchange_code) - * [`Client.fetch_token()`](/xdks/python/reference/xdk.client#xdk.client.Client.fetch_token) - * [`Client.get_authorization_url()`](/xdks/python/reference/xdk.client#xdk.client.Client.get_authorization_url) - * [`Client.is_token_expired()`](/xdks/python/reference/xdk.client#xdk.client.Client.is_token_expired) - * [`Client.oauth2_session`](/xdks/python/reference/xdk.client#xdk.client.Client.oauth2_session) - * [`Client.refresh_token()`](/xdks/python/reference/xdk.client#xdk.client.Client.refresh_token) - * [`Client.token`](/xdks/python/reference/xdk.client#xdk.client.Client.token) -* [xdk.oauth1_auth module](/xdks/python/reference/xdk.oauth1_auth) - * [`OAuth1`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1) - * [`OAuth1.__init__()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1.__init__) - * [`OAuth1.build_request_header()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1.build_request_header) - * [`OAuth1.get_access_token()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1.get_access_token) - * [`OAuth1.get_authorization_url()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1.get_authorization_url) - * [`OAuth1.get_request_token()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1.get_request_token) - * [`OAuth1.start_oauth_flow()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1.start_oauth_flow) - * [`OAuth1AccessToken`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1AccessToken) - * [`OAuth1AccessToken.__init__()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1AccessToken.__init__) - * [`OAuth1RequestToken`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1RequestToken) - * [`OAuth1RequestToken.__init__()`](/xdks/python/reference/xdk.oauth1_auth#xdk.oauth1_auth.OAuth1RequestToken.__init__) -* [xdk.oauth2_auth module](/xdks/python/reference/xdk.oauth2_auth) - * [`OAuth2PKCEAuth`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth) - * [`OAuth2PKCEAuth.__init__()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.__init__) - * [`OAuth2PKCEAuth.access_token`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.access_token) - * [`OAuth2PKCEAuth.exchange_code()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.exchange_code) - * [`OAuth2PKCEAuth.fetch_token()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.fetch_token) - * [`OAuth2PKCEAuth.get_authorization_url()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.get_authorization_url) - * [`OAuth2PKCEAuth.get_code_challenge()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.get_code_challenge) - * [`OAuth2PKCEAuth.get_code_verifier()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.get_code_verifier) - * [`OAuth2PKCEAuth.is_token_expired()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.is_token_expired) - * [`OAuth2PKCEAuth.refresh_token()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.refresh_token) - * [`OAuth2PKCEAuth.set_pkce_parameters()`](/xdks/python/reference/xdk.oauth2_auth#xdk.oauth2_auth.OAuth2PKCEAuth.set_pkce_parameters) -* [xdk.paginator module](/xdks/python/reference/xdk.paginator) - * [`Cursor`](/xdks/python/reference/xdk.paginator#xdk.paginator.Cursor) - * [`Cursor.__init__()`](/xdks/python/reference/xdk.paginator#xdk.paginator.Cursor.__init__) - * [`Cursor.items()`](/xdks/python/reference/xdk.paginator#xdk.paginator.Cursor.items) - * [`Cursor.pages()`](/xdks/python/reference/xdk.paginator#xdk.paginator.Cursor.pages) - * [`PaginatableMethod`](/xdks/python/reference/xdk.paginator#xdk.paginator.PaginatableMethod) - * [`PaginatableMethod.__init__()`](/xdks/python/reference/xdk.paginator#xdk.paginator.PaginatableMethod.__init__) - * [`PaginationError`](/xdks/python/reference/xdk.paginator#xdk.paginator.PaginationError) - * [`cursor()`](/xdks/python/reference/xdk.paginator#xdk.paginator.cursor) -* [xdk.streaming module](/xdks/python/reference/xdk.streaming) - * [`StreamConfig`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig) - * [`StreamConfig.max_retries`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.max_retries) - * [`StreamConfig.initial_backoff`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.initial_backoff) - * [`StreamConfig.max_backoff`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.max_backoff) - * [`StreamConfig.backoff_multiplier`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.backoff_multiplier) - * [`StreamConfig.jitter`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.jitter) - * [`StreamConfig.timeout`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.timeout) - * [`StreamConfig.chunk_size`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.chunk_size) - * [`StreamConfig.on_connect`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.on_connect) - * [`StreamConfig.on_disconnect`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.on_disconnect) - * [`StreamConfig.on_reconnect`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.on_reconnect) - * [`StreamConfig.on_error`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.on_error) - * [`StreamConfig.__init__()`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamConfig.__init__) - * [`StreamConfig.backoff_multiplier`](/xdks/python/reference/xdk.streaming#id0) - * [`StreamConfig.chunk_size`](/xdks/python/reference/xdk.streaming#id1) - * [`StreamConfig.initial_backoff`](/xdks/python/reference/xdk.streaming#id2) - * [`StreamConfig.jitter`](/xdks/python/reference/xdk.streaming#id3) - * [`StreamConfig.max_backoff`](/xdks/python/reference/xdk.streaming#id4) - * [`StreamConfig.max_retries`](/xdks/python/reference/xdk.streaming#id5) - * [`StreamConfig.on_connect`](/xdks/python/reference/xdk.streaming#id6) - * [`StreamConfig.on_disconnect`](/xdks/python/reference/xdk.streaming#id7) - * [`StreamConfig.on_error`](/xdks/python/reference/xdk.streaming#id8) - * [`StreamConfig.on_reconnect`](/xdks/python/reference/xdk.streaming#id9) - * [`StreamConfig.timeout`](/xdks/python/reference/xdk.streaming#id10) - * [`StreamError`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamError) - * [`StreamError.__init__()`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamError.__init__) - * [`StreamError.is_retryable`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamError.is_retryable) - * [`StreamErrorType`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType) - * [`StreamErrorType.AUTHENTICATION_ERROR`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.AUTHENTICATION_ERROR) - * [`StreamErrorType.CLIENT_ERROR`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.CLIENT_ERROR) - * [`StreamErrorType.CONNECTION_ERROR`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.CONNECTION_ERROR) - * [`StreamErrorType.FATAL_ERROR`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.FATAL_ERROR) - * [`StreamErrorType.RATE_LIMITED`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.RATE_LIMITED) - * [`StreamErrorType.SERVER_ERROR`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.SERVER_ERROR) - * [`StreamErrorType.STREAM_INTERRUPTED`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.STREAM_INTERRUPTED) - * [`StreamErrorType.TIMEOUT`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamErrorType.TIMEOUT) - * [`StreamState`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamState) - * [`StreamState.__init__()`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamState.__init__) - * [`StreamState.current_backoff`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamState.current_backoff) - * [`StreamState.is_connected`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamState.is_connected) - * [`StreamState.last_error`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamState.last_error) - * [`StreamState.retry_count`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamState.retry_count) - * [`StreamState.total_items_received`](/xdks/python/reference/xdk.streaming#xdk.streaming.StreamState.total_items_received) - * [`stream_with_retry()`](/xdks/python/reference/xdk.streaming#xdk.streaming.stream_with_retry) - -## Module contents - -XDK Python SDK. - -A Python SDK for the X API that provides convenient access -to the X API endpoints with type safety and authentication support. - -### `class xdk.Client` - -Client for interacting with the X API. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - -### `__init__` - -Initialize the X API client. - -#### Parameters - - -The base URL for the X API (defaults to [https://api.x.com](https://api.x.com)). - - - -The bearer token for the X API (app-only authentication). - - - -The OAuth2 access token for user context (can be used directly as bearer token). - - - -The client ID for the X API (required for OAuth2 PKCE flow). - - - -The client secret for the X API. - - - -The redirect URI for OAuth2 authorization. - - - -An existing OAuth2 token dictionary (if available). If provided, access_token will be extracted. - - - -Space-separated string or list of strings for OAuth2 authorization scopes. - - - -The base URL for OAuth2 authorization (defaults to [https://x.com/i](https://x.com/i)). - - - -OAuth1 instance for OAuth1.0a authentication. - - -### `exchange_code` - -Exchange authorization code for tokens (matches TypeScript API). - -#### Parameters - - -The authorization code from the callback. - - - -Optional code verifier (uses stored verifier if not provided). - - -### `fetch_token` - -Fetch token using authorization response URL (legacy method). - -#### Parameters - - -The full callback URL received after authorization. - - -### `get_authorization_url` - -Get the authorization URL for the OAuth2 PKCE flow. - -#### Parameters - - -Optional state parameter for security. - - -### `is_token_expired` - -Check if the OAuth2 token is expired. - -### `refresh_token` - -Refresh the OAuth2 token. - -### `class xdk.Cursor` - -[`ResponseType`] - -#### Parameters - - - -### `__init__` - -Initialize the cursor. - -#### Parameters - - -The API method to call for each page (must support pagination) - - -### `items` - -Iterate over individual items from paginated responses. - -#### Parameters - - -Maximum number of items to return (None for unlimited) - - -#### Returns - -`IteratorAny` - -### `pages` - -Iterate over pages of responses. - -#### Parameters - - -Maximum number of pages to return (None for unlimited) - - -#### Returns - -`IteratorResponseType` - -### `class xdk.StreamConfig` - -Configuration for streaming connections with retry behavior. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -### `__init__` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -### `on_error : Callable[[[StreamError]` - -### `exception xdk.StreamError` - -Exception raised for streaming errors with classification. - -#### Parameters - - - - - -### `__init__` - -#### Parameters - - - - - -### `class xdk.StreamErrorType` - -Classification of streaming errors for retry decisions. - -#### Parameters - - - -### `class xdk.StreamState` - -Internal state for a streaming connection. - -#### Parameters - - - - - - - - - - - -### `__init__` - -#### Parameters - - - - - - - - - - - -### `last_error : [StreamError]` - -### `xdk.cursor` - -Create a cursor with proper type inference and validation. -This factory function helps with type inference so you get proper -type hints for the response type, and validates that the method -supports pagination at both static analysis and runtime. - -#### Parameters - - -The API method to wrap (must support pagination) - - diff --git a/xdks/python/reference/xdk.media.client.mdx b/xdks/python/reference/xdk.media.client.mdx deleted file mode 100644 index d983b87e9..000000000 --- a/xdks/python/reference/xdk.media.client.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -title: "MediaClient" -sidebarTitle: "MediaClient" -description: "Reference for the media.client Python module in the X API SDK. Client class and methods for calling the media endpoints of the X API v2." ---- - -## MediaClient - -Class - -Bases: object - -Client for media operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `append_upload` - -Append Media upload -Appends data to a Media upload request. - -#### Parameters - - -The media identifier for the media to perform the append operation. - - - -Request body - - -### `create_metadata` - -Create Media metadata -Creates metadata for a Media file. -body: Request body -:returns: Response data -:rtype: CreateMetadataResponse - -#### Parameters - - - -### `create_subtitles` - -Create Media subtitles -Creates subtitles for a specific Media file. -body: Request body -:returns: Response data -:rtype: CreateSubtitlesResponse - -#### Parameters - - - -### `delete_subtitles` - -Delete Media subtitles -Deletes subtitles for a specific Media file. -body: Request body -:returns: Response data -:rtype: DeleteSubtitlesResponse - -#### Parameters - - - -### `finalize_upload` - -Finalize Media upload -Finalizes a Media upload request. - -#### Parameters - - -The media id of the targeted media to finalize. - - -#### Returns - -`FinalizeUploadResponse` - Response data - -### `get_analytics` - -Get Media analytics -Retrieves analytics data for media. - -#### Parameters - - -A comma separated list of Media Keys. Up to 100 are allowed in a single request. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. - - - -The granularity for the search counts results. - - - -A comma separated list of MediaAnalytics fields to display. - - -#### Returns - -`GetAnalyticsResponse` - Response data - -### `get_by_key` - -Get Media by media key -Retrieves details of a specific Media file by its media key. - -#### Parameters - - -A single Media Key. - - - -A comma separated list of Media fields to display. - - -#### Returns - -`GetByKeyResponse` - Response data - -### `get_by_keys` - -Get Media by media keys -Retrieves details of Media files by their media keys. - -#### Parameters - - -A comma separated list of Media Keys. Up to 100 are allowed in a single request. - - - -A comma separated list of Media fields to display. - - -#### Returns - -`GetByKeysResponse` - Response data - -### `get_upload_status` - -Get Media upload status -Retrieves the status of a Media upload by its ID. - -#### Parameters - - -Media id for the requested media upload status. - - - -The command for the media upload request. - - -#### Returns - -`GetUploadStatusResponse` - Response data - -### `initialize_upload` - -Initialize media upload -Initializes a media upload. -body: Request body -:returns: Response data -:rtype: InitializeUploadResponse - -#### Parameters - - - -### `upload` - -Upload media -Uploads a media file for use in posts or other content. -body: Request body -:returns: Response data -:rtype: UploadResponse - -#### Parameters - - - diff --git a/xdks/python/reference/xdk.media.mdx b/xdks/python/reference/xdk.media.mdx deleted file mode 100644 index e72fb24c1..000000000 --- a/xdks/python/reference/xdk.media.mdx +++ /dev/null @@ -1,255 +0,0 @@ ---- -title: "MediaClient" -sidebarTitle: "MediaClient" -description: "Reference for the media Python package in the X API SDK, grouping the client and Pydantic models for the media endpoints of the X API v2." ---- - -## Submodules - -* [xdk.media.client module](/xdks/python/reference/xdk.media.client) - * [`MediaClient`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient) - * [`MediaClient.__init__()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.__init__) - * [`MediaClient.append_upload()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.append_upload) - * [`MediaClient.create_metadata()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.create_metadata) - * [`MediaClient.create_subtitles()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.create_subtitles) - * [`MediaClient.delete_subtitles()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.delete_subtitles) - * [`MediaClient.finalize_upload()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.finalize_upload) - * [`MediaClient.get_analytics()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.get_analytics) - * [`MediaClient.get_by_key()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.get_by_key) - * [`MediaClient.get_by_keys()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.get_by_keys) - * [`MediaClient.get_upload_status()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.get_upload_status) - * [`MediaClient.initialize_upload()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.initialize_upload) - * [`MediaClient.upload()`](/xdks/python/reference/xdk.media.client#xdk.media.client.MediaClient.upload) -* [xdk.media.models module](/xdks/python/reference/xdk.media.models) - * [`AppendUploadRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.AppendUploadRequest) - * [`AppendUploadRequest.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.AppendUploadRequest.model_config) - * [`AppendUploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.AppendUploadResponse) - * [`AppendUploadResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.AppendUploadResponse.model_config) - * [`CreateMetadataRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateMetadataRequest) - * [`CreateMetadataRequest.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateMetadataRequest.model_config) - * [`CreateMetadataResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateMetadataResponse) - * [`CreateMetadataResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateMetadataResponse.model_config) - * [`CreateSubtitlesRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateSubtitlesRequest) - * [`CreateSubtitlesRequest.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateSubtitlesRequest.model_config) - * [`CreateSubtitlesResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateSubtitlesResponse) - * [`CreateSubtitlesResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.CreateSubtitlesResponse.model_config) - * [`DeleteSubtitlesRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.DeleteSubtitlesRequest) - * [`DeleteSubtitlesRequest.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.DeleteSubtitlesRequest.model_config) - * [`DeleteSubtitlesResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.DeleteSubtitlesResponse) - * [`DeleteSubtitlesResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.DeleteSubtitlesResponse.model_config) - * [`FinalizeUploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.FinalizeUploadResponse) - * [`FinalizeUploadResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.FinalizeUploadResponse.model_config) - * [`GetAnalyticsResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetAnalyticsResponse) - * [`GetAnalyticsResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetAnalyticsResponse.model_config) - * [`GetByKeyResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetByKeyResponse) - * [`GetByKeyResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetByKeyResponse.model_config) - * [`GetByKeysResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetByKeysResponse) - * [`GetByKeysResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetByKeysResponse.model_config) - * [`GetUploadStatusResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetUploadStatusResponse) - * [`GetUploadStatusResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.GetUploadStatusResponse.model_config) - * [`InitializeUploadRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.InitializeUploadRequest) - * [`InitializeUploadRequest.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.InitializeUploadRequest.model_config) - * [`InitializeUploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.InitializeUploadResponse) - * [`InitializeUploadResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.InitializeUploadResponse.model_config) - * [`UploadRequest`](/xdks/python/reference/xdk.media.models#xdk.media.models.UploadRequest) - * [`UploadRequest.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.UploadRequest.model_config) - * [`UploadResponse`](/xdks/python/reference/xdk.media.models#xdk.media.models.UploadResponse) - * [`UploadResponse.model_config`](/xdks/python/reference/xdk.media.models#xdk.media.models.UploadResponse.model_config) - -## Module contents - -This module provides access to the media endpoints of the X API -and serves as the main entry point for all media-related functionality. - -### `class xdk.media.MediaClient` - -Client for media operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `append_upload` - -Append Media upload -Appends data to a Media upload request. - -#### Parameters - - -The media identifier for the media to perform the append operation. - - - -Request body - - -### `create_metadata` - -Create Media metadata -Creates metadata for a Media file. -body: Request body -:returns: Response data -:rtype: CreateMetadataResponse - -#### Parameters - - - -### `create_subtitles` - -Create Media subtitles -Creates subtitles for a specific Media file. -body: Request body -:returns: Response data -:rtype: CreateSubtitlesResponse - -#### Parameters - - - -### `delete_subtitles` - -Delete Media subtitles -Deletes subtitles for a specific Media file. -body: Request body -:returns: Response data -:rtype: DeleteSubtitlesResponse - -#### Parameters - - - -### `finalize_upload` - -Finalize Media upload -Finalizes a Media upload request. - -#### Parameters - - -The media id of the targeted media to finalize. - - -#### Returns - -`FinalizeUploadResponse` - Response data - -### `get_analytics` - -Get Media analytics -Retrieves analytics data for media. - -#### Parameters - - -A comma separated list of Media Keys. Up to 100 are allowed in a single request. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. - - - -The granularity for the search counts results. - - - -A comma separated list of MediaAnalytics fields to display. - - -#### Returns - -`GetAnalyticsResponse` - Response data - -### `get_by_key` - -Get Media by media key -Retrieves details of a specific Media file by its media key. - -#### Parameters - - -A single Media Key. - - - -A comma separated list of Media fields to display. - - -#### Returns - -`GetByKeyResponse` - Response data - -### `get_by_keys` - -Get Media by media keys -Retrieves details of Media files by their media keys. - -#### Parameters - - -A comma separated list of Media Keys. Up to 100 are allowed in a single request. - - - -A comma separated list of Media fields to display. - - -#### Returns - -`GetByKeysResponse` - Response data - -### `get_upload_status` - -Get Media upload status -Retrieves the status of a Media upload by its ID. - -#### Parameters - - -Media id for the requested media upload status. - - - -The command for the media upload request. - - -#### Returns - -`GetUploadStatusResponse` - Response data - -### `initialize_upload` - -Initialize media upload -Initializes a media upload. -body: Request body -:returns: Response data -:rtype: InitializeUploadResponse - -#### Parameters - - - -### `upload` - -Upload media -Uploads a media file for use in posts or other content. -body: Request body -:returns: Response data -:rtype: UploadResponse - -#### Parameters - - - diff --git a/xdks/python/reference/xdk.media.models.mdx b/xdks/python/reference/xdk.media.models.mdx deleted file mode 100644 index 37895acf1..000000000 --- a/xdks/python/reference/xdk.media.models.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "Media.Models" -sidebarTitle: "Media.Models" -description: "Reference for the media.models Python module in the X API SDK. Pydantic request and response models for the media endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the media endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.media.models.AppendUploadRequest - -Request model for append_upload - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## AppendUploadResponse - -Class - -Bases: BaseModel - -Response model for append_upload - -## Methods - -### `class xdk.media.models.AppendUploadResponse` - -Response model for append_upload - -### `class xdk.media.models.CreateMetadataResponse` - -Response model for create_metadata - -### `class xdk.media.models.CreateSubtitlesResponse` - -Response model for create_subtitles - -### `class xdk.media.models.DeleteSubtitlesResponse` - -Response model for delete_subtitles - -### `class xdk.media.models.FinalizeUploadResponse` - -Response model for finalize_upload - -### `class xdk.media.models.GetAnalyticsResponse` - -Response model for get_analytics - -### `class xdk.media.models.GetByKeyResponse` - -Response model for get_by_key - -### `class xdk.media.models.GetByKeysResponse` - -Response model for get_by_keys - -### `class xdk.media.models.GetUploadStatusResponse` - -Response model for get_upload_status - -### `class xdk.media.models.InitializeUploadResponse` - -Response model for initialize_upload - -### `class xdk.media.models.UploadResponse` - -Response model for upload - diff --git a/xdks/python/reference/xdk.news.client.mdx b/xdks/python/reference/xdk.news.client.mdx deleted file mode 100644 index 3cec61358..000000000 --- a/xdks/python/reference/xdk.news.client.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: "NewsClient" -sidebarTitle: "NewsClient" -description: "Reference for the news.client Python module in the X API SDK. Client class and methods for calling the news endpoints of the X API v2." ---- - -## NewsClient - -Class - -Bases: object - -Client for news operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `get` - -Get news stories by ID -Retrieves news story by its ID. - -#### Parameters - - -The ID of the news story. - - - -A comma separated list of News fields to display. - - -#### Returns - -`GetResponse` - Response data - -### `search` - -Search News -Retrieves a list of News stories matching the specified search query. - -#### Parameters - - -The search query. - - - -The number of results to return. - - - -The maximum age of the News story to search for. - - - -A comma separated list of News fields to display. - - -#### Returns - -`SearchResponse` - Response data - diff --git a/xdks/python/reference/xdk.news.mdx b/xdks/python/reference/xdk.news.mdx deleted file mode 100644 index b76189b91..000000000 --- a/xdks/python/reference/xdk.news.mdx +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "NewsClient" -sidebarTitle: "NewsClient" -description: "Reference for the news Python package in the X API SDK, grouping the client and Pydantic models for the news endpoints of the X API v2." ---- - -## Submodules - -* [xdk.news.client module](/xdks/python/reference/xdk.news.client) - * [`NewsClient`](/xdks/python/reference/xdk.news.client#xdk.news.client.NewsClient) - * [`NewsClient.__init__()`](/xdks/python/reference/xdk.news.client#xdk.news.client.NewsClient.__init__) - * [`NewsClient.get()`](/xdks/python/reference/xdk.news.client#xdk.news.client.NewsClient.get) - * [`NewsClient.search()`](/xdks/python/reference/xdk.news.client#xdk.news.client.NewsClient.search) -* [xdk.news.models module](/xdks/python/reference/xdk.news.models) - * [`GetResponse`](/xdks/python/reference/xdk.news.models#xdk.news.models.GetResponse) - * [`GetResponse.model_config`](/xdks/python/reference/xdk.news.models#xdk.news.models.GetResponse.model_config) - * [`SearchResponse`](/xdks/python/reference/xdk.news.models#xdk.news.models.SearchResponse) - * [`SearchResponse.model_config`](/xdks/python/reference/xdk.news.models#xdk.news.models.SearchResponse.model_config) - -## Module contents - -This module provides access to the news endpoints of the X API -and serves as the main entry point for all news-related functionality. - -### `class xdk.news.NewsClient` - -Client for news operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `get` - -Get news stories by ID -Retrieves news story by its ID. - -#### Parameters - - -The ID of the news story. - - - -A comma separated list of News fields to display. - - -#### Returns - -`GetResponse` - Response data - -### `search` - -Search News -Retrieves a list of News stories matching the specified search query. - -#### Parameters - - -The search query. - - - -The number of results to return. - - - -The maximum age of the News story to search for. - - - -A comma separated list of News fields to display. - - -#### Returns - -`SearchResponse` - Response data - diff --git a/xdks/python/reference/xdk.news.models.mdx b/xdks/python/reference/xdk.news.models.mdx deleted file mode 100644 index efe7a2cb2..000000000 --- a/xdks/python/reference/xdk.news.models.mdx +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: "News.Models" -sidebarTitle: "News.Models" -description: "Reference for the news.models Python module in the X API SDK. Pydantic request and response models for the news endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the news endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## GetResponse - -Class - -Bases: BaseModel - -Response model for get - -## Methods - -### `class xdk.news.models.GetResponse` - -Response model for get - -### `class xdk.news.models.SearchResponse` - -Response model for search - diff --git a/xdks/python/reference/xdk.oauth1_auth.mdx b/xdks/python/reference/xdk.oauth1_auth.mdx deleted file mode 100644 index 6e9f33729..000000000 --- a/xdks/python/reference/xdk.oauth1_auth.mdx +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: "oauth1_auth" -sidebarTitle: "oauth1_auth" -description: "Reference for the oauth1_auth Python package in the X API SDK, grouping the client and Pydantic models for the oauth1 auth endpoints of the X API v2." ---- - -This module provides OAuth1.0a authentication functionality for secure -authorization flows. Includes request token generation, authorization URL -generation, access token exchange, and OAuth1 signature generation. - -### `class xdk.oauth1_auth.OAuth1` - -OAuth1 authentication handler for the X API. - -#### Parameters - - - - - - - - - - - -### `__init__` - -Initialize OAuth1 authentication. - -#### Parameters - - -API Key (Consumer Key). - - - -API Secret (Consumer Secret). - - - -Callback URL for OAuth flow. - - - -Access Token (if already obtained). - - - -Access Token Secret (if already obtained). - - -### `build_request_header` - -Build OAuth1 authorization header for API requests. - -#### Parameters - - -HTTP method (GET, POST, etc.). - - - -Request URL (may include query parameters). - - - -Request body (form-encoded string or empty). - - -#### Returns - -`str` - -### `get_access_token` - -Exchange verifier for access token. - -#### Parameters - - -OAuth verifier from callback or PIN. - - -#### Returns - -`OAuth1AccessToken` - -### `get_authorization_url` - -Get the authorization URL for OAuth1 flow. - -#### Parameters - - -Whether to use “Log in with X” flow. - - -#### Returns - -`str` - -### `get_request_token` - -Get request token to start OAuth1 flow. -:returns: Request token with oauth_token and oauth_token_secret. -:rtype: OAuth1RequestToken - -#### Returns - -`OAuth1RequestToken` - -### `start_oauth_flow` - -Convenience method to start the OAuth1 flow. - -#### Parameters - - -Whether to use “Log in with X” flow. - - -#### Returns - -`str` - -### `class xdk.oauth1_auth.OAuth1AccessToken` - -OAuth1 access token response. - -#### Parameters - - - - - -### `__init__` - -Initialize OAuth1 access token. - -#### Parameters - - -The access token. - - - -The access token secret. - - -### `class xdk.oauth1_auth.OAuth1RequestToken` - -OAuth1 request token response. - -#### Parameters - - - - - -### `__init__` - -Initialize OAuth1 request token. - -#### Parameters - - -The OAuth token. - - - -The OAuth token secret. - - diff --git a/xdks/python/reference/xdk.oauth2_auth.mdx b/xdks/python/reference/xdk.oauth2_auth.mdx deleted file mode 100644 index 276a6341d..000000000 --- a/xdks/python/reference/xdk.oauth2_auth.mdx +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: "OAuth2PKCEAuth" -sidebarTitle: "OAuth2PKCEAuth" -description: "Reference for the oauth2_auth Python package in the X API SDK, grouping the client and Pydantic models for the oauth2 auth endpoints of the X API v2." ---- - -This module provides OAuth2 PKCE (Proof Key for Code Exchange) authentication -functionality for secure authorization flows. Includes code verifier generation, -token management, and automatic token refresh capabilities. - -### `class xdk.oauth2_auth.OAuth2PKCEAuth` - -OAuth2 PKCE authentication for the X API. - -#### Parameters - - - - - - - - - - - - - - - -### `__init__` - -Initialize the OAuth2 PKCE authentication. - -#### Parameters - - -The base URL for the X API token endpoint (defaults to [https://api.x.com](https://api.x.com)). - - - -The base URL for OAuth2 authorization (defaults to [https://x.com/i](https://x.com/i)). - - - -The client ID for the X API. - - - -The client secret for the X API. - - - -The redirect URI for OAuth2 authorization. - - - -An existing OAuth2 token dictionary (if available). - - - -Space-separated string or list of strings for OAuth2 authorization scopes. - - -### `exchange_code` - -Exchange authorization code for tokens (matches TypeScript API). - -#### Parameters - - -The authorization code from the callback. - - - -Optional code verifier (uses stored verifier if not provided). - - -#### Returns - -`Dictstr, Any` - -### `fetch_token` - -Fetch token using authorization response URL (legacy method, uses exchange_code internally). - -#### Parameters - - -The full callback URL received after authorization - - -#### Returns - -`Dictstr, Any` - -### `get_authorization_url` - -Get the authorization URL for the OAuth2 PKCE flow. - -#### Parameters - - -Optional state parameter for security. - - -#### Returns - -`str` - -### `get_code_challenge` - -Get the current code challenge (for PKCE). -:returns: The current code challenge, or None if not set. -:rtype: Optional[str] - -#### Returns - -`str | None` - -### `get_code_verifier` - -Get the current code verifier (for PKCE). -:returns: The current code verifier, or None if not set. -:rtype: Optional[str] - -#### Returns - -`str | None` - -### `is_token_expired` - -Check if the token is expired. -:returns: True if the token is expired, False otherwise. -:rtype: bool - -#### Returns - -`bool` - -### `refresh_token` - -Refresh the access token. -:returns: The refreshed token dictionary -:rtype: Dict[str, Any] - -#### Returns - -`Dictstr, Any` - -### `set_pkce_parameters` - -Manually set PKCE parameters. - -#### Parameters - - -The code verifier to use. - - - -Optional code challenge (will be generated if not provided). - - diff --git a/xdks/python/reference/xdk.paginator.mdx b/xdks/python/reference/xdk.paginator.mdx deleted file mode 100644 index 31c9b810e..000000000 --- a/xdks/python/reference/xdk.paginator.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "paginator" -sidebarTitle: "paginator" -description: "Reference for the paginator Python package in the X API SDK, grouping the client and Pydantic models for the paginator endpoints of the X API v2." ---- - -Cursor-based pagination utilities for the X API SDK. - -This module provides a Cursor class for elegant pagination support across -all API clients. The Cursor enables easy iteration over paginated results -using both .pages() and .items() methods with proper type safety. - -### `class xdk.paginator.Cursor` - -[`ResponseType`] - -#### Parameters - - - -### `__init__` - -Initialize the cursor. - -#### Parameters - - -The API method to call for each page (must support pagination) - - -### `items` - -Iterate over individual items from paginated responses. - -#### Parameters - - -Maximum number of items to return (None for unlimited) - - -#### Returns - -`IteratorAny` - -### `pages` - -Iterate over pages of responses. - -#### Parameters - - -Maximum number of pages to return (None for unlimited) - - -#### Returns - -`IteratorResponseType` - -### `class xdk.paginator.PaginatableMethod` - -[`ResponseType`] - -### `__init__` - -### `xdk.paginator.cursor` - -Create a cursor with proper type inference and validation. -This factory function helps with type inference so you get proper -type hints for the response type, and validates that the method -supports pagination at both static analysis and runtime. - -#### Parameters - - -The API method to wrap (must support pagination) - - diff --git a/xdks/python/reference/xdk.posts.client.mdx b/xdks/python/reference/xdk.posts.client.mdx deleted file mode 100644 index e02350d26..000000000 --- a/xdks/python/reference/xdk.posts.client.mdx +++ /dev/null @@ -1,639 +0,0 @@ ---- -title: "PostsClient" -sidebarTitle: "PostsClient" -description: "Reference for the posts.client Python module in the X API SDK. Client class and methods for calling the posts endpoints of the X API v2." ---- - -## PostsClient - -Class - -Bases: object - -Client for posts operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `create` - -Create or Edit Post -Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `delete` - -Delete Post -Deletes a specific Post by its ID, if owned by the authenticated user. - -#### Parameters - - -The ID of the Post to be deleted. - - -#### Returns - -`DeleteResponse` - Response data - -### `get_analytics` - -Get Post analytics -Retrieves analytics data for specified Posts within a defined time range. - -#### Parameters - - -A comma separated list of Post IDs. Up to 100 are allowed in a single request. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. - - - -The granularity for the search counts results. - - - -A comma separated list of Analytics fields to display. - - -#### Returns - -`GetAnalyticsResponse` - Response data - -### `get_by_id` - -Get Post by ID -Retrieves details of a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_by_ids` - -Get Posts by IDs -Retrieves details of multiple Posts by their IDs. - -#### Parameters - - -A comma separated list of Post IDs. Up to 100 are allowed in a single request. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`GetByIdsResponse` - Response data - -### `get_counts_all` - -Get count of all Posts -Retrieves the count of Posts matching a search query from the full archive. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -The granularity for the search counts results. - - - -A comma separated list of SearchCount fields to display. - - -#### Returns - -`IteratorGetCountsAllResponse` - -### `get_counts_recent` - -Get count of recent Posts -Retrieves the count of Posts from the last 7 days matching a search query. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -The granularity for the search counts results. - - - -A comma separated list of SearchCount fields to display. - - -#### Returns - -`IteratorGetCountsRecentResponse` - -### `get_insights28hr` - -Get 28-hour Post insights -Retrieves engagement metrics for specified Posts over the last 28 hours. - -#### Parameters - - -List of PostIds for 28hr metrics. - - - -granularity of metrics response. - - - -request metrics for historical request. - - - -A comma separated list of Engagement fields to display. - - -#### Returns - -`GetInsights28hrResponse` - Response data - -### `get_insights_historical` - -Get historical Post insights -Retrieves historical engagement metrics for specified Posts within a defined time range. - -#### Parameters - - -List of PostIds for historical metrics. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. - - - -granularity of metrics response. - - - -request metrics for historical request. - - - -A comma separated list of Engagement fields to display. - - -#### Returns - -`GetInsightsHistoricalResponse` - Response data - -### `get_liking_users` - -Get Liking Users -Retrieves a list of Users who liked a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetLikingUsersResponse` - -### `get_quoted` - -Get Quoted Posts -Retrieves a list of Posts that quote a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results to be returned. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of entities to exclude (e.g. ‘replies’ or ‘retweets’). - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetQuotedResponse` - -### `get_reposted_by` - -Get Reposted by -Retrieves a list of Users who reposted a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetRepostedByResponse` - -### `get_reposts` - -Get Reposts -Retrieves a list of Posts that repost a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetRepostsResponse` - -### `hide_reply` - -Hide reply -Hides or unhides a reply to a conversation owned by the authenticated user. - -#### Parameters - - -The ID of the reply that you want to hide or unhide. - - - -Request body - - -### `search_all` - -Search all Posts -Retrieves Posts from the full archive matching a search query. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -The maximum number of search results to be returned by a request. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This order in which to return results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorSearchAllResponse` - -### `search_recent` - -Search recent Posts -Retrieves Posts from the last 7 days matching a search query. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -The maximum number of search results to be returned by a request. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This order in which to return results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorSearchRecentResponse` - diff --git a/xdks/python/reference/xdk.posts.mdx b/xdks/python/reference/xdk.posts.mdx deleted file mode 100644 index 8bf1e67c8..000000000 --- a/xdks/python/reference/xdk.posts.mdx +++ /dev/null @@ -1,701 +0,0 @@ ---- -title: "PostsClient" -sidebarTitle: "PostsClient" -description: "Reference for the posts Python package in the X API SDK, grouping the client and Pydantic models for the posts endpoints of the X API v2." ---- - -## Submodules - -* [xdk.posts.client module](/xdks/python/reference/xdk.posts.client) - * [`PostsClient`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient) - * [`PostsClient.__init__()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.__init__) - * [`PostsClient.create()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.create) - * [`PostsClient.delete()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.delete) - * [`PostsClient.get_analytics()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_analytics) - * [`PostsClient.get_by_id()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_by_id) - * [`PostsClient.get_by_ids()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_by_ids) - * [`PostsClient.get_counts_all()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_counts_all) - * [`PostsClient.get_counts_recent()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_counts_recent) - * [`PostsClient.get_insights28hr()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_insights28hr) - * [`PostsClient.get_insights_historical()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_insights_historical) - * [`PostsClient.get_liking_users()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_liking_users) - * [`PostsClient.get_quoted()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_quoted) - * [`PostsClient.get_reposted_by()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_reposted_by) - * [`PostsClient.get_reposts()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.get_reposts) - * [`PostsClient.hide_reply()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.hide_reply) - * [`PostsClient.search_all()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.search_all) - * [`PostsClient.search_recent()`](/xdks/python/reference/xdk.posts.client#xdk.posts.client.PostsClient.search_recent) -* [xdk.posts.models module](/xdks/python/reference/xdk.posts.models) - * [`CreateRequest`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.CreateRequest) - * [`CreateRequest.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.CreateRequest.model_config) - * [`CreateResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.CreateResponse) - * [`CreateResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.CreateResponse.model_config) - * [`DeleteResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.DeleteResponse) - * [`DeleteResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.DeleteResponse.model_config) - * [`GetAnalyticsResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetAnalyticsResponse) - * [`GetAnalyticsResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetAnalyticsResponse.model_config) - * [`GetByIdResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetByIdResponse) - * [`GetByIdResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetByIdResponse.model_config) - * [`GetByIdsResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetByIdsResponse) - * [`GetByIdsResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetByIdsResponse.model_config) - * [`GetCountsAllResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetCountsAllResponse) - * [`GetCountsAllResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetCountsAllResponse.model_config) - * [`GetCountsRecentResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetCountsRecentResponse) - * [`GetCountsRecentResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetCountsRecentResponse.model_config) - * [`GetInsights28hrResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetInsights28hrResponse) - * [`GetInsights28hrResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetInsights28hrResponse.model_config) - * [`GetInsightsHistoricalResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetInsightsHistoricalResponse) - * [`GetInsightsHistoricalResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetInsightsHistoricalResponse.model_config) - * [`GetLikingUsersResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetLikingUsersResponse) - * [`GetLikingUsersResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetLikingUsersResponse.model_config) - * [`GetQuotedResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetQuotedResponse) - * [`GetQuotedResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetQuotedResponse.model_config) - * [`GetRepostedByResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetRepostedByResponse) - * [`GetRepostedByResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetRepostedByResponse.model_config) - * [`GetRepostsResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetRepostsResponse) - * [`GetRepostsResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.GetRepostsResponse.model_config) - * [`HideReplyRequest`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.HideReplyRequest) - * [`HideReplyRequest.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.HideReplyRequest.model_config) - * [`HideReplyResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.HideReplyResponse) - * [`HideReplyResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.HideReplyResponse.model_config) - * [`SearchAllResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.SearchAllResponse) - * [`SearchAllResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.SearchAllResponse.model_config) - * [`SearchRecentResponse`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.SearchRecentResponse) - * [`SearchRecentResponse.model_config`](/xdks/python/reference/xdk.posts.models#xdk.posts.models.SearchRecentResponse.model_config) - -## Module contents - -This module provides access to the posts endpoints of the X API -and serves as the main entry point for all posts-related functionality. - -### `class xdk.posts.PostsClient` - -Client for posts operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `create` - -Create or Edit Post -Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `delete` - -Delete Post -Deletes a specific Post by its ID, if owned by the authenticated user. - -#### Parameters - - -The ID of the Post to be deleted. - - -#### Returns - -`DeleteResponse` - Response data - -### `get_analytics` - -Get Post analytics -Retrieves analytics data for specified Posts within a defined time range. - -#### Parameters - - -A comma separated list of Post IDs. Up to 100 are allowed in a single request. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. - - - -The granularity for the search counts results. - - - -A comma separated list of Analytics fields to display. - - -#### Returns - -`GetAnalyticsResponse` - Response data - -### `get_by_id` - -Get Post by ID -Retrieves details of a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_by_ids` - -Get Posts by IDs -Retrieves details of multiple Posts by their IDs. - -#### Parameters - - -A comma separated list of Post IDs. Up to 100 are allowed in a single request. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`GetByIdsResponse` - Response data - -### `get_counts_all` - -Get count of all Posts -Retrieves the count of Posts matching a search query from the full archive. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -The granularity for the search counts results. - - - -A comma separated list of SearchCount fields to display. - - -#### Returns - -`IteratorGetCountsAllResponse` - -### `get_counts_recent` - -Get count of recent Posts -Retrieves the count of Posts from the last 7 days matching a search query. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -The granularity for the search counts results. - - - -A comma separated list of SearchCount fields to display. - - -#### Returns - -`IteratorGetCountsRecentResponse` - -### `get_insights28hr` - -Get 28-hour Post insights -Retrieves engagement metrics for specified Posts over the last 28 hours. - -#### Parameters - - -List of PostIds for 28hr metrics. - - - -granularity of metrics response. - - - -request metrics for historical request. - - - -A comma separated list of Engagement fields to display. - - -#### Returns - -`GetInsights28hrResponse` - Response data - -### `get_insights_historical` - -Get historical Post insights -Retrieves historical engagement metrics for specified Posts within a defined time range. - -#### Parameters - - -List of PostIds for historical metrics. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. - - - -YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. - - - -granularity of metrics response. - - - -request metrics for historical request. - - - -A comma separated list of Engagement fields to display. - - -#### Returns - -`GetInsightsHistoricalResponse` - Response data - -### `get_liking_users` - -Get Liking Users -Retrieves a list of Users who liked a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetLikingUsersResponse` - -### `get_quoted` - -Get Quoted Posts -Retrieves a list of Posts that quote a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results to be returned. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The set of entities to exclude (e.g. ‘replies’ or ‘retweets’). - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetQuotedResponse` - -### `get_reposted_by` - -Get Reposted by -Retrieves a list of Users who reposted a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetRepostedByResponse` - -### `get_reposts` - -Get Reposts -Retrieves a list of Posts that repost a specific Post by its ID. - -#### Parameters - - -A single Post ID. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetRepostsResponse` - -### `hide_reply` - -Hide reply -Hides or unhides a reply to a conversation owned by the authenticated user. - -#### Parameters - - -The ID of the reply that you want to hide or unhide. - - - -Request body - - -### `search_all` - -Search all Posts -Retrieves Posts from the full archive matching a search query. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -The maximum number of search results to be returned by a request. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This order in which to return results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorSearchAllResponse` - -### `search_recent` - -Search recent Posts -Retrieves Posts from the last 7 days matching a search query. - -#### Parameters - - -One query/rule/filter for matching Posts. Refer to [https://t.co/rulelength](https://t.co/rulelength) to identify the max query length. - - - -YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute). - - - -YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute). - - - -Returns results with a Post ID greater than (that is, more recent than) the specified ID. - - - -Returns results with a Post ID less than (that is, older than) the specified ID. - - - -The maximum number of search results to be returned by a request. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -This order in which to return results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorSearchRecentResponse` - diff --git a/xdks/python/reference/xdk.posts.models.mdx b/xdks/python/reference/xdk.posts.models.mdx deleted file mode 100644 index d9b3318e3..000000000 --- a/xdks/python/reference/xdk.posts.models.mdx +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "Posts.Models" -sidebarTitle: "Posts.Models" -description: "Reference for the posts.models Python module in the X API SDK. Pydantic request and response models for the posts endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the posts endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.posts.models.CreateRequest - -Request model for create - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## CreateResponse - -Class - -Bases: BaseModel - -Response model for create - -## Methods - -### `class xdk.posts.models.CreateResponse` - -Response model for create - -### `class xdk.posts.models.DeleteResponse` - -Response model for delete - -### `class xdk.posts.models.GetAnalyticsResponse` - -Response model for get_analytics - -### `class xdk.posts.models.GetByIdResponse` - -Response model for get_by_id - -### `class xdk.posts.models.GetByIdsResponse` - -Response model for get_by_ids - -### `class xdk.posts.models.GetCountsAllResponse` - -Response model for get_counts_all - -### `class xdk.posts.models.GetCountsRecentResponse` - -Response model for get_counts_recent - -### `class xdk.posts.models.GetInsights28hrResponse` - -Response model for get_insights28hr - -### `class xdk.posts.models.GetInsightsHistoricalResponse` - -Response model for get_insights_historical - -### `class xdk.posts.models.GetLikingUsersResponse` - -Response model for get_liking_users - -### `class xdk.posts.models.GetQuotedResponse` - -Response model for get_quoted - -### `class xdk.posts.models.GetRepostedByResponse` - -Response model for get_reposted_by - -### `class xdk.posts.models.GetRepostsResponse` - -Response model for get_reposts - -### `class xdk.posts.models.HideReplyResponse` - -Response model for hide_reply - -### `class xdk.posts.models.SearchAllResponse` - -Response model for search_all - -### `class xdk.posts.models.SearchRecentResponse` - -Response model for search_recent - diff --git a/xdks/python/reference/xdk.spaces.client.mdx b/xdks/python/reference/xdk.spaces.client.mdx deleted file mode 100644 index f5739a90f..000000000 --- a/xdks/python/reference/xdk.spaces.client.mdx +++ /dev/null @@ -1,232 +0,0 @@ ---- -title: "SpacesClient" -sidebarTitle: "SpacesClient" -description: "Reference for the spaces.client Python module in the X API SDK. Client class and methods for calling the spaces endpoints of the X API v2." ---- - -## SpacesClient - -Class - -Bases: object - -Client for spaces operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `get_buyers` - -Get Space ticket buyers -Retrieves a list of Users who purchased tickets to a specific Space by its ID. - -#### Parameters - - -The ID of the Space to be retrieved. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The maximum number of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetBuyersResponse` - -### `get_by_creator_ids` - -Get Spaces by creator IDs -Retrieves details of Spaces created by specified User IDs. - -#### Parameters - - -The IDs of Users to search through. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`GetByCreatorIdsResponse` - Response data - -### `get_by_id` - -Get space by ID -Retrieves details of a specific space by its ID. - -#### Parameters - - -The ID of the Space to be retrieved. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_by_ids` - -Get Spaces by IDs -Retrieves details of multiple Spaces by their IDs. - -#### Parameters - - -The list of Space IDs to return. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`GetByIdsResponse` - Response data - -### `get_posts` - -Get Space Posts -Retrieves a list of Posts shared in a specific Space by its ID. - -#### Parameters - - -The ID of the Space to be retrieved. - - - -The number of Posts to fetch from the provided space. If not provided, the value will default to the maximum of 100. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`GetPostsResponse` - Response data - -### `search` - -Search Spaces -Retrieves a list of Spaces matching the specified search query. - -#### Parameters - - -The search query. - - - -The state of Spaces to search for. - - - -The number of results to return. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`SearchResponse` - Response data - diff --git a/xdks/python/reference/xdk.spaces.mdx b/xdks/python/reference/xdk.spaces.mdx deleted file mode 100644 index 55431d640..000000000 --- a/xdks/python/reference/xdk.spaces.mdx +++ /dev/null @@ -1,260 +0,0 @@ ---- -title: "SpacesClient" -sidebarTitle: "SpacesClient" -description: "Reference for the spaces Python package in the X API SDK, grouping the client and Pydantic models for the spaces endpoints of the X API v2." ---- - -## Submodules - -* [xdk.spaces.client module](/xdks/python/reference/xdk.spaces.client) - * [`SpacesClient`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient) - * [`SpacesClient.__init__()`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient.__init__) - * [`SpacesClient.get_buyers()`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient.get_buyers) - * [`SpacesClient.get_by_creator_ids()`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient.get_by_creator_ids) - * [`SpacesClient.get_by_id()`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient.get_by_id) - * [`SpacesClient.get_by_ids()`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient.get_by_ids) - * [`SpacesClient.get_posts()`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient.get_posts) - * [`SpacesClient.search()`](/xdks/python/reference/xdk.spaces.client#xdk.spaces.client.SpacesClient.search) -* [xdk.spaces.models module](/xdks/python/reference/xdk.spaces.models) - * [`GetBuyersResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetBuyersResponse) - * [`GetBuyersResponse.model_config`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetBuyersResponse.model_config) - * [`GetByCreatorIdsResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByCreatorIdsResponse) - * [`GetByCreatorIdsResponse.model_config`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByCreatorIdsResponse.model_config) - * [`GetByIdResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByIdResponse) - * [`GetByIdResponse.model_config`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByIdResponse.model_config) - * [`GetByIdsResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByIdsResponse) - * [`GetByIdsResponse.model_config`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetByIdsResponse.model_config) - * [`GetPostsResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetPostsResponse) - * [`GetPostsResponse.model_config`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.GetPostsResponse.model_config) - * [`SearchResponse`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.SearchResponse) - * [`SearchResponse.model_config`](/xdks/python/reference/xdk.spaces.models#xdk.spaces.models.SearchResponse.model_config) - -## Module contents - -This module provides access to the spaces endpoints of the X API -and serves as the main entry point for all spaces-related functionality. - -### `class xdk.spaces.SpacesClient` - -Client for spaces operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `get_buyers` - -Get Space ticket buyers -Retrieves a list of Users who purchased tickets to a specific Space by its ID. - -#### Parameters - - -The ID of the Space to be retrieved. - - - -This parameter is used to get a specified ‘page’ of results. - - - -The maximum number of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetBuyersResponse` - -### `get_by_creator_ids` - -Get Spaces by creator IDs -Retrieves details of Spaces created by specified User IDs. - -#### Parameters - - -The IDs of Users to search through. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`GetByCreatorIdsResponse` - Response data - -### `get_by_id` - -Get space by ID -Retrieves details of a specific space by its ID. - -#### Parameters - - -The ID of the Space to be retrieved. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_by_ids` - -Get Spaces by IDs -Retrieves details of multiple Spaces by their IDs. - -#### Parameters - - -The list of Space IDs to return. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`GetByIdsResponse` - Response data - -### `get_posts` - -Get Space Posts -Retrieves a list of Posts shared in a specific Space by its ID. - -#### Parameters - - -The ID of the Space to be retrieved. - - - -The number of Posts to fetch from the provided space. If not provided, the value will default to the maximum of 100. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`GetPostsResponse` - Response data - -### `search` - -Search Spaces -Retrieves a list of Spaces matching the specified search query. - -#### Parameters - - -The search query. - - - -The state of Spaces to search for. - - - -The number of results to return. - - - -A comma separated list of Space fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Topic fields to display. - - -#### Returns - -`SearchResponse` - Response data - diff --git a/xdks/python/reference/xdk.spaces.models.mdx b/xdks/python/reference/xdk.spaces.models.mdx deleted file mode 100644 index e344fc2ad..000000000 --- a/xdks/python/reference/xdk.spaces.models.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "Spaces.Models" -sidebarTitle: "Spaces.Models" -description: "Reference for the spaces.models Python module in the X API SDK. Pydantic request and response models for the spaces endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the spaces endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## GetBuyersResponse - -Class - -Bases: BaseModel - -Response model for get_buyers - -## Methods - -### `class xdk.spaces.models.GetBuyersResponse` - -Response model for get_buyers - -### `class xdk.spaces.models.GetByCreatorIdsResponse` - -Response model for get_by_creator_ids - -### `class xdk.spaces.models.GetByIdResponse` - -Response model for get_by_id - -### `class xdk.spaces.models.GetByIdsResponse` - -Response model for get_by_ids - -### `class xdk.spaces.models.GetPostsResponse` - -Response model for get_posts - -### `class xdk.spaces.models.SearchResponse` - -Response model for search - diff --git a/xdks/python/reference/xdk.stream.client.mdx b/xdks/python/reference/xdk.stream.client.mdx deleted file mode 100644 index 6b2e13b23..000000000 --- a/xdks/python/reference/xdk.stream.client.mdx +++ /dev/null @@ -1,708 +0,0 @@ ---- -title: "StreamClient" -sidebarTitle: "StreamClient" -description: "Reference for the stream.client Python module in the X API SDK. Client class and methods for calling the stream endpoints of the X API v2." ---- - -This module provides a client for interacting with the stream endpoints of the X API. -Real-time streaming operations return generators that yield data as it arrives. -Streaming connections are automatically managed with exponential backoff retry logic for robust handling. -## StreamClient - -Class - -Bases: object - -Streaming Client for stream operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `get_rule_counts` - -Get stream rule counts -Retrieves the count of rules in the active rule set for the filtered stream. - -#### Parameters - - -A comma separated list of RulesCount fields to display. - - -#### Returns - -`GetRuleCountsResponse` - Response data - -### `get_rules` - -Get stream rules -Retrieves the active rule set or a subset of rules for the filtered stream. - -#### Parameters - - -A comma-separated list of Rule IDs. - - - -The maximum number of results. - - - -This value is populated by passing the ‘next_token’ returned in a request to paginate through results. - - -#### Returns - -`IteratorGetRulesResponse` - -### `labels_compliance` - -Stream Post labels (Streaming) -Streams all labeling events applied to Posts. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `likes_compliance` - -Stream Likes compliance data (Streaming) -Streams all compliance data related to Likes for Users. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `likes_firehose` - -Stream all Likes (Streaming) -Streams all public Likes in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of LikeWithTweetAuthor fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `likes_sample10` - -Stream sampled Likes (Streaming) -Streams a 10% sample of public Likes in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of LikeWithTweetAuthor fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts` - -Stream filtered Posts (Streaming) -Streams Posts in real-time matching the active rule set. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_compliance` - -Stream Posts compliance data (Streaming) -Streams all compliance data related to Posts. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Post Compliance events will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose` - -Stream all Posts (Streaming) -Streams all public Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_en` - -Stream English Posts (Streaming) -Streams all public English-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_ja` - -Stream Japanese Posts (Streaming) -Streams all public Japanese-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_ko` - -Stream Korean Posts (Streaming) -Streams all public Korean-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_pt` - -Stream Portuguese Posts (Streaming) -Streams all public Portuguese-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_sample` - -Stream sampled Posts (Streaming) -Streams a 1% sample of public Posts in real-time. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_sample10` - -Stream 10% sampled Posts (Streaming) -Streams a 10% sample of public Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `update_rules` - -Update stream rules -Adds or deletes rules from the active rule set for the filtered stream. - -#### Parameters - - -Request body - - -### `users_compliance` - -Stream Users compliance data (Streaming) -Streams all compliance data related to Users. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - diff --git a/xdks/python/reference/xdk.stream.mdx b/xdks/python/reference/xdk.stream.mdx deleted file mode 100644 index 028c2dcde..000000000 --- a/xdks/python/reference/xdk.stream.mdx +++ /dev/null @@ -1,768 +0,0 @@ ---- -title: "StreamClient" -sidebarTitle: "StreamClient" -description: "Reference for the stream Python package in the X API SDK, grouping the client and Pydantic models for the stream endpoints of the X API v2." ---- - -## Submodules - -* [xdk.stream.client module](/xdks/python/reference/xdk.stream.client) - * [`StreamClient`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient) - * [`StreamClient.__init__()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.__init__) - * [`StreamClient.get_rule_counts()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.get_rule_counts) - * [`StreamClient.get_rules()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.get_rules) - * [`StreamClient.labels_compliance()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.labels_compliance) - * [`StreamClient.likes_compliance()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.likes_compliance) - * [`StreamClient.likes_firehose()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.likes_firehose) - * [`StreamClient.likes_sample10()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.likes_sample10) - * [`StreamClient.posts()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts) - * [`StreamClient.posts_compliance()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_compliance) - * [`StreamClient.posts_firehose()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_firehose) - * [`StreamClient.posts_firehose_en()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_firehose_en) - * [`StreamClient.posts_firehose_ja()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_firehose_ja) - * [`StreamClient.posts_firehose_ko()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_firehose_ko) - * [`StreamClient.posts_firehose_pt()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_firehose_pt) - * [`StreamClient.posts_sample()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_sample) - * [`StreamClient.posts_sample10()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.posts_sample10) - * [`StreamClient.update_rules()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.update_rules) - * [`StreamClient.users_compliance()`](/xdks/python/reference/xdk.stream.client#xdk.stream.client.StreamClient.users_compliance) -* [xdk.stream.models module](/xdks/python/reference/xdk.stream.models) - * [`GetRuleCountsResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.GetRuleCountsResponse) - * [`GetRuleCountsResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.GetRuleCountsResponse.model_config) - * [`GetRulesResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.GetRulesResponse) - * [`GetRulesResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.GetRulesResponse.model_config) - * [`LabelsComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LabelsComplianceResponse) - * [`LabelsComplianceResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LabelsComplianceResponse.model_config) - * [`LikesComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesComplianceResponse) - * [`LikesComplianceResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesComplianceResponse.model_config) - * [`LikesFirehoseResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesFirehoseResponse) - * [`LikesFirehoseResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesFirehoseResponse.model_config) - * [`LikesSample10Response`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesSample10Response) - * [`LikesSample10Response.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.LikesSample10Response.model_config) - * [`PostsComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsComplianceResponse) - * [`PostsComplianceResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsComplianceResponse.model_config) - * [`PostsFirehoseEnResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseEnResponse) - * [`PostsFirehoseEnResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseEnResponse.model_config) - * [`PostsFirehoseJaResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseJaResponse) - * [`PostsFirehoseJaResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseJaResponse.model_config) - * [`PostsFirehoseKoResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseKoResponse) - * [`PostsFirehoseKoResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseKoResponse.model_config) - * [`PostsFirehosePtResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehosePtResponse) - * [`PostsFirehosePtResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehosePtResponse.model_config) - * [`PostsFirehoseResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseResponse) - * [`PostsFirehoseResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsFirehoseResponse.model_config) - * [`PostsResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsResponse) - * [`PostsResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsResponse.model_config) - * [`PostsSample10Response`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsSample10Response) - * [`PostsSample10Response.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsSample10Response.model_config) - * [`PostsSampleResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsSampleResponse) - * [`PostsSampleResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.PostsSampleResponse.model_config) - * [`UpdateRulesRequest`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UpdateRulesRequest) - * [`UpdateRulesRequest.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UpdateRulesRequest.model_config) - * [`UpdateRulesResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UpdateRulesResponse) - * [`UpdateRulesResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UpdateRulesResponse.model_config) - * [`UsersComplianceResponse`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UsersComplianceResponse) - * [`UsersComplianceResponse.model_config`](/xdks/python/reference/xdk.stream.models#xdk.stream.models.UsersComplianceResponse.model_config) - -## Module contents - -This module provides access to the stream endpoints of the X API -and serves as the main entry point for all stream-related functionality. - -### `class xdk.stream.StreamClient` - -Streaming Client for stream operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `get_rule_counts` - -Get stream rule counts -Retrieves the count of rules in the active rule set for the filtered stream. - -#### Parameters - - -A comma separated list of RulesCount fields to display. - - -#### Returns - -`GetRuleCountsResponse` - Response data - -### `get_rules` - -Get stream rules -Retrieves the active rule set or a subset of rules for the filtered stream. - -#### Parameters - - -A comma-separated list of Rule IDs. - - - -The maximum number of results. - - - -This value is populated by passing the ‘next_token’ returned in a request to paginate through results. - - -#### Returns - -`IteratorGetRulesResponse` - -### `labels_compliance` - -Stream Post labels (Streaming) -Streams all labeling events applied to Posts. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `likes_compliance` - -Stream Likes compliance data (Streaming) -Streams all compliance data related to Likes for Users. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `likes_firehose` - -Stream all Likes (Streaming) -Streams all public Likes in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of LikeWithTweetAuthor fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `likes_sample10` - -Stream sampled Likes (Streaming) -Streams a 10% sample of public Likes in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of LikeWithTweetAuthor fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Tweet fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts` - -Stream filtered Posts (Streaming) -Streams Posts in real-time matching the active rule set. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_compliance` - -Stream Posts compliance data (Streaming) -Streams all compliance data related to Posts. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Post Compliance events will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose` - -Stream all Posts (Streaming) -Streams all public Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_en` - -Stream English Posts (Streaming) -Streams all public English-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_ja` - -Stream Japanese Posts (Streaming) -Streams all public Japanese-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_ko` - -Stream Korean Posts (Streaming) -Streams all public Korean-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_firehose_pt` - -Stream Portuguese Posts (Streaming) -Streams all public Portuguese-language Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_sample` - -Stream sampled Posts (Streaming) -Streams a 1% sample of public Posts in real-time. -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. - -#### Parameters - - -The number of minutes of backfill requested. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `posts_sample10` - -Stream 10% sampled Posts (Streaming) -Streams a 10% sample of public Posts in real-time. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - -### `update_rules` - -Update stream rules -Adds or deletes rules from the active rule set for the filtered stream. - -#### Parameters - - -Request body - - -### `users_compliance` - -Stream Users compliance data (Streaming) -Streams all compliance data related to Users. -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. - -#### Parameters - - -The partition number. - - - -The number of minutes of backfill requested. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided. - - - -Optional StreamConfig for customizing retry behavior, timeouts, and callbacks. - - diff --git a/xdks/python/reference/xdk.stream.models.mdx b/xdks/python/reference/xdk.stream.models.mdx deleted file mode 100644 index 2c3c12232..000000000 --- a/xdks/python/reference/xdk.stream.models.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "Stream.Models" -sidebarTitle: "Stream.Models" -description: "Reference for the stream.models Python module in the X API SDK. Pydantic request and response models for the stream endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the stream endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## GetRuleCountsResponse - -Class - -Bases: BaseModel - -Response model for get_rule_counts - -## Methods - -### `class xdk.stream.models.GetRuleCountsResponse` - -Response model for get_rule_counts - -### `class xdk.stream.models.GetRulesResponse` - -Response model for get_rules - -### `class xdk.stream.models.LabelsComplianceResponse` - -Response model for labels_compliance - -### `class xdk.stream.models.LikesComplianceResponse` - -Response model for likes_compliance - -### `class xdk.stream.models.LikesFirehoseResponse` - -Response model for likes_firehose - -### `class xdk.stream.models.LikesSample10Response` - -Response model for likes_sample10 - -### `class xdk.stream.models.PostsComplianceResponse` - -Response model for posts_compliance - -### `class xdk.stream.models.PostsFirehoseEnResponse` - -Response model for posts_firehose_en - -### `class xdk.stream.models.PostsFirehoseJaResponse` - -Response model for posts_firehose_ja - -### `class xdk.stream.models.PostsFirehoseKoResponse` - -Response model for posts_firehose_ko - -### `class xdk.stream.models.PostsFirehosePtResponse` - -Response model for posts_firehose_pt - -### `class xdk.stream.models.PostsFirehoseResponse` - -Response model for posts_firehose - -### `class xdk.stream.models.PostsResponse` - -Response model for posts - -### `class xdk.stream.models.PostsSample10Response` - -Response model for posts_sample10 - -### `class xdk.stream.models.PostsSampleResponse` - -Response model for posts_sample - -### `class xdk.stream.models.UpdateRulesResponse` - -Response model for update_rules - -### `class xdk.stream.models.UsersComplianceResponse` - -Response model for users_compliance - diff --git a/xdks/python/reference/xdk.streaming.mdx b/xdks/python/reference/xdk.streaming.mdx deleted file mode 100644 index c9086dcba..000000000 --- a/xdks/python/reference/xdk.streaming.mdx +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: "streaming" -sidebarTitle: "streaming" -description: "Reference for the streaming Python package in the X API SDK, grouping the client and Pydantic models for the streaming endpoints of the X API v2." ---- - -Robust streaming utilities for the X API SDK. - -This module provides streaming connection handling with automatic reconnection, -exponential backoff, and comprehensive error handling. Clients can consume -streaming endpoints without worrying about connection management - the SDK -handles all recovery automatically. - -### `class xdk.streaming.StreamConfig` - -Configuration for streaming connections with retry behavior. - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -### `__init__` - -#### Parameters - - - - - - - - - - - - - - - - - - - - - - - -### `on_error : Callable[[[StreamError]` - -### `exception xdk.streaming.StreamError` - -Exception raised for streaming errors with classification. - -#### Parameters - - - - - -### `__init__` - -#### Parameters - - - - - -### `class xdk.streaming.StreamErrorType` - -Classification of streaming errors for retry decisions. - -#### Parameters - - - -### `class xdk.streaming.StreamState` - -Internal state for a streaming connection. - -#### Parameters - - - - - - - - - - - -### `__init__` - -#### Parameters - - - - - - - - - - - -### `last_error : [StreamError]` - -### `xdk.streaming.stream_with_retry` - -Stream data from an endpoint with automatic reconnection and exponential backoff. -This function handles all connection management, including: -- Automatic reconnection on disconnects -- Exponential backoff with jitter for retry delays -- Classification of errors as retryable vs fatal -- Lifecycle callbacks for monitoring connection state - -#### Parameters - - -The requests Session to use for HTTP calls. - - - -HTTP method (typically “get”). - - - -The full URL to stream from. - - - -StreamConfig with retry and callback settings. - - diff --git a/xdks/python/reference/xdk.trends.client.mdx b/xdks/python/reference/xdk.trends.client.mdx deleted file mode 100644 index e5cec171c..000000000 --- a/xdks/python/reference/xdk.trends.client.mdx +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "TrendsClient" -sidebarTitle: "TrendsClient" -description: "Reference for the trends.client Python module in the X API SDK. Client class and methods for calling the trends endpoints of the X API v2." ---- - -## TrendsClient - -Class - -Bases: object - -Client for trends operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `get_ai` - -Get AI Trends by ID -Retrieves an AI trend by its ID. - -#### Parameters - - -The ID of the ai trend. - - - -A comma separated list of News fields to display. - - -#### Returns - -`GetAiResponse` - Response data - -### `get_by_woeid` - -Get Trends by WOEID -Retrieves trending topics for a specific location identified by its WOEID. - -#### Parameters - - -The WOEID of the place to lookup a trend for. - - - -The maximum number of results. - - - -A comma separated list of Trend fields to display. - - -#### Returns - -`GetByWoeidResponse` - Response data - -### `get_personalized` - -Get personalized Trends -Retrieves personalized trending topics for the authenticated user. - -#### Parameters - - -A comma separated list of PersonalizedTrend fields to display. - - -#### Returns - -`GetPersonalizedResponse` - Response data - diff --git a/xdks/python/reference/xdk.trends.mdx b/xdks/python/reference/xdk.trends.mdx deleted file mode 100644 index 9dc1a5d7a..000000000 --- a/xdks/python/reference/xdk.trends.mdx +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: "TrendsClient" -sidebarTitle: "TrendsClient" -description: "Reference for the trends Python package in the X API SDK, grouping the client and Pydantic models for the trends endpoints of the X API v2." ---- - -## Submodules - -* [xdk.trends.client module](/xdks/python/reference/xdk.trends.client) - * [`TrendsClient`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient) - * [`TrendsClient.__init__()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.__init__) - * [`TrendsClient.get_ai()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.get_ai) - * [`TrendsClient.get_by_woeid()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.get_by_woeid) - * [`TrendsClient.get_personalized()`](/xdks/python/reference/xdk.trends.client#xdk.trends.client.TrendsClient.get_personalized) -* [xdk.trends.models module](/xdks/python/reference/xdk.trends.models) - * [`GetAiResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetAiResponse) - * [`GetAiResponse.model_config`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetAiResponse.model_config) - * [`GetByWoeidResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetByWoeidResponse) - * [`GetByWoeidResponse.model_config`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetByWoeidResponse.model_config) - * [`GetPersonalizedResponse`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetPersonalizedResponse) - * [`GetPersonalizedResponse.model_config`](/xdks/python/reference/xdk.trends.models#xdk.trends.models.GetPersonalizedResponse.model_config) - -## Module contents - -This module provides access to the trends endpoints of the X API -and serves as the main entry point for all trends-related functionality. - -### `class xdk.trends.TrendsClient` - -Client for trends operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `get_ai` - -Get AI Trends by ID -Retrieves an AI trend by its ID. - -#### Parameters - - -The ID of the ai trend. - - - -A comma separated list of News fields to display. - - -#### Returns - -`GetAiResponse` - Response data - -### `get_by_woeid` - -Get Trends by WOEID -Retrieves trending topics for a specific location identified by its WOEID. - -#### Parameters - - -The WOEID of the place to lookup a trend for. - - - -The maximum number of results. - - - -A comma separated list of Trend fields to display. - - -#### Returns - -`GetByWoeidResponse` - Response data - -### `get_personalized` - -Get personalized Trends -Retrieves personalized trending topics for the authenticated user. - -#### Parameters - - -A comma separated list of PersonalizedTrend fields to display. - - -#### Returns - -`GetPersonalizedResponse` - Response data - diff --git a/xdks/python/reference/xdk.trends.models.mdx b/xdks/python/reference/xdk.trends.models.mdx deleted file mode 100644 index 4938709c1..000000000 --- a/xdks/python/reference/xdk.trends.models.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "Trends.Models" -sidebarTitle: "Trends.Models" -description: "Reference for the trends.models Python module in the X API SDK. Pydantic request and response models for the trends endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the trends endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## GetAiResponse - -Class - -Bases: BaseModel - -Response model for get_ai - -## Methods - -### `class xdk.trends.models.GetAiResponse` - -Response model for get_ai - -### `class xdk.trends.models.GetByWoeidResponse` - -Response model for get_by_woeid - -### `class xdk.trends.models.GetPersonalizedResponse` - -Response model for get_personalized - diff --git a/xdks/python/reference/xdk.usage.client.mdx b/xdks/python/reference/xdk.usage.client.mdx deleted file mode 100644 index e5836411a..000000000 --- a/xdks/python/reference/xdk.usage.client.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "UsageClient" -sidebarTitle: "UsageClient" -description: "Reference for the usage.client Python module in the X API SDK. Client class and methods for calling the usage endpoints of the X API v2." ---- - -## UsageClient - -Class - -Bases: object - -Client for usage operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `get` - -Get usage -Retrieves usage statistics for Posts over a specified number of days. - -#### Parameters - - -The number of days for which you need usage for. - - - -A comma separated list of Usage fields to display. - - -#### Returns - -`GetResponse` - Response data - diff --git a/xdks/python/reference/xdk.usage.mdx b/xdks/python/reference/xdk.usage.mdx deleted file mode 100644 index f00c5d273..000000000 --- a/xdks/python/reference/xdk.usage.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "UsageClient" -sidebarTitle: "UsageClient" -description: "Reference for the usage Python package in the X API SDK, grouping the client and Pydantic models for the usage endpoints of the X API v2." ---- - -## Submodules - -* [xdk.usage.client module](/xdks/python/reference/xdk.usage.client) - * [`UsageClient`](/xdks/python/reference/xdk.usage.client#xdk.usage.client.UsageClient) - * [`UsageClient.__init__()`](/xdks/python/reference/xdk.usage.client#xdk.usage.client.UsageClient.__init__) - * [`UsageClient.get()`](/xdks/python/reference/xdk.usage.client#xdk.usage.client.UsageClient.get) -* [xdk.usage.models module](/xdks/python/reference/xdk.usage.models) - * [`GetResponse`](/xdks/python/reference/xdk.usage.models#xdk.usage.models.GetResponse) - * [`GetResponse.model_config`](/xdks/python/reference/xdk.usage.models#xdk.usage.models.GetResponse.model_config) - -## Module contents - -This module provides access to the usage endpoints of the X API -and serves as the main entry point for all usage-related functionality. - -### `class xdk.usage.UsageClient` - -Client for usage operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `get` - -Get usage -Retrieves usage statistics for Posts over a specified number of days. - -#### Parameters - - -The number of days for which you need usage for. - - - -A comma separated list of Usage fields to display. - - -#### Returns - -`GetResponse` - Response data - diff --git a/xdks/python/reference/xdk.usage.models.mdx b/xdks/python/reference/xdk.usage.models.mdx deleted file mode 100644 index f0cb28d21..000000000 --- a/xdks/python/reference/xdk.usage.models.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Usage.Models" -sidebarTitle: "Usage.Models" -description: "Reference for the usage.models Python module in the X API SDK. Pydantic request and response models for the usage endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the usage endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## GetResponse - -Class - -Bases: BaseModel - -Response model for get - -## Methods - -### `class xdk.usage.models.GetResponse` - -Response model for get - diff --git a/xdks/python/reference/xdk.users.client.mdx b/xdks/python/reference/xdk.users.client.mdx deleted file mode 100644 index 0bad30e84..000000000 --- a/xdks/python/reference/xdk.users.client.mdx +++ /dev/null @@ -1,1104 +0,0 @@ ---- -title: "UsersClient" -sidebarTitle: "UsersClient" -description: "Reference for the users.client Python module in the X API SDK. Client class and methods for calling the users endpoints of the X API v2." ---- - -## UsersClient - -Class - -Bases: object - -Client for users operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `block_dms` - -Block DMs -Blocks direct messages to or from a specific User by their ID for the authenticated user. - -#### Parameters - - -The ID of the target User that the authenticated user requesting to block dms for. - - -#### Returns - -`BlockDmsResponse` - Response data - -### `create_bookmark` - -Create Bookmark -Adds a post to the authenticated user’s bookmarks. - -#### Parameters - - -The ID of the authenticated source User for whom to add bookmarks. - - - -Request body - - -### `delete_bookmark` - -Delete Bookmark -Removes a Post from the authenticated user’s Bookmarks by its ID. - -#### Parameters - - -The ID of the authenticated source User whose bookmark is to be removed. - - - -The ID of the Post that the source User is removing from bookmarks. - - -#### Returns - -`DeleteBookmarkResponse` - Response data - -### `follow_list` - -Follow List -Causes the authenticated user to follow a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User that will follow the List. - - - -Request body - - -### `follow_user` - -Follow User -Causes the authenticated user to follow a specific user by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to follow the target User. - - - -Request body - - -### `get_blocking` - -Get blocking -Retrieves a list of Users blocked by the specified User ID. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetBlockingResponse` - -### `get_bookmark_folders` - -Get Bookmark folders -Retrieves a list of Bookmark folders created by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - -#### Returns - -`IteratorGetBookmarkFoldersResponse` - -### `get_bookmarks` - -Get Bookmarks -Retrieves a list of Posts bookmarked by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetBookmarksResponse` - -### `get_bookmarks_by_folder_id` - -Get Bookmarks by folder ID -Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for. - - -#### Returns - -`GetBookmarksByFolderIdResponse` - Response data - -### `get_by_id` - -Get User by ID -Retrieves details of a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_by_ids` - -Get Users by IDs -Retrieves details of multiple Users by their IDs. - -#### Parameters - - -A list of User IDs, comma-separated. You can specify up to 100 IDs. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByIdsResponse` - Response data - -### `get_by_username` - -Get User by username -Retrieves details of a specific User by their username. - -#### Parameters - - -A username. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByUsernameResponse` - Response data - -### `get_by_usernames` - -Get Users by usernames -Retrieves details of multiple Users by their usernames. - -#### Parameters - - -A list of usernames, comma-separated. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByUsernamesResponse` - Response data - -### `get_followed_lists` - -Get followed Lists -Retrieves a list of Lists followed by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`IteratorGetFollowedListsResponse` - -### `get_followers` - -Get followers -Retrieves a list of Users who follow a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetFollowersResponse` - -### `get_following` - -Get following -Retrieves a list of Users followed by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetFollowingResponse` - -### `get_liked_posts` - -Get liked Posts -Retrieves a list of Posts liked by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetLikedPostsResponse` - -### `get_list_memberships` - -Get List memberships -Retrieves a list of Lists that a specific User is a member of by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`IteratorGetListMembershipsResponse` - -### `get_me` - -Get my User -Retrieves details of the authenticated user. - -#### Parameters - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetMeResponse` - Response data - -### `get_mentions` - -Get mentions -Retrieves a list of Posts that mention a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - - - -The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetMentionsResponse` - -### `get_muting` - -Get muting -Retrieves a list of Users muted by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetMutingResponse` - -### `get_owned_lists` - -Get owned Lists -Retrieves a list of Lists owned by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`IteratorGetOwnedListsResponse` - -### `get_pinned_lists` - -Get pinned Lists -Retrieves a list of Lists pinned by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`GetPinnedListsResponse` - Response data - -### `get_posts` - -Get Posts -Retrieves a list of posts authored by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - - - -The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -The set of entities to exclude (e.g. ‘replies’ or ‘retweets’). - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetPostsResponse` - -### `get_reposts_of_me` - -Get Reposts of me -Retrieves a list of Posts that repost content from the authenticated user. - -#### Parameters - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetRepostsOfMeResponse` - -### `get_timeline` - -Get Timeline -Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline. - -#### Parameters - - -The ID of the authenticated source User to list Reverse Chronological Timeline Posts of. - - - -The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - - - -The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -The set of entities to exclude (e.g. ‘replies’ or ‘retweets’). - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetTimelineResponse` - -### `like_post` - -Like Post -Causes the authenticated user to Like a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to like the Post. - - - -Request body - - -### `mute_user` - -Mute User -Causes the authenticated user to mute a specific User by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to mute the target User. - - - -Request body - - -### `pin_list` - -Pin List -Causes the authenticated user to pin a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User that will pin the List. - - - -Request body - - -### `repost_post` - -Repost Post -Causes the authenticated user to repost a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to repost the Post. - - - -Request body - - -### `search` - -Search Users -Retrieves a list of Users matching a search query. - -#### Parameters - - -TThe the query string by which to query for users. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorSearchResponse` - -### `unblock_dms` - -Unblock DMs -Unblocks direct messages to or from a specific User by their ID for the authenticated user. - -#### Parameters - - -The ID of the target User that the authenticated user requesting to unblock dms for. - - -#### Returns - -`UnblockDmsResponse` - Response data - -### `unfollow_list` - -Unfollow List -Causes the authenticated user to unfollow a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User that will unfollow the List. - - - -The ID of the List to unfollow. - - -#### Returns - -`UnfollowListResponse` - Response data - -### `unfollow_user` - -Unfollow User -Causes the authenticated user to unfollow a specific user by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to unfollow the target User. - - - -The ID of the User that the source User is requesting to unfollow. - - -#### Returns - -`UnfollowUserResponse` - Response data - -### `unlike_post` - -Unlike Post -Causes the authenticated user to Unlike a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to unlike the Post. - - - -The ID of the Post that the User is requesting to unlike. - - -#### Returns - -`UnlikePostResponse` - Response data - -### `unmute_user` - -Unmute User -Causes the authenticated user to unmute a specific user by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to unmute the target User. - - - -The ID of the User that the source User is requesting to unmute. - - -#### Returns - -`UnmuteUserResponse` - Response data - -### `unpin_list` - -Unpin List -Causes the authenticated user to unpin a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The ID of the List to unpin. - - -#### Returns - -`UnpinListResponse` - Response data - -### `unrepost_post` - -Unrepost Post -Causes the authenticated user to unrepost a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to repost the Post. - - - -The ID of the Post that the User is requesting to unretweet. - - -#### Returns - -`UnrepostPostResponse` - Response data - diff --git a/xdks/python/reference/xdk.users.mdx b/xdks/python/reference/xdk.users.mdx deleted file mode 100644 index 71726cf28..000000000 --- a/xdks/python/reference/xdk.users.mdx +++ /dev/null @@ -1,1242 +0,0 @@ ---- -title: "UsersClient" -sidebarTitle: "UsersClient" -description: "Reference for the users Python package in the X API SDK, grouping the client and Pydantic models for the users endpoints of the X API v2." ---- - -## Submodules - -* [xdk.users.client module](/xdks/python/reference/xdk.users.client) - * [`UsersClient`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient) - * [`UsersClient.__init__()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.__init__) - * [`UsersClient.block_dms()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.block_dms) - * [`UsersClient.create_bookmark()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.create_bookmark) - * [`UsersClient.delete_bookmark()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.delete_bookmark) - * [`UsersClient.follow_list()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.follow_list) - * [`UsersClient.follow_user()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.follow_user) - * [`UsersClient.get_blocking()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_blocking) - * [`UsersClient.get_bookmark_folders()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_bookmark_folders) - * [`UsersClient.get_bookmarks()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_bookmarks) - * [`UsersClient.get_bookmarks_by_folder_id()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_bookmarks_by_folder_id) - * [`UsersClient.get_by_id()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_by_id) - * [`UsersClient.get_by_ids()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_by_ids) - * [`UsersClient.get_by_username()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_by_username) - * [`UsersClient.get_by_usernames()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_by_usernames) - * [`UsersClient.get_followed_lists()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_followed_lists) - * [`UsersClient.get_followers()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_followers) - * [`UsersClient.get_following()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_following) - * [`UsersClient.get_liked_posts()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_liked_posts) - * [`UsersClient.get_list_memberships()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_list_memberships) - * [`UsersClient.get_me()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_me) - * [`UsersClient.get_mentions()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_mentions) - * [`UsersClient.get_muting()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_muting) - * [`UsersClient.get_owned_lists()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_owned_lists) - * [`UsersClient.get_pinned_lists()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_pinned_lists) - * [`UsersClient.get_posts()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_posts) - * [`UsersClient.get_reposts_of_me()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_reposts_of_me) - * [`UsersClient.get_timeline()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.get_timeline) - * [`UsersClient.like_post()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.like_post) - * [`UsersClient.mute_user()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.mute_user) - * [`UsersClient.pin_list()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.pin_list) - * [`UsersClient.repost_post()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.repost_post) - * [`UsersClient.search()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.search) - * [`UsersClient.unblock_dms()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.unblock_dms) - * [`UsersClient.unfollow_list()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.unfollow_list) - * [`UsersClient.unfollow_user()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.unfollow_user) - * [`UsersClient.unlike_post()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.unlike_post) - * [`UsersClient.unmute_user()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.unmute_user) - * [`UsersClient.unpin_list()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.unpin_list) - * [`UsersClient.unrepost_post()`](/xdks/python/reference/xdk.users.client#xdk.users.client.UsersClient.unrepost_post) -* [xdk.users.models module](/xdks/python/reference/xdk.users.models) - * [`BlockDmsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.BlockDmsResponse) - * [`BlockDmsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.BlockDmsResponse.model_config) - * [`CreateBookmarkRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.CreateBookmarkRequest) - * [`CreateBookmarkRequest.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.CreateBookmarkRequest.model_config) - * [`CreateBookmarkResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.CreateBookmarkResponse) - * [`CreateBookmarkResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.CreateBookmarkResponse.model_config) - * [`DeleteBookmarkResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.DeleteBookmarkResponse) - * [`DeleteBookmarkResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.DeleteBookmarkResponse.model_config) - * [`FollowListRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowListRequest) - * [`FollowListRequest.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowListRequest.model_config) - * [`FollowListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowListResponse) - * [`FollowListResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowListResponse.model_config) - * [`FollowUserRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowUserRequest) - * [`FollowUserRequest.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowUserRequest.model_config) - * [`FollowUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowUserResponse) - * [`FollowUserResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.FollowUserResponse.model_config) - * [`GetBlockingResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBlockingResponse) - * [`GetBlockingResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBlockingResponse.model_config) - * [`GetBookmarkFoldersResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarkFoldersResponse) - * [`GetBookmarkFoldersResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarkFoldersResponse.model_config) - * [`GetBookmarksByFolderIdResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarksByFolderIdResponse) - * [`GetBookmarksByFolderIdResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarksByFolderIdResponse.model_config) - * [`GetBookmarksResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarksResponse) - * [`GetBookmarksResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetBookmarksResponse.model_config) - * [`GetByIdResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByIdResponse) - * [`GetByIdResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByIdResponse.model_config) - * [`GetByIdsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByIdsResponse) - * [`GetByIdsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByIdsResponse.model_config) - * [`GetByUsernameResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByUsernameResponse) - * [`GetByUsernameResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByUsernameResponse.model_config) - * [`GetByUsernamesResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByUsernamesResponse) - * [`GetByUsernamesResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetByUsernamesResponse.model_config) - * [`GetFollowedListsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowedListsResponse) - * [`GetFollowedListsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowedListsResponse.model_config) - * [`GetFollowersResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowersResponse) - * [`GetFollowersResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowersResponse.model_config) - * [`GetFollowingResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowingResponse) - * [`GetFollowingResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetFollowingResponse.model_config) - * [`GetLikedPostsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetLikedPostsResponse) - * [`GetLikedPostsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetLikedPostsResponse.model_config) - * [`GetListMembershipsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetListMembershipsResponse) - * [`GetListMembershipsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetListMembershipsResponse.model_config) - * [`GetMeResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMeResponse) - * [`GetMeResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMeResponse.model_config) - * [`GetMentionsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMentionsResponse) - * [`GetMentionsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMentionsResponse.model_config) - * [`GetMutingResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMutingResponse) - * [`GetMutingResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetMutingResponse.model_config) - * [`GetOwnedListsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetOwnedListsResponse) - * [`GetOwnedListsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetOwnedListsResponse.model_config) - * [`GetPinnedListsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetPinnedListsResponse) - * [`GetPinnedListsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetPinnedListsResponse.model_config) - * [`GetPostsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetPostsResponse) - * [`GetPostsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetPostsResponse.model_config) - * [`GetRepostsOfMeResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetRepostsOfMeResponse) - * [`GetRepostsOfMeResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetRepostsOfMeResponse.model_config) - * [`GetTimelineResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetTimelineResponse) - * [`GetTimelineResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.GetTimelineResponse.model_config) - * [`LikePostRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.LikePostRequest) - * [`LikePostRequest.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.LikePostRequest.model_config) - * [`LikePostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.LikePostResponse) - * [`LikePostResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.LikePostResponse.model_config) - * [`MuteUserRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.MuteUserRequest) - * [`MuteUserRequest.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.MuteUserRequest.model_config) - * [`MuteUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.MuteUserResponse) - * [`MuteUserResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.MuteUserResponse.model_config) - * [`PinListRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.PinListRequest) - * [`PinListRequest.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.PinListRequest.model_config) - * [`PinListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.PinListResponse) - * [`PinListResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.PinListResponse.model_config) - * [`RepostPostRequest`](/xdks/python/reference/xdk.users.models#xdk.users.models.RepostPostRequest) - * [`RepostPostRequest.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.RepostPostRequest.model_config) - * [`RepostPostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.RepostPostResponse) - * [`RepostPostResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.RepostPostResponse.model_config) - * [`SearchResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.SearchResponse) - * [`SearchResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.SearchResponse.model_config) - * [`UnblockDmsResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnblockDmsResponse) - * [`UnblockDmsResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnblockDmsResponse.model_config) - * [`UnfollowListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnfollowListResponse) - * [`UnfollowListResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnfollowListResponse.model_config) - * [`UnfollowUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnfollowUserResponse) - * [`UnfollowUserResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnfollowUserResponse.model_config) - * [`UnlikePostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnlikePostResponse) - * [`UnlikePostResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnlikePostResponse.model_config) - * [`UnmuteUserResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnmuteUserResponse) - * [`UnmuteUserResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnmuteUserResponse.model_config) - * [`UnpinListResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnpinListResponse) - * [`UnpinListResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnpinListResponse.model_config) - * [`UnrepostPostResponse`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnrepostPostResponse) - * [`UnrepostPostResponse.model_config`](/xdks/python/reference/xdk.users.models#xdk.users.models.UnrepostPostResponse.model_config) - -## Module contents - -This module provides access to the users endpoints of the X API -and serves as the main entry point for all users-related functionality. - -### `class xdk.users.UsersClient` - -Client for users operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `block_dms` - -Block DMs -Blocks direct messages to or from a specific User by their ID for the authenticated user. - -#### Parameters - - -The ID of the target User that the authenticated user requesting to block dms for. - - -#### Returns - -`BlockDmsResponse` - Response data - -### `create_bookmark` - -Create Bookmark -Adds a post to the authenticated user’s bookmarks. - -#### Parameters - - -The ID of the authenticated source User for whom to add bookmarks. - - - -Request body - - -### `delete_bookmark` - -Delete Bookmark -Removes a Post from the authenticated user’s Bookmarks by its ID. - -#### Parameters - - -The ID of the authenticated source User whose bookmark is to be removed. - - - -The ID of the Post that the source User is removing from bookmarks. - - -#### Returns - -`DeleteBookmarkResponse` - Response data - -### `follow_list` - -Follow List -Causes the authenticated user to follow a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User that will follow the List. - - - -Request body - - -### `follow_user` - -Follow User -Causes the authenticated user to follow a specific user by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to follow the target User. - - - -Request body - - -### `get_blocking` - -Get blocking -Retrieves a list of Users blocked by the specified User ID. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetBlockingResponse` - -### `get_bookmark_folders` - -Get Bookmark folders -Retrieves a list of Bookmark folders created by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - -#### Returns - -`IteratorGetBookmarkFoldersResponse` - -### `get_bookmarks` - -Get Bookmarks -Retrieves a list of Posts bookmarked by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetBookmarksResponse` - -### `get_bookmarks_by_folder_id` - -Get Bookmarks by folder ID -Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for. - - -#### Returns - -`GetBookmarksByFolderIdResponse` - Response data - -### `get_by_id` - -Get User by ID -Retrieves details of a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByIdResponse` - Response data - -### `get_by_ids` - -Get Users by IDs -Retrieves details of multiple Users by their IDs. - -#### Parameters - - -A list of User IDs, comma-separated. You can specify up to 100 IDs. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByIdsResponse` - Response data - -### `get_by_username` - -Get User by username -Retrieves details of a specific User by their username. - -#### Parameters - - -A username. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByUsernameResponse` - Response data - -### `get_by_usernames` - -Get Users by usernames -Retrieves details of multiple Users by their usernames. - -#### Parameters - - -A list of usernames, comma-separated. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetByUsernamesResponse` - Response data - -### `get_followed_lists` - -Get followed Lists -Retrieves a list of Lists followed by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`IteratorGetFollowedListsResponse` - -### `get_followers` - -Get followers -Retrieves a list of Users who follow a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetFollowersResponse` - -### `get_following` - -Get following -Retrieves a list of Users followed by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetFollowingResponse` - -### `get_liked_posts` - -Get liked Posts -Retrieves a list of Posts liked by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetLikedPostsResponse` - -### `get_list_memberships` - -Get List memberships -Retrieves a list of Lists that a specific User is a member of by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`IteratorGetListMembershipsResponse` - -### `get_me` - -Get my User -Retrieves details of the authenticated user. - -#### Parameters - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`GetMeResponse` - Response data - -### `get_mentions` - -Get mentions -Retrieves a list of Posts that mention a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - - - -The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetMentionsResponse` - -### `get_muting` - -Get muting -Retrieves a list of Users muted by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorGetMutingResponse` - -### `get_owned_lists` - -Get owned Lists -Retrieves a list of Lists owned by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The maximum number of results. - - - -This parameter is used to get a specified ‘page’ of results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`IteratorGetOwnedListsResponse` - -### `get_pinned_lists` - -Get pinned Lists -Retrieves a list of Lists pinned by the authenticated user. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -A comma separated list of List fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of User fields to display. - - -#### Returns - -`GetPinnedListsResponse` - Response data - -### `get_posts` - -Get Posts -Retrieves a list of posts authored by a specific User by their ID. - -#### Parameters - - -The ID of the User to lookup. - - - -The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - - - -The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -The set of entities to exclude (e.g. ‘replies’ or ‘retweets’). - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetPostsResponse` - -### `get_reposts_of_me` - -Get Reposts of me -Retrieves a list of Posts that repost content from the authenticated user. - -#### Parameters - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetRepostsOfMeResponse` - -### `get_timeline` - -Get Timeline -Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline. - -#### Parameters - - -The ID of the authenticated source User to list Reverse Chronological Timeline Posts of. - - - -The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - - - -The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. - - - -The set of entities to exclude (e.g. ‘replies’ or ‘retweets’). - - - -YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - - - -YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`IteratorGetTimelineResponse` - -### `like_post` - -Like Post -Causes the authenticated user to Like a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to like the Post. - - - -Request body - - -### `mute_user` - -Mute User -Causes the authenticated user to mute a specific User by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to mute the target User. - - - -Request body - - -### `pin_list` - -Pin List -Causes the authenticated user to pin a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User that will pin the List. - - - -Request body - - -### `repost_post` - -Repost Post -Causes the authenticated user to repost a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to repost the Post. - - - -Request body - - -### `search` - -Search Users -Retrieves a list of Users matching a search query. - -#### Parameters - - -TThe the query string by which to query for users. - - - -The maximum number of results. - - - -This parameter is used to get the next ‘page’ of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified. - - - -A comma separated list of User fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Tweet fields to display. - - -#### Returns - -`IteratorSearchResponse` - -### `unblock_dms` - -Unblock DMs -Unblocks direct messages to or from a specific User by their ID for the authenticated user. - -#### Parameters - - -The ID of the target User that the authenticated user requesting to unblock dms for. - - -#### Returns - -`UnblockDmsResponse` - Response data - -### `unfollow_list` - -Unfollow List -Causes the authenticated user to unfollow a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User that will unfollow the List. - - - -The ID of the List to unfollow. - - -#### Returns - -`UnfollowListResponse` - Response data - -### `unfollow_user` - -Unfollow User -Causes the authenticated user to unfollow a specific user by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to unfollow the target User. - - - -The ID of the User that the source User is requesting to unfollow. - - -#### Returns - -`UnfollowUserResponse` - Response data - -### `unlike_post` - -Unlike Post -Causes the authenticated user to Unlike a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to unlike the Post. - - - -The ID of the Post that the User is requesting to unlike. - - -#### Returns - -`UnlikePostResponse` - Response data - -### `unmute_user` - -Unmute User -Causes the authenticated user to unmute a specific user by their ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to unmute the target User. - - - -The ID of the User that the source User is requesting to unmute. - - -#### Returns - -`UnmuteUserResponse` - Response data - -### `unpin_list` - -Unpin List -Causes the authenticated user to unpin a specific List by its ID. - -#### Parameters - - -The ID of the authenticated source User for whom to return results. - - - -The ID of the List to unpin. - - -#### Returns - -`UnpinListResponse` - Response data - -### `unrepost_post` - -Unrepost Post -Causes the authenticated user to unrepost a specific Post by its ID. - -#### Parameters - - -The ID of the authenticated source User that is requesting to repost the Post. - - - -The ID of the Post that the User is requesting to unretweet. - - -#### Returns - -`UnrepostPostResponse` - Response data - diff --git a/xdks/python/reference/xdk.users.models.mdx b/xdks/python/reference/xdk.users.models.mdx deleted file mode 100644 index c2966d7be..000000000 --- a/xdks/python/reference/xdk.users.models.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -title: "Users.Models" -sidebarTitle: "Users.Models" -description: "Reference for the users.models Python module in the X API SDK. Pydantic request and response models for the users endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the users endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -## BlockDmsResponse - -Class - -Bases: BaseModel - -Response model for block_dms - -## Methods - -### `class xdk.users.models.BlockDmsResponse` - -Response model for block_dms - -### `class xdk.users.models.CreateBookmarkResponse` - -Response model for create_bookmark - -### `class xdk.users.models.DeleteBookmarkResponse` - -Response model for delete_bookmark - -### `class xdk.users.models.FollowListResponse` - -Response model for follow_list - -### `class xdk.users.models.FollowUserResponse` - -Response model for follow_user - -### `class xdk.users.models.GetBlockingResponse` - -Response model for get_blocking - -### `class xdk.users.models.GetBookmarkFoldersResponse` - -Response model for get_bookmark_folders - -### `class xdk.users.models.GetBookmarksByFolderIdResponse` - -Response model for get_bookmarks_by_folder_id - -### `class xdk.users.models.GetBookmarksResponse` - -Response model for get_bookmarks - -### `class xdk.users.models.GetByIdResponse` - -Response model for get_by_id - -### `class xdk.users.models.GetByIdsResponse` - -Response model for get_by_ids - -### `class xdk.users.models.GetByUsernameResponse` - -Response model for get_by_username - -### `class xdk.users.models.GetByUsernamesResponse` - -Response model for get_by_usernames - -### `class xdk.users.models.GetFollowedListsResponse` - -Response model for get_followed_lists - -### `class xdk.users.models.GetFollowersResponse` - -Response model for get_followers - -### `class xdk.users.models.GetFollowingResponse` - -Response model for get_following - -### `class xdk.users.models.GetLikedPostsResponse` - -Response model for get_liked_posts - -### `class xdk.users.models.GetListMembershipsResponse` - -Response model for get_list_memberships - -### `class xdk.users.models.GetMeResponse` - -Response model for get_me - -### `class xdk.users.models.GetMentionsResponse` - -Response model for get_mentions - -### `class xdk.users.models.GetMutingResponse` - -Response model for get_muting - -### `class xdk.users.models.GetOwnedListsResponse` - -Response model for get_owned_lists - -### `class xdk.users.models.GetPinnedListsResponse` - -Response model for get_pinned_lists - -### `class xdk.users.models.GetPostsResponse` - -Response model for get_posts - -### `class xdk.users.models.GetRepostsOfMeResponse` - -Response model for get_reposts_of_me - -### `class xdk.users.models.GetTimelineResponse` - -Response model for get_timeline - -### `class xdk.users.models.LikePostResponse` - -Response model for like_post - -### `class xdk.users.models.MuteUserResponse` - -Response model for mute_user - -### `class xdk.users.models.PinListResponse` - -Response model for pin_list - -### `class xdk.users.models.RepostPostResponse` - -Response model for repost_post - -### `class xdk.users.models.SearchResponse` - -Response model for search - -### `class xdk.users.models.UnblockDmsResponse` - -Response model for unblock_dms - -### `class xdk.users.models.UnfollowListResponse` - -Response model for unfollow_list - -### `class xdk.users.models.UnfollowUserResponse` - -Response model for unfollow_user - -### `class xdk.users.models.UnlikePostResponse` - -Response model for unlike_post - -### `class xdk.users.models.UnmuteUserResponse` - -Response model for unmute_user - -### `class xdk.users.models.UnpinListResponse` - -Response model for unpin_list - -### `class xdk.users.models.UnrepostPostResponse` - -Response model for unrepost_post - diff --git a/xdks/python/reference/xdk.webhooks.client.mdx b/xdks/python/reference/xdk.webhooks.client.mdx deleted file mode 100644 index f1a0a15ae..000000000 --- a/xdks/python/reference/xdk.webhooks.client.mdx +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: "WebhooksClient" -sidebarTitle: "WebhooksClient" -description: "Reference for the webhooks.client Python module in the X API SDK. Client class and methods for calling the webhooks endpoints of the X API v2." ---- - -## WebhooksClient - -Class - -Bases: object - -Client for webhooks operations - -## Constructors - -### `__init__` - -#### Parameters - - - -### `create` - -Create webhook -Creates a new webhook configuration. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `create_stream_link` - -Create stream link -Creates a link to deliver FilteredStream events to the given webhook. - -#### Parameters - - -The webhook ID to link to your FilteredStream ruleset. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`CreateStreamLinkResponse` - Response data - -### `create_webhook_replay_job` - -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. -body: Request body -:returns: Response data -:rtype: CreateWebhookReplayJobResponse - -#### Parameters - - - -### `delete` - -Delete webhook -Deletes an existing webhook configuration. - -#### Parameters - - -The ID of the webhook to delete. - - -#### Returns - -`DeleteResponse` - Response data - -### `delete_stream_link` - -Delete stream link -Deletes a link from FilteredStream events to the given webhook. - -#### Parameters - - -The webhook ID to link to your FilteredStream ruleset. - - -#### Returns - -`DeleteStreamLinkResponse` - Response data - -### `get` - -Get webhook -Get a list of webhook configs associated with a client app. - -#### Parameters - - -A comma separated list of WebhookConfig fields to display. - - -#### Returns - -`GetResponse` - Response data - -### `get_stream_links` - -Get stream links -Get a list of webhook links associated with a filtered stream ruleset. -:returns: Response data -:rtype: GetStreamLinksResponse - -#### Returns - -`GetStreamLinksResponse` - -### `validate` - -Validate webhook -Triggers a CRC check for a given webhook. - -#### Parameters - - -The ID of the webhook to check. - - -#### Returns - -`ValidateResponse` - Response data - diff --git a/xdks/python/reference/xdk.webhooks.mdx b/xdks/python/reference/xdk.webhooks.mdx deleted file mode 100644 index e2303d4ba..000000000 --- a/xdks/python/reference/xdk.webhooks.mdx +++ /dev/null @@ -1,194 +0,0 @@ ---- -title: "WebhooksClient" -sidebarTitle: "WebhooksClient" -description: "Reference for the webhooks Python package in the X API SDK, grouping the client and Pydantic models for the webhooks endpoints of the X API v2." ---- - -## Submodules - -* [xdk.webhooks.client module](/xdks/python/reference/xdk.webhooks.client) - * [`WebhooksClient`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient) - * [`WebhooksClient.__init__()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.__init__) - * [`WebhooksClient.create()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.create) - * [`WebhooksClient.create_stream_link()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.create_stream_link) - * [`WebhooksClient.create_webhook_replay_job()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.create_webhook_replay_job) - * [`WebhooksClient.delete()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.delete) - * [`WebhooksClient.delete_stream_link()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.delete_stream_link) - * [`WebhooksClient.get()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.get) - * [`WebhooksClient.get_stream_links()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.get_stream_links) - * [`WebhooksClient.validate()`](/xdks/python/reference/xdk.webhooks.client#xdk.webhooks.client.WebhooksClient.validate) -* [xdk.webhooks.models module](/xdks/python/reference/xdk.webhooks.models) - * [`CreateRequest`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateRequest) - * [`CreateRequest.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateRequest.model_config) - * [`CreateResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateResponse) - * [`CreateResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateResponse.model_config) - * [`CreateStreamLinkResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateStreamLinkResponse) - * [`CreateStreamLinkResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateStreamLinkResponse.model_config) - * [`CreateWebhookReplayJobRequest`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateWebhookReplayJobRequest) - * [`CreateWebhookReplayJobRequest.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateWebhookReplayJobRequest.model_config) - * [`CreateWebhookReplayJobResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateWebhookReplayJobResponse) - * [`CreateWebhookReplayJobResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.CreateWebhookReplayJobResponse.model_config) - * [`DeleteResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.DeleteResponse) - * [`DeleteResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.DeleteResponse.model_config) - * [`DeleteStreamLinkResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.DeleteStreamLinkResponse) - * [`DeleteStreamLinkResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.DeleteStreamLinkResponse.model_config) - * [`GetResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.GetResponse) - * [`GetResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.GetResponse.model_config) - * [`GetStreamLinksResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.GetStreamLinksResponse) - * [`GetStreamLinksResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.GetStreamLinksResponse.model_config) - * [`ValidateResponse`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.ValidateResponse) - * [`ValidateResponse.model_config`](/xdks/python/reference/xdk.webhooks.models#xdk.webhooks.models.ValidateResponse.model_config) - -## Module contents - -This module provides access to the webhooks endpoints of the X API -and serves as the main entry point for all webhooks-related functionality. - -### `class xdk.webhooks.WebhooksClient` - -Client for webhooks operations - -#### Parameters - - - -### `__init__` - -#### Parameters - - - -### `create` - -Create webhook -Creates a new webhook configuration. -body: Request body -:returns: Response data -:rtype: CreateResponse - -#### Parameters - - - -### `create_stream_link` - -Create stream link -Creates a link to deliver FilteredStream events to the given webhook. - -#### Parameters - - -The webhook ID to link to your FilteredStream ruleset. - - - -A comma separated list of Tweet fields to display. - - - -A comma separated list of fields to expand. - - - -A comma separated list of Media fields to display. - - - -A comma separated list of Poll fields to display. - - - -A comma separated list of User fields to display. - - - -A comma separated list of Place fields to display. - - -#### Returns - -`CreateStreamLinkResponse` - Response data - -### `create_webhook_replay_job` - -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. -body: Request body -:returns: Response data -:rtype: CreateWebhookReplayJobResponse - -#### Parameters - - - -### `delete` - -Delete webhook -Deletes an existing webhook configuration. - -#### Parameters - - -The ID of the webhook to delete. - - -#### Returns - -`DeleteResponse` - Response data - -### `delete_stream_link` - -Delete stream link -Deletes a link from FilteredStream events to the given webhook. - -#### Parameters - - -The webhook ID to link to your FilteredStream ruleset. - - -#### Returns - -`DeleteStreamLinkResponse` - Response data - -### `get` - -Get webhook -Get a list of webhook configs associated with a client app. - -#### Parameters - - -A comma separated list of WebhookConfig fields to display. - - -#### Returns - -`GetResponse` - Response data - -### `get_stream_links` - -Get stream links -Get a list of webhook links associated with a filtered stream ruleset. -:returns: Response data -:rtype: GetStreamLinksResponse - -#### Returns - -`GetStreamLinksResponse` - -### `validate` - -Validate webhook -Triggers a CRC check for a given webhook. - -#### Parameters - - -The ID of the webhook to check. - - -#### Returns - -`ValidateResponse` - Response data - diff --git a/xdks/python/reference/xdk.webhooks.models.mdx b/xdks/python/reference/xdk.webhooks.models.mdx deleted file mode 100644 index 256c117b3..000000000 --- a/xdks/python/reference/xdk.webhooks.models.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "Webhooks.Models" -sidebarTitle: "Webhooks.Models" -description: "Reference for the webhooks.models Python module in the X API SDK. Pydantic request and response models for the webhooks endpoints of the X API v2." ---- - -This module provides Pydantic models for request and response data structures -for the webhooks endpoints of the X API. All models are generated -from the OpenAPI specification and provide type safety and validation. - -### class xdk.webhooks.models.CreateRequest - -Request model for create - - -Default: `{'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}` - -Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - - -## CreateResponse - -Class - -Bases: BaseModel - -Response model for create - -## Methods - -### `class xdk.webhooks.models.CreateResponse` - -Response model for create - -### `class xdk.webhooks.models.CreateStreamLinkResponse` - -Response model for create_stream_link - -### `class xdk.webhooks.models.CreateWebhookReplayJobResponse` - -Response model for create_webhook_replay_job - -### `class xdk.webhooks.models.DeleteResponse` - -Response model for delete - -### `class xdk.webhooks.models.DeleteStreamLinkResponse` - -Response model for delete_stream_link - -### `class xdk.webhooks.models.GetResponse` - -Response model for get - -### `class xdk.webhooks.models.GetStreamLinksResponse` - -Response model for get_stream_links - -### `class xdk.webhooks.models.ValidateResponse` - -Response model for validate - diff --git a/xdks/python/streaming.mdx b/xdks/python/streaming.mdx index 1623dba15..fab334410 100644 --- a/xdks/python/streaming.mdx +++ b/xdks/python/streaming.mdx @@ -87,10 +87,9 @@ for page in client.stream.get_rules(): print(f"ID: {rule_id}, Value: {rule_value}, Tag: {rule_tag}") break # Remove break to get all pages ``` -For full rule syntax, see [X Streaming Rules Docs](https://developer.x.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule). +For full rule syntax, see [Build a Rule](/x-api/posts/filtered-stream/integrate/build-a-rule). ## Troubleshooting - **403 Forbidden**: Invalid auth or insufficient permissions. -- **420 Enhance Your Calm**: Rate limited; wait and retry. +- **420 / 429 Rate Limited**: Back off exponentially before reconnecting. - **No Data**: Check rules with `get_rules()`; ensure matching Posts exist. -For detailed code examples using the Python XDK, check out our [code samples GitHub repo](https://github.com/xdevplatform/samples/tree/main/python). -For more examples and API reference, see the inline docstrings (e.g., `help(client.tweets.search_recent)`) or the generated stubs in the source. Contribute feedback via the [GitHub repo](https://github.com/xdevplatform/xdk/tree/main/xdk/python). +For detailed code examples using the Python XDK, check out the [xdk-python repository](https://github.com/xdevplatform/xdk-python) and [Python XDK Client Reference](/xdks/python/reference/clients/stream). diff --git a/xdks/typescript/install.mdx b/xdks/typescript/install.mdx index ae9d76809..f7a995593 100644 --- a/xdks/typescript/install.mdx +++ b/xdks/typescript/install.mdx @@ -1,44 +1,56 @@ --- -title: "Installation" -sidebarTitle: "Installation" - -description: "Get started with the TypeScript SDK for X API in your project. The SDK is written in TypeScript and includes full type definitions." +title: Install TypeScript XDK +sidebarTitle: Install +description: Install the official TypeScript and JavaScript SDK (@xdevplatform/xdk) from npm, pnpm, yarn, or bun for Node.js 18+. --- -Get started with the TypeScript SDK for X API in your project. +Install `@xdevplatform/xdk` from [npm](https://www.npmjs.com/package/@xdevplatform/xdk). -## Install +## Package Managers -```bash npm theme={null} +```bash npm npm install @xdevplatform/xdk ``` -```bash yarn theme={null} +```bash pnpm +pnpm add @xdevplatform/xdk +``` + +```bash yarn yarn add @xdevplatform/xdk ``` -```bash pnpm theme={null} -pnpm add @xdevplatform/xdk +```bash bun +bun add @xdevplatform/xdk ``` -## TypeScript Support +## Requirements -The SDK is written in TypeScript and includes full type definitions. No additional type packages are required. +- **Node.js 18+** (uses built-in `fetch` and Web Crypto) +- **TypeScript 5.0+** (optional; bundled `.d.ts` declarations are included out of the box) -## Requirements +## ESM and CommonJS -- Node.js 16+ -- TypeScript 4.5+ (if using TypeScript) +`@xdevplatform/xdk` ships dual module entrypoints: -## Next Steps + + +```typescript ESM +import { Client } from "@xdevplatform/xdk"; +``` + +```javascript CommonJS +const { Client } = require("@xdevplatform/xdk"); +``` + + -- [Authentication](/xdks/typescript/authentication) - Set up authentication -- [Quick Start](/xdks/typescript/overview) - Your first API call +## Next Steps - -For detailed code examples using the Javascript/TypeScript XDK, check out our [code samples GitHub repo](https://github.com/xdevplatform/samples/tree/main/javascript). - +- [Quickstart](/xdks/typescript/quickstart) — Make your first request +- [Authentication](/xdks/typescript/authentication) — Configure Bearer Token, OAuth 2.0 PKCE, or OAuth 1.0a +- [API Reference](/xdks/typescript/reference/overview) — Explore all 24 resource clients diff --git a/xdks/typescript/llms.txt b/xdks/typescript/llms.txt index bc258e931..d6e8fb2cb 100644 --- a/xdks/typescript/llms.txt +++ b/xdks/typescript/llms.txt @@ -1,115 +1,40 @@ -# TypeScript XDK +# TypeScript XDK (`@xdevplatform/xdk` v0.7.2) -> Official TypeScript/JavaScript SDK with full type safety, smart pagination, streaming, and exhaustive model definitions. +> Official TypeScript SDK for the X API v2 (Node.js 18+ (ESM & CommonJS)). Install with `npm install @xdevplatform/xdk`. -## Core -- [Authentication](https://docs.x.com/xdks/typescript/authentication.md): The TypeScript SDK supports multiple authentication methods for different use cases. -- [Installation](https://docs.x.com/xdks/typescript/install.md): Get started with the TypeScript SDK for X API in your project. ## Install ```bash npm theme={null} npm i -- [TypeScript XDK](https://docs.x.com/xdks/typescript/overview.md): Official TypeScript/JavaScript SDK for the X API v2 with full type safety, automatic pagination, event-driven streamin -- [Pagination](https://docs.x.com/xdks/typescript/pagination.md): The SDK provides generic paginator utilities you can use with any endpoint that returns paginated responses. Methods r -- [Streaming](https://docs.x.com/xdks/typescript/streaming.md): The TypeScript SDK provides real-time streaming capabilities for live data feeds. Connect to real-time sampled posts: +## Guides -## Reference -- [X API SDK v2.152 - v0.4.0](https://docs.x.com/xdks/typescript/reference/modules.md) -- [AccountActivityClient](https://docs.x.com/xdks/typescript/reference/classes/AccountActivityClient.md) -- [ActivityClient](https://docs.x.com/xdks/typescript/reference/classes/ActivityClient.md) -- [ApiError](https://docs.x.com/xdks/typescript/reference/classes/ApiError.md) -- [Client](https://docs.x.com/xdks/typescript/reference/classes/Client.md) -- [CommunitiesClient](https://docs.x.com/xdks/typescript/reference/classes/CommunitiesClient.md) -- [CommunityNotesClient](https://docs.x.com/xdks/typescript/reference/classes/CommunityNotesClient.md) -- [ComplianceClient](https://docs.x.com/xdks/typescript/reference/classes/ComplianceClient.md) -- [ConnectionsClient](https://docs.x.com/xdks/typescript/reference/classes/ConnectionsClient.md) -- [DirectMessagesClient](https://docs.x.com/xdks/typescript/reference/classes/DirectMessagesClient.md) -- [EventPaginator](https://docs.x.com/xdks/typescript/reference/classes/EventPaginator.md) -- [GeneralClient](https://docs.x.com/xdks/typescript/reference/classes/GeneralClient.md) -- [HttpClient](https://docs.x.com/xdks/typescript/reference/classes/HttpClient.md) -- [ListsClient](https://docs.x.com/xdks/typescript/reference/classes/ListsClient.md) -- [MediaClient](https://docs.x.com/xdks/typescript/reference/classes/MediaClient.md) -- [NewsClient](https://docs.x.com/xdks/typescript/reference/classes/NewsClient.md) -- [Paginator](https://docs.x.com/xdks/typescript/reference/classes/Paginator.md) -- [PostPaginator](https://docs.x.com/xdks/typescript/reference/classes/PostPaginator.md) -- [PostsClient](https://docs.x.com/xdks/typescript/reference/classes/PostsClient.md) -- [SpacesClient](https://docs.x.com/xdks/typescript/reference/classes/SpacesClient.md) -- [StreamClient](https://docs.x.com/xdks/typescript/reference/classes/StreamClient.md) -- [TrendsClient](https://docs.x.com/xdks/typescript/reference/classes/TrendsClient.md) -- [UsageClient](https://docs.x.com/xdks/typescript/reference/classes/UsageClient.md) -- [UserPaginator](https://docs.x.com/xdks/typescript/reference/classes/UserPaginator.md) -- [UsersClient](https://docs.x.com/xdks/typescript/reference/classes/UsersClient.md) -- [WebhooksClient](https://docs.x.com/xdks/typescript/reference/classes/WebhooksClient.md) -- [Namespace: AccountActivity](https://docs.x.com/xdks/typescript/reference/modules/AccountActivity.md) -- [Namespace: Activity](https://docs.x.com/xdks/typescript/reference/modules/Activity.md) -- [Namespace: Communities](https://docs.x.com/xdks/typescript/reference/modules/Communities.md) -- [Namespace: CommunityNotes](https://docs.x.com/xdks/typescript/reference/modules/CommunityNotes.md) -- [Namespace: Compliance](https://docs.x.com/xdks/typescript/reference/modules/Compliance.md) -- [Namespace: Connections](https://docs.x.com/xdks/typescript/reference/modules/Connections.md) -- [Namespace: DirectMessages](https://docs.x.com/xdks/typescript/reference/modules/DirectMessages.md) -- [Namespace: General](https://docs.x.com/xdks/typescript/reference/modules/General.md) -- [Namespace: Lists](https://docs.x.com/xdks/typescript/reference/modules/Lists.md) -- [Namespace: Media](https://docs.x.com/xdks/typescript/reference/modules/Media.md) -- [Namespace: News](https://docs.x.com/xdks/typescript/reference/modules/News.md) -- [Namespace: Posts](https://docs.x.com/xdks/typescript/reference/modules/Posts.md) -- [Namespace: Schemas](https://docs.x.com/xdks/typescript/reference/modules/Schemas.md) -- [Namespace: Spaces](https://docs.x.com/xdks/typescript/reference/modules/Spaces.md) -- [Namespace: Stream](https://docs.x.com/xdks/typescript/reference/modules/Stream.md) -- [Namespace: Trends](https://docs.x.com/xdks/typescript/reference/modules/Trends.md) -- [Namespace: Usage](https://docs.x.com/xdks/typescript/reference/modules/Usage.md) -- [Namespace: Users](https://docs.x.com/xdks/typescript/reference/modules/Users.md) -- [Namespace: Webhooks](https://docs.x.com/xdks/typescript/reference/modules/Webhooks.md) -- [ApiResponse](https://docs.x.com/xdks/typescript/reference/interfaces/ApiResponse.md) -- [ClientConfig](https://docs.x.com/xdks/typescript/reference/interfaces/ClientConfig.md) -- [HttpClientRequestOptions](https://docs.x.com/xdks/typescript/reference/interfaces/HttpClientRequestOptions.md) -- [HttpResponse](https://docs.x.com/xdks/typescript/reference/interfaces/HttpResponse.md) -- [PaginatedResponse](https://docs.x.com/xdks/typescript/reference/interfaces/PaginatedResponse.md) -- [PaginationMeta](https://docs.x.com/xdks/typescript/reference/interfaces/PaginationMeta.md) -- [RequestOptions](https://docs.x.com/xdks/typescript/reference/interfaces/RequestOptions.md) -- [ActivityStreamingResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse.md) -- [ActivitySubscription](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscription.md) -- [ActivitySubscriptionCreateRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest.md) -- [ActivitySubscriptionCreateResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse.md) -- [ActivitySubscriptionDeleteResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse.md) -- [ActivitySubscriptionFilter](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionFilter.md) -- [ActivitySubscriptionGetResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse.md) -- [ActivitySubscriptionUpdateRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest.md) -- [ActivitySubscriptionUpdateResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse.md) -- [AddOrDeleteRulesResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse.md) -- [AddRulesRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.AddRulesRequest.md) -- [AllowDownloadStatus](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.AllowDownloadStatus.md) -- [AltText](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.AltText.md) -- [Analytics](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.Analytics.md) -- [AppRulesCount](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.AppRulesCount.md) -- [AudiencePolicy](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.AudiencePolicy.md) -- [BookmarkAddRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest.md) -- [BookmarkFolderPostsResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse.md) -- [BookmarkFoldersResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse.md) -- [BookmarkMutationResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse.md) -- [CashtagFields](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CashtagFields.md) -- [ClientAppUsage](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ClientAppUsage.md) -- [Community](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.Community.md) -- [ComplianceJob](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ComplianceJob.md) -- [Connection](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.Connection.md) -- [ContentExpiration](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ContentExpiration.md) -- [ContextAnnotation](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ContextAnnotation.md) -- [ContextAnnotationDomainFields](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationDomainFields.md) -- [ContextAnnotationEntityFields](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationEntityFields.md) -- [CreateAttachmentsMessageRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateAttachmentsMessageRequest.md) -- [CreateComplianceJobRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest.md) -- [CreateComplianceJobResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse.md) -- [CreateDmConversationRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest.md) -- [CreateDmEventResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse.md) -- [CreateNoteRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest.md) -- [CreateNoteResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse.md) -- [CreateTextMessageRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.CreateTextMessageRequest.md) -- [DeleteDmResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse.md) -- [DeleteNoteResponse](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse.md) -- [DeleteRulesRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.DeleteRulesRequest.md) -- [DmEvent](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.DmEvent.md) -- [DmMediaAttachment](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment.md) -- [DomainRestrictions](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.DomainRestrictions.md) -- [Engagement](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.Engagement.md) -- [EntityIndicesInclusiveExclusive](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveExclusive.md) -- [EntityIndicesInclusiveInclusive](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveInclusive.md) -- [Error](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.Error.md) -- [EvaluateNoteRequest](https://docs.x.com/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest.md) +- [TypeScript overview](https://docs.x.com/xdks/typescript/overview.md): Architecture, capabilities, and client overview +- [TypeScript install](https://docs.x.com/xdks/typescript/install.md): Package installation and runtime requirements +- [TypeScript quickstart](https://docs.x.com/xdks/typescript/quickstart.md): First authenticated X API v2 request in under 2 minutes +- [TypeScript authentication](https://docs.x.com/xdks/typescript/authentication.md): Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a user-context setup +- [TypeScript pagination](https://docs.x.com/xdks/typescript/pagination.md): Automatic cursor iteration across multi-page endpoints +- [TypeScript streaming](https://docs.x.com/xdks/typescript/streaming.md): Real-time event streams with reconnection and lifecycle handling -## Full Documentation -- [llms-full.txt](https://docs.x.com/llms-full.txt) \ No newline at end of file +## Client Reference + +- [Reference Overview](https://docs.x.com/xdks/typescript/reference/overview.md): Main client options and resource client directory +- [`AccountClient` (Account)](https://docs.x.com/xdks/typescript/reference/clients/account.md): 2 methods via `client.account` +- [`AccountActivityClient` (Account Activity)](https://docs.x.com/xdks/typescript/reference/clients/account-activity.md): 5 methods via `client.accountActivity` +- [`ActivityClient` (Activity)](https://docs.x.com/xdks/typescript/reference/clients/activity.md): 5 methods via `client.activity` +- [`ArticlesClient` (Articles)](https://docs.x.com/xdks/typescript/reference/clients/articles.md): 2 methods via `client.articles` +- [`BotsClient` (Bots)](https://docs.x.com/xdks/typescript/reference/clients/bots.md): 6 methods via `client.bots` +- [`BroadcastsClient` (Broadcasts)](https://docs.x.com/xdks/typescript/reference/clients/broadcasts.md): 41 methods via `client.broadcasts` +- [`CallsClient` (Calls)](https://docs.x.com/xdks/typescript/reference/clients/calls.md): 10 methods via `client.calls` +- [`ChatClient` (Chat)](https://docs.x.com/xdks/typescript/reference/clients/chat.md): 45 methods via `client.chat` +- [`CommunitiesClient` (Communities)](https://docs.x.com/xdks/typescript/reference/clients/communities.md): 2 methods via `client.communities` +- [`CommunityNotesClient` (Community Notes)](https://docs.x.com/xdks/typescript/reference/clients/community-notes.md): 5 methods via `client.communityNotes` +- [`ComplianceClient` (Compliance)](https://docs.x.com/xdks/typescript/reference/clients/compliance.md): 6 methods via `client.compliance` +- [`ConnectionsClient` (Connections)](https://docs.x.com/xdks/typescript/reference/clients/connections.md): 4 methods via `client.connections` +- [`DirectMessagesClient` (Direct Messages)](https://docs.x.com/xdks/typescript/reference/clients/direct-messages.md): 9 methods via `client.directMessages` +- [`GeneralClient` (General)](https://docs.x.com/xdks/typescript/reference/clients/general.md): 1 methods via `client.general` +- [`ListsClient` (Lists)](https://docs.x.com/xdks/typescript/reference/clients/lists.md): 9 methods via `client.lists` +- [`MediaClient` (Media)](https://docs.x.com/xdks/typescript/reference/clients/media.md): 19 methods via `client.media` +- [`NewsClient` (News)](https://docs.x.com/xdks/typescript/reference/clients/news.md): 2 methods via `client.news` +- [`PostsClient` (Posts)](https://docs.x.com/xdks/typescript/reference/clients/posts.md): 17 methods via `client.posts` +- [`SpacesClient` (Spaces)](https://docs.x.com/xdks/typescript/reference/clients/spaces.md): 6 methods via `client.spaces` +- [`StreamClient` (Stream)](https://docs.x.com/xdks/typescript/reference/clients/stream.md): 18 methods via `client.stream` +- [`TrendsClient` (Trends)](https://docs.x.com/xdks/typescript/reference/clients/trends.md): 3 methods via `client.trends` +- [`UsageClient` (Usage)](https://docs.x.com/xdks/typescript/reference/clients/usage.md): 2 methods via `client.usage` +- [`UsersClient` (Users)](https://docs.x.com/xdks/typescript/reference/clients/users.md): 46 methods via `client.users` +- [`WebhooksClient` (Webhooks)](https://docs.x.com/xdks/typescript/reference/clients/webhooks.md): 8 methods via `client.webhooks` diff --git a/xdks/typescript/overview.mdx b/xdks/typescript/overview.mdx index 1c31ec186..2c39d2c52 100644 --- a/xdks/typescript/overview.mdx +++ b/xdks/typescript/overview.mdx @@ -1,63 +1,60 @@ --- -title: "TypeScript XDK" -sidebarTitle: "Overview" -description: "Overview of the TypeScript XDK for the X API v2, with smart pagination, OAuth 1.0a, OAuth 2.0, bearer token auth, real-time streaming, and full type safety." +title: TypeScript XDK +sidebarTitle: Overview +description: Official TypeScript and JavaScript SDK (@xdevplatform/xdk) for the X API v2 with full type definitions, OAuth 2.0 PKCE, pagination, and event-driven streaming. --- -A comprehensive TypeScript SDK for the X API (formerly Twitter API) with advanced features including smart pagination, multiple authentication methods, real-time streaming, and full type safety. +The **TypeScript XDK** (`@xdevplatform/xdk`) is X's official TypeScript and JavaScript client library for the X API v2, shipping dual ESM and CommonJS bundles with complete TypeScript definitions. -## Key Features - -- **🔐 Authentication**: User Context (OAuth1.0a, OAuth2.0), and App-Only (Bearer token) authentication -- **🔄 Pagination**: Automatic pagination with async iteration support -- **📡 Streaming**: Event-driven streaming with automatic reconnection -- **📚 Type Safety**: Complete TypeScript definitions for all endpoints and parameters -- **🎯 Full X API Support**: Users, Posts, Lists, Bookmarks, Communities, and more - -## Quick Start - - - -```typescript title="quickstart.ts" lines wrap icon="square-js" theme={null} -import { - Client, - type ClientConfig, - type Users -} from '@xdevplatform/xdk'; - -const config: ClientConfig = { bearerToken: 'your-bearer-token' }; + + + `npm install @xdevplatform/xdk` — Node.js 18+. + + + Source code, release notes, and issue tracker. + + -const client: Client = new Client(config); +## Key Features -async function main(): Promise { - const userResponse: Users.GetByUsernameResponse = await client.users.getByUsername('XDevelopers'); - const username: string = userResponse.data?.username!; - console.log(username); -} +- **Full Type Safety**: Strongly typed request bodies, option interfaces, and response schemas generated from OpenAPI. +- **Authentication**: Bearer Token (app-only), OAuth 2.0 User Context with PKCE, and OAuth 1.0a HMAC-SHA1 signing. +- **Smart Pagination**: `Paginator`, `PostPaginator`, `UserPaginator`, and `EventPaginator` with `for await (...)` support. +- **Event-Driven Streaming**: `EventDrivenStream` supporting both `.on('data', ...)` listeners and `for await (const event of stream)`. +- **Dual Module Format**: Native ESM (`import`) and CommonJS (`require`) builds for Node.js 18+ and modern runtimes. -main(); -``` +## Quick Example -```javascript quickstart.js theme={null} -import { Client } from '@xdevplatform/xdk'; +```typescript +import { Client } from "@xdevplatform/xdk"; -const client = new Client({ bearerToken: 'your-bearer-token' }); +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); -const userResponse = await client.users.getByUsername('XDevelopers'); -const username = userResponse.data.username; -console.log(username); +const userResponse = await client.users.getByUsername("XDevelopers", { + userFields: ["created_at", "public_metrics"], +}); +console.log(userResponse.data); ``` - - - -For detailed code examples using the Javascript/TypeScript XDK, check out our [code samples GitHub repo](https://github.com/xdevplatform/samples/tree/main/javascript). - - -## What's Next? - -- [Installation Guide](/xdks/typescript/install) - Set up the SDK in your project -- [Authentication](/xdks/typescript/authentication) - Learn about different auth methods -- [Pagination](/xdks/typescript/pagination) - Learn about data pagination -- [Streaming](/xdks/typescript/streaming) - Learn about real-time data streaming -- [API Reference](/xdks/typescript/reference/classes/Client) - Read the complete API documentation +## Guides & Reference + + + + Install with npm, pnpm, yarn, or bun. + + + Make your first typed X API v2 request. + + + Bearer Token, OAuth 2.0 PKCE, and OAuth 1.0a setup. + + + Async iteration with typed paginators. + + + Real-time streams with events and async iteration. + + + Full method & parameter reference for all 24 clients. + + diff --git a/xdks/typescript/quickstart.mdx b/xdks/typescript/quickstart.mdx new file mode 100644 index 000000000..bd4226a94 --- /dev/null +++ b/xdks/typescript/quickstart.mdx @@ -0,0 +1,51 @@ +--- +title: TypeScript Quickstart +sidebarTitle: Quickstart +description: Make your first X API v2 request in TypeScript or JavaScript using @xdevplatform/xdk and a Bearer Token. +--- + +Make your first authenticated X API v2 call with `@xdevplatform/xdk` in under two minutes. + + + +```bash +npm install @xdevplatform/xdk +``` + + + Copy your app's **Bearer Token** from the [X Developer Console](https://console.x.com) and export it in your shell: + +```bash +export X_BEARER_TOKEN="your_bearer_token_here" +``` + + + Save the following as `quickstart.ts` (or `quickstart.mjs` for plain JavaScript): + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const user = await client.users.getByUsername("XDevelopers", { + userFields: ["created_at", "description", "public_metrics"], +}); +console.log("User:", user.data); + +const posts = await client.posts.searchRecent("from:XDevelopers", { + maxResults: 10, + tweetFields: ["created_at", "public_metrics"], +}); +console.log("Recent posts:", posts.data); +``` + + Run it with Node.js (`npx tsx quickstart.ts` or `node quickstart.mjs`). + + + +## Next Steps + +- [Authentication](/xdks/typescript/authentication) — Post on behalf of users with OAuth 2.0 PKCE or OAuth 1.0a +- [Pagination](/xdks/typescript/pagination) — Page through large result sets with `UserPaginator` and `PostPaginator` +- [Streaming](/xdks/typescript/streaming) — Subscribe to real-time posts with `EventDrivenStream` +- [Client Reference](/xdks/typescript/reference/overview) — Full method and option types diff --git a/xdks/typescript/reference/classes/AccountActivityClient.mdx b/xdks/typescript/reference/classes/AccountActivityClient.mdx deleted file mode 100644 index d23bb990c..000000000 --- a/xdks/typescript/reference/classes/AccountActivityClient.mdx +++ /dev/null @@ -1,295 +0,0 @@ ---- -title: "AccountActivityClient" -sidebarTitle: "AccountActivityClient" -description: "Reference for the AccountActivityClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 account activity endpoints." ---- - -Client for account activity operations - -This client provides methods for interacting with the account activity endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all account activity related operations. - -## Constructors - -### constructor - -• **new AccountActivityClient**(`client`): [`AccountActivityClient`](/xdks/typescript/reference/classes/AccountActivityClient) - -Creates a new account activity client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`AccountActivityClient`](/xdks/typescript/reference/classes/AccountActivityClient) - -#### Defined in - -[account_activity/client.ts:70](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L70) - -## Methods - -### getSubscriptions - -▸ **getSubscriptions**(`webhookId`, `options`): `Promise`\<`Response`\> - -Get subscriptions -Retrieves a list of all active subscriptions for a given webhook. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `webhookId` | `string` | The webhook ID to pull subscriptions for. | -| `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 - -[account_activity/client.ts:115](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L115) - -▸ **getSubscriptions**(`webhookId`): `Promise`\<[`SubscriptionsListGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | - -#### Returns - -`Promise`\<[`SubscriptionsListGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse)\> - -#### Defined in - -[account_activity/client.ts:128](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L128) - -___ - -### deleteSubscription - -▸ **deleteSubscription**(`webhookId`, `userId`, `options`): `Promise`\<`Response`\> - -Delete subscription -Deletes an Account Activity subscription for the given webhook and user ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `webhookId` | `string` | The webhook ID to check subscription against. | -| `userId` | `string` | User ID to unsubscribe from. | -| `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 - -[account_activity/client.ts:217](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L217) - -▸ **deleteSubscription**(`webhookId`, `userId`): `Promise`\<[`SubscriptionsDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | -| `userId` | `string` | - -#### Returns - -`Promise`\<[`SubscriptionsDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse)\> - -#### Defined in - -[account_activity/client.ts:234](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L234) - -___ - -### validateSubscription - -▸ **validateSubscription**(`webhookId`, `options`): `Promise`\<`Response`\> - -Validate subscription -Checks a user’s Account Activity subscription for a given webhook. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `webhookId` | `string` | The webhook ID to check subscription against. | -| `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 - -[account_activity/client.ts:331](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L331) - -▸ **validateSubscription**(`webhookId`): `Promise`\<[`SubscriptionsGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | - -#### Returns - -`Promise`\<[`SubscriptionsGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse)\> - -#### Defined in - -[account_activity/client.ts:344](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L344) - -___ - -### createSubscription - -▸ **createSubscription**(`webhookId`, `options`): `Promise`\<`Response`\> - -Create subscription -Creates an Account Activity subscription for the user and the given webhook. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `webhookId` | `string` | The webhook ID to check subscription against. | -| `options` | `CreateSubscriptionOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[account_activity/client.ts:435](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L435) - -▸ **createSubscription**(`webhookId`, `options?`): `Promise`\<[`SubscriptionsCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | -| `options?` | `CreateSubscriptionOptions` | - -#### Returns - -`Promise`\<[`SubscriptionsCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse)\> - -#### Defined in - -[account_activity/client.ts:448](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L448) - -___ - -### createReplayJob - -▸ **createReplayJob**(`webhookId`, `fromDate`, `toDate`, `options`): `Promise`\<`Response`\> - -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 - -| Name | Type | Description | -| :------ | :------ | :------ | -| `webhookId` | `string` | The unique identifier for the webhook configuration. | -| `fromDate` | `string` | The oldest (starting) UTC timestamp (inclusive) from which events will be provided, in `yyyymmddhhmm` format. | -| `toDate` | `string` | The latest (ending) UTC timestamp (exclusive) up to which events will be provided, in `yyyymmddhhmm` format. | -| `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 - -[account_activity/client.ts:564](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L564) - -▸ **createReplayJob**(`webhookId`, `fromDate`, `toDate`): `Promise`\<[`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | -| `fromDate` | `string` | -| `toDate` | `string` | - -#### Returns - -`Promise`\<[`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)\> - -#### Defined in - -[account_activity/client.ts:585](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L585) - -___ - -### getSubscriptionCount - -▸ **getSubscriptionCount**(`options`): `Promise`\<`Response`\> - -Get subscription count -Retrieves a count of currently active Account Activity subscriptions. - -#### 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 - -[account_activity/client.ts:704](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L704) - -▸ **getSubscriptionCount**(): `Promise`\<[`SubscriptionsCountGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse)\> - -#### Returns - -`Promise`\<[`SubscriptionsCountGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse)\> - -#### Defined in - -[account_activity/client.ts:713](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L713) diff --git a/xdks/typescript/reference/classes/ActivityClient.mdx b/xdks/typescript/reference/classes/ActivityClient.mdx deleted file mode 100644 index 637d37eb6..000000000 --- a/xdks/typescript/reference/classes/ActivityClient.mdx +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: "ActivityClient" -sidebarTitle: "ActivityClient" -description: "Reference for the ActivityClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 activity endpoints." ---- - -Client for activity operations - -This client provides methods for interacting with the activity endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all activity related operations. - -## Constructors - -### constructor - -• **new ActivityClient**(`client`): [`ActivityClient`](/xdks/typescript/reference/classes/ActivityClient) - -Creates a new activity client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`ActivityClient`](/xdks/typescript/reference/classes/ActivityClient) - -#### Defined in - -[activity/client.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L118) - -## Methods - -### getSubscriptions - -▸ **getSubscriptions**(`options`): `Promise`\<`Response`\> - -Get X activity subscriptions -Get a list of active subscriptions for XAA - -#### 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 - -[activity/client.ts:159](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L159) - -▸ **getSubscriptions**(): `Promise`\<[`ActivitySubscriptionGetResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse)\> - -#### Returns - -`Promise`\<[`ActivitySubscriptionGetResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse)\> - -#### Defined in - -[activity/client.ts:168](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L168) - -___ - -### createSubscription - -▸ **createSubscription**(`options`): `Promise`\<`Response`\> - -Create X activity subscription -Creates a subscription for an X activity event - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `CreateSubscriptionOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[activity/client.ts:237](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L237) - -▸ **createSubscription**(`options?`): `Promise`\<[`ActivitySubscriptionCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateSubscriptionOptions` | - -#### Returns - -`Promise`\<[`ActivitySubscriptionCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse)\> - -#### Defined in - -[activity/client.ts:246](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L246) - -___ - -### stream - -▸ **stream**(`options`): `Promise`\<`Response`\> - -Activity Stream -Stream of X Activities - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `StreamOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[activity/client.ts:332](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L332) - -▸ **stream**(`options?`): `Promise`\<[`ActivityStreamingResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `StreamOptions` | - -#### Returns - -`Promise`\<[`ActivityStreamingResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse)\> - -#### Defined in - -[activity/client.ts:341](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L341) - -___ - -### updateSubscription - -▸ **updateSubscription**(`subscriptionId`, `options`): `Promise`\<`Response`\> - -Update X activity subscription -Updates a subscription for an X activity event - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `subscriptionId` | `string` | The ID of the subscription to update. | -| `options` | `UpdateSubscriptionOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[activity/client.ts:487](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L487) - -▸ **updateSubscription**(`subscriptionId`, `options?`): `Promise`\<[`ActivitySubscriptionUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `subscriptionId` | `string` | -| `options?` | `UpdateSubscriptionOptions` | - -#### Returns - -`Promise`\<[`ActivitySubscriptionUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse)\> - -#### Defined in - -[activity/client.ts:500](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L500) - -___ - -### deleteSubscription - -▸ **deleteSubscription**(`subscriptionId`, `options`): `Promise`\<`Response`\> - -Deletes X activity subscription -Deletes a subscription for an X activity event - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `subscriptionId` | `string` | The ID of the subscription 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 - -[activity/client.ts:602](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L602) - -▸ **deleteSubscription**(`subscriptionId`): `Promise`\<[`ActivitySubscriptionDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `subscriptionId` | `string` | - -#### Returns - -`Promise`\<[`ActivitySubscriptionDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse)\> - -#### Defined in - -[activity/client.ts:615](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L615) diff --git a/xdks/typescript/reference/classes/ApiError.mdx b/xdks/typescript/reference/classes/ApiError.mdx deleted file mode 100644 index 562a811ac..000000000 --- a/xdks/typescript/reference/classes/ApiError.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "ApiError" -sidebarTitle: "ApiError" -description: "Reference for the ApiError class in the X API TypeScript SDK. Properties and methods for inspecting HTTP status, error codes, and X API error responses." ---- - -API Error class for handling X API errors - -## Hierarchy - -- `Error` - - ↳ **`ApiError`** - -## Constructors - -### constructor - -• **new ApiError**(`message`, `status`, `statusText`, `headers`, `data?`): [`ApiError`](/xdks/typescript/reference/classes/ApiError) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `message` | `string` | -| `status` | `number` | -| `statusText` | `string` | -| `headers` | `Headers` | -| `data?` | `any` | - -#### Returns - -[`ApiError`](/xdks/typescript/reference/classes/ApiError) - -#### Overrides - -Error.constructor - - - -[client.ts:123](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/client.ts#L123) - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/classes/Client.mdx b/xdks/typescript/reference/classes/Client.mdx deleted file mode 100644 index 892cf4c70..000000000 --- a/xdks/typescript/reference/classes/Client.mdx +++ /dev/null @@ -1,252 +0,0 @@ ---- -title: "Client" -sidebarTitle: "Client" -description: "Reference for the main Client class in the X API TypeScript SDK, the entry point exposing specialized clients for every X API v2 endpoint group." ---- - -Main client class for the X API - -This is the primary entry point for interacting with the X API. It provides -access to all API endpoints through specialized client modules and handles -authentication, request configuration, and error handling. - -**`Example`** - -```typescript title="Example" lines wrap icon="square-js" -import { Client } from '@xdevplatform/xdk'; - -const client = new Client({ - bearerToken: 'your-bearer-token' -}); - -// Get user information -const user = await client.users.getUser('783214'); - -// Get followers with pagination -const followers = await client.users.getFollowers('783214', { - maxResults: 10, - userFields: ['id', 'name', 'username'] -}); - -// Iterate through followers -for await (const follower of followers) { - console.log(follower.username); -} -``` - -## Constructors - -### constructor - -• **new Client**(`config`): [`Client`](/xdks/typescript/reference/classes/Client) - -Creates a new X API client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `config` | `any` | Configuration options for the client | - -#### Returns - -[`Client`](/xdks/typescript/reference/classes/Client) - -**`Example`** - -```typescript title="Example" lines wrap icon="square-js" -// Bearer token authentication -const client = new Client({ - bearerToken: 'your-bearer-token' -}); - -// OAuth2 authentication -const client = new Client({ - accessToken: 'your-access-token' -}); - -// OAuth1 authentication -const client = new Client({ - oauth1: oauth1Instance -}); -``` - - - -[client.ts:401](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/client.ts#L401) - -## Properties - - -Base URL for API requests - - - - -Bearer token for authentication - - - - -OAuth2 access token - - - - -OAuth1 instance for authentication - - - - -Headers for requests - - - - -Request timeout in milliseconds - - - - -Whether to automatically retry failed requests - - - - -Maximum number of retry attempts - - - - -HTTP client for making requests - - - - -general client - - - - -account activity client - - - - -community notes client - - - - -compliance client - - - - -connections client - - - - -users client - - - - -news client - - - - -spaces client - - - - -activity client - - - - -usage client - - - - -trends client - - - - -posts client - - - - -direct messages client - - - - -communities client - - - - -media client - - - - -webhooks client - - - - -stream client - - - - -lists client - - - - -Make an authenticated request to the X API - -This method handles authentication, request formatting, and error handling -for all API requests. It automatically adds the appropriate authentication -headers based on the client configuration. - - - - -Check if the OAuth2 token is expired - - - - -Refresh the OAuth2 token - - - - -Get the current authentication status - - - - -Map OpenAPI security scheme names to internal authentication types - - - - -Validate that the required authentication method is available - - - - -Get available authentication types - - diff --git a/xdks/typescript/reference/classes/CommunitiesClient.mdx b/xdks/typescript/reference/classes/CommunitiesClient.mdx deleted file mode 100644 index 0b947fa08..000000000 --- a/xdks/typescript/reference/classes/CommunitiesClient.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "CommunitiesClient" -sidebarTitle: "CommunitiesClient" -description: "Reference for the CommunitiesClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 communities endpoints." ---- - -Client for communities operations - -This client provides methods for interacting with the communities endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all communities related operations. - -## Constructors - -### constructor - -• **new CommunitiesClient**(`client`): [`CommunitiesClient`](/xdks/typescript/reference/classes/CommunitiesClient) - -Creates a new communities client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`CommunitiesClient`](/xdks/typescript/reference/classes/CommunitiesClient) - -#### Defined in - -[communities/client.ts:102](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L102) - -## Methods - -### search - -▸ **search**(`query`, `options`): `Promise`\<`Response`\> - -Search Communities -Retrieves a list of Communities matching the specified search query. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | Query to search communities. | -| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[communities/client.ts:147](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L147) - -▸ **search**(`query`, `options?`): `Promise`\<[`Get2CommunitiesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `SearchOptions` | - -#### Returns - -`Promise`\<[`Get2CommunitiesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse)\> - -#### Defined in - -[communities/client.ts:160](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L160) - -___ - -### getById - -▸ **getById**(`id`, `options`): `Promise`\<`Response`\> - -Get Community by ID -Retrieves details of a specific Community by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the Community. | -| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[communities/client.ts:352](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L352) - -▸ **getById**(`id`, `options?`): `Promise`\<[`Get2CommunitiesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetByIdOptions` | - -#### Returns - -`Promise`\<[`Get2CommunitiesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse)\> - -#### Defined in - -[communities/client.ts:365](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/client.ts#L365) diff --git a/xdks/typescript/reference/classes/CommunityNotesClient.mdx b/xdks/typescript/reference/classes/CommunityNotesClient.mdx deleted file mode 100644 index bbb7b8bbf..000000000 --- a/xdks/typescript/reference/classes/CommunityNotesClient.mdx +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: "CommunityNotesClient" -sidebarTitle: "CommunityNotesClient" -description: "Reference for the CommunityNotesClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 community notes endpoints." ---- - -Client for community notes operations - -This client provides methods for interacting with the community notes endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all community notes related operations. - -## Constructors - -### constructor - -• **new CommunityNotesClient**(`client`): [`CommunityNotesClient`](/xdks/typescript/reference/classes/CommunityNotesClient) - -Creates a new community notes client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`CommunityNotesClient`](/xdks/typescript/reference/classes/CommunityNotesClient) - -#### Defined in - -[community_notes/client.ts:186](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L186) - -## Methods - -### searchEligiblePosts - -▸ **searchEligiblePosts**(`testMode`, `options`): `Promise`\<`Response`\> - -Search for Posts Eligible for Community Notes -Returns all the posts that are eligible for community notes. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `testMode` | `boolean` | If true, return a list of posts that are for the test. If false, return a list of posts that the bots can write proposed notes on the product. | -| `options` | `SearchEligiblePostsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[community_notes/client.ts:231](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L231) - -▸ **searchEligiblePosts**(`testMode`, `options?`): `Promise`\<[`Get2NotesSearchPostsEligibleForNotesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `testMode` | `boolean` | -| `options?` | `SearchEligiblePostsOptions` | - -#### Returns - -`Promise`\<[`Get2NotesSearchPostsEligibleForNotesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse)\> - -#### Defined in - -[community_notes/client.ts:244](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L244) - -___ - -### evaluate - -▸ **evaluate**(`options`): `Promise`\<`Response`\> - -Evaluate a Community Note -Endpoint to evaluate a community note. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `EvaluateOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[community_notes/client.ts:535](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L535) - -▸ **evaluate**(`options?`): `Promise`\<[`EvaluateNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `EvaluateOptions` | - -#### Returns - -`Promise`\<[`EvaluateNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse)\> - -#### Defined in - -[community_notes/client.ts:544](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L544) - -___ - -### searchWritten - -▸ **searchWritten**(`testMode`, `options`): `Promise`\<`Response`\> - -Search for Community Notes Written -Returns all the community notes written by the user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `testMode` | `boolean` | If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product. | -| `options` | `SearchWrittenOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[community_notes/client.ts:640](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L640) - -▸ **searchWritten**(`testMode`, `options?`): `Promise`\<[`Get2NotesSearchNotesWrittenResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `testMode` | `boolean` | -| `options?` | `SearchWrittenOptions` | - -#### Returns - -`Promise`\<[`Get2NotesSearchNotesWrittenResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse)\> - -#### Defined in - -[community_notes/client.ts:653](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L653) - -___ - -### delete - -▸ **delete**(`id`, `options`): `Promise`\<`Response`\> - -Delete a Community Note -Deletes a community note. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The community note id 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 - -[community_notes/client.ts:826](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L826) - -▸ **delete**(`id`): `Promise`\<[`DeleteNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Returns - -`Promise`\<[`DeleteNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse)\> - -#### Defined in - -[community_notes/client.ts:839](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L839) - -___ - -### create - -▸ **create**(`options`): `Promise`\<`Response`\> - -Create a Community Note -Creates a community note endpoint for LLM use case. - -#### 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 - -[community_notes/client.ts:926](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L926) - -▸ **create**(`options?`): `Promise`\<[`CreateNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateOptions` | - -#### Returns - -`Promise`\<[`CreateNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse)\> - -#### Defined in - -[community_notes/client.ts:935](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/client.ts#L935) diff --git a/xdks/typescript/reference/classes/ComplianceClient.mdx b/xdks/typescript/reference/classes/ComplianceClient.mdx deleted file mode 100644 index 415b753e1..000000000 --- a/xdks/typescript/reference/classes/ComplianceClient.mdx +++ /dev/null @@ -1,163 +0,0 @@ ---- -title: "ComplianceClient" -sidebarTitle: "ComplianceClient" -description: "Reference for the ComplianceClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 compliance endpoints." ---- - -Client for compliance operations - -This client provides methods for interacting with the compliance endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all compliance related operations. - -## Constructors - -### constructor - -• **new ComplianceClient**(`client`): [`ComplianceClient`](/xdks/typescript/reference/classes/ComplianceClient) - -Creates a new compliance client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`ComplianceClient`](/xdks/typescript/reference/classes/ComplianceClient) - -#### Defined in - -[compliance/client.ts:93](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L93) - -## Methods - -### getJobsById - -▸ **getJobsById**(`id`, `options`): `Promise`\<`Response`\> - -Get Compliance Job by ID -Retrieves details of a specific Compliance Job by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the Compliance Job to retrieve. | -| `options` | `GetJobsByIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[compliance/client.ts:138](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L138) - -▸ **getJobsById**(`id`, `options?`): `Promise`\<[`Get2ComplianceJobsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetJobsByIdOptions` | - -#### Returns - -`Promise`\<[`Get2ComplianceJobsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse)\> - -#### Defined in - -[compliance/client.ts:151](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L151) - -___ - -### getJobs - -▸ **getJobs**(`type`, `options`): `Promise`\<`Response`\> - -Get Compliance Jobs -Retrieves a list of Compliance Jobs filtered by job type and optional status. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `type` | `string` | Type of Compliance Job to list. | -| `options` | `GetJobsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[compliance/client.ts:273](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L273) - -▸ **getJobs**(`type`, `options?`): `Promise`\<[`Get2ComplianceJobsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `type` | `string` | -| `options?` | `GetJobsOptions` | - -#### Returns - -`Promise`\<[`Get2ComplianceJobsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse)\> - -#### Defined in - -[compliance/client.ts:286](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L286) - -___ - -### createJobs - -▸ **createJobs**(`body`, `options`): `Promise`\<`Response`\> - -Create Compliance Job -Creates a new Compliance Job for the specified job type. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `body` | [`CreateComplianceJobRequest`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest) | A request to create a new batch compliance job. | -| `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 - -[compliance/client.ts:430](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L430) - -▸ **createJobs**(`body`): `Promise`\<[`CreateComplianceJobResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `body` | [`CreateComplianceJobRequest`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest) | - -#### Returns - -`Promise`\<[`CreateComplianceJobResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse)\> - -#### Defined in - -[compliance/client.ts:441](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/client.ts#L441) diff --git a/xdks/typescript/reference/classes/ConnectionsClient.mdx b/xdks/typescript/reference/classes/ConnectionsClient.mdx deleted file mode 100644 index 146ef9336..000000000 --- a/xdks/typescript/reference/classes/ConnectionsClient.mdx +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "ConnectionsClient" -sidebarTitle: "ConnectionsClient" -description: "Reference for the ConnectionsClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 connections endpoints." ---- - -Client for connections operations - -This client provides methods for interacting with the connections endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all connections related operations. - -## Constructors - -### constructor - -• **new ConnectionsClient**(`client`): [`ConnectionsClient`](/xdks/typescript/reference/classes/ConnectionsClient) - -Creates a new connections client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`ConnectionsClient`](/xdks/typescript/reference/classes/ConnectionsClient) - -#### Defined in - -[connections/client.ts:88](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L88) - -## Methods - -### getConnectionHistory - -▸ **getConnectionHistory**(`options`): `Promise`\<`Response`\> - -Get Connection History -Returns active and historical streaming connections with disconnect reasons for the authenticated application. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `GetConnectionHistoryOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[connections/client.ts:129](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L129) - -▸ **getConnectionHistory**(`options?`): `Promise`\<[`Get2ConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `GetConnectionHistoryOptions` | - -#### Returns - -`Promise`\<[`Get2ConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse)\> - -#### Defined in - -[connections/client.ts:138](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L138) - -___ - -### deleteAll - -▸ **deleteAll**(`options`): `Promise`\<`Response`\> - -Terminate all connections -Terminates all active streaming connections for the authenticated application. - -#### 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 - -[connections/client.ts:318](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L318) - -▸ **deleteAll**(): `Promise`\<[`KillAllConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse)\> - -#### Returns - -`Promise`\<[`KillAllConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse)\> - -#### Defined in - -[connections/client.ts:327](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/client.ts#L327) diff --git a/xdks/typescript/reference/classes/DirectMessagesClient.mdx b/xdks/typescript/reference/classes/DirectMessagesClient.mdx deleted file mode 100644 index ab900d339..000000000 --- a/xdks/typescript/reference/classes/DirectMessagesClient.mdx +++ /dev/null @@ -1,374 +0,0 @@ ---- -title: "DirectMessagesClient" -sidebarTitle: "DirectMessagesClient" -description: "Reference for the DirectMessagesClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 direct messages endpoints." ---- - -Client for direct messages operations - -This client provides methods for interacting with the direct messages endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all direct messages related operations. - -## Constructors - -### constructor - -• **new DirectMessagesClient**(`client`): [`DirectMessagesClient`](/xdks/typescript/reference/classes/DirectMessagesClient) - -Creates a new direct messages client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`DirectMessagesClient`](/xdks/typescript/reference/classes/DirectMessagesClient) - -#### Defined in - -[direct_messages/client.ts:340](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L340) - -## Methods - -### createByConversationId - -▸ **createByConversationId**(`dmConversationId`, `options`): `Promise`\<`Response`\> - -Create DM message by conversation ID -Sends a new direct message to a specific conversation by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `dmConversationId` | `string` | The DM Conversation ID. | -| `options` | `CreateByConversationIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[direct_messages/client.ts:385](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L385) - -▸ **createByConversationId**(`dmConversationId`, `options?`): `Promise`\<[`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `dmConversationId` | `string` | -| `options?` | `CreateByConversationIdOptions` | - -#### Returns - -`Promise`\<[`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse)\> - -#### Defined in - -[direct_messages/client.ts:398](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L398) - -___ - -### getEventsByConversationId - -▸ **getEventsByConversationId**(`id`, `options`): `Promise`\<`Response`\> - -Get DM events for a DM conversation -Retrieves direct message events for a specific conversation. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The DM conversation ID. | -| `options` | `GetEventsByConversationIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[direct_messages/client.ts:506](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L506) - -▸ **getEventsByConversationId**(`id`, `options?`): `Promise`\<[`Get2DmConversationsIdDmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetEventsByConversationIdOptions` | - -#### Returns - -`Promise`\<[`Get2DmConversationsIdDmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse)\> - -#### Defined in - -[direct_messages/client.ts:519](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L519) - -___ - -### createConversation - -▸ **createConversation**(`options`): `Promise`\<`Response`\> - -Create DM conversation -Initiates a new direct message conversation with specified participants. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `CreateConversationOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[direct_messages/client.ts:784](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L784) - -▸ **createConversation**(`options?`): `Promise`\<[`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateConversationOptions` | - -#### Returns - -`Promise`\<[`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse)\> - -#### Defined in - -[direct_messages/client.ts:793](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L793) - -___ - -### getEventsByParticipantId - -▸ **getEventsByParticipantId**(`participantId`, `options`): `Promise`\<`Response`\> - -Get DM events for a DM conversation -Retrieves direct message events for a specific conversation. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `participantId` | `string` | The ID of the participant user for the One to One DM conversation. | -| `options` | `GetEventsByParticipantIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[direct_messages/client.ts:889](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L889) - -▸ **getEventsByParticipantId**(`participantId`, `options?`): `Promise`\<[`Get2DmConversationsWithParticipantIdDmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `participantId` | `string` | -| `options?` | `GetEventsByParticipantIdOptions` | - -#### Returns - -`Promise`\<[`Get2DmConversationsWithParticipantIdDmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse)\> - -#### Defined in - -[direct_messages/client.ts:902](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L902) - -___ - -### getEvents - -▸ **getEvents**(`options`): `Promise`\<`Response`\> - -Get DM events -Retrieves a list of recent direct message events across all conversations. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `GetEventsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[direct_messages/client.ts:1167](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1167) - -▸ **getEvents**(`options?`): `Promise`\<[`Get2DmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `GetEventsOptions` | - -#### Returns - -`Promise`\<[`Get2DmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse)\> - -#### Defined in - -[direct_messages/client.ts:1176](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1176) - -___ - -### getEventsById - -▸ **getEventsById**(`eventId`, `options`): `Promise`\<`Response`\> - -Get DM event by ID -Retrieves details of a specific direct message event by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `eventId` | `string` | dm event id. | -| `options` | `GetEventsByIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[direct_messages/client.ts:1433](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1433) - -▸ **getEventsById**(`eventId`, `options?`): `Promise`\<[`Get2DmEventsEventIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `eventId` | `string` | -| `options?` | `GetEventsByIdOptions` | - -#### Returns - -`Promise`\<[`Get2DmEventsEventIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse)\> - -#### Defined in - -[direct_messages/client.ts:1446](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1446) - -___ - -### deleteEvents - -▸ **deleteEvents**(`eventId`, `options`): `Promise`\<`Response`\> - -Delete DM event -Deletes a specific direct message event by its ID, if owned by the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `eventId` | `string` | The ID of the direct-message event 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 - -[direct_messages/client.ts:1656](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1656) - -▸ **deleteEvents**(`eventId`): `Promise`\<[`DeleteDmResponse`](/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `eventId` | `string` | - -#### Returns - -`Promise`\<[`DeleteDmResponse`](/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse)\> - -#### Defined in - -[direct_messages/client.ts:1669](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1669) - -___ - -### createByParticipantId - -▸ **createByParticipantId**(`participantId`, `options`): `Promise`\<`Response`\> - -Create DM message by participant ID -Sends a new direct message to a specific participant by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `participantId` | `string` | The ID of the recipient user that will receive the DM. | -| `options` | `CreateByParticipantIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[direct_messages/client.ts:1760](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1760) - -▸ **createByParticipantId**(`participantId`, `options?`): `Promise`\<[`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `participantId` | `string` | -| `options?` | `CreateByParticipantIdOptions` | - -#### Returns - -`Promise`\<[`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse)\> - -#### Defined in - -[direct_messages/client.ts:1773](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/client.ts#L1773) diff --git a/xdks/typescript/reference/classes/EventPaginator.mdx b/xdks/typescript/reference/classes/EventPaginator.mdx deleted file mode 100644 index 5eab10ec0..000000000 --- a/xdks/typescript/reference/classes/EventPaginator.mdx +++ /dev/null @@ -1,377 +0,0 @@ ---- -title: "EventPaginator" -sidebarTitle: "EventPaginator" -description: "Reference for the EventPaginator class in the X API TypeScript SDK. Iterate paginated event results with async iterators and cursor helpers." ---- - -Paginator for events (like DM events) - -## Hierarchy - -- [`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\> - - ↳ **`EventPaginator`** - -## Constructors - -### constructor - -• **new EventPaginator**(`fetchPage`): [`EventPaginator`](/xdks/typescript/reference/classes/EventPaginator) - -Creates a new paginator instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `fetchPage` | (`token?`: `string`) => `Promise`\<[`PaginatedResponse`](/xdks/typescript/reference/interfaces/PaginatedResponse)\<`any`\>\> | Function that fetches a page of data given a pagination token | - -#### Returns - -[`EventPaginator`](/xdks/typescript/reference/classes/EventPaginator) - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[constructor](/xdks/typescript/reference/classes/Paginator#constructor) - -#### Defined in - -[paginator.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L90) - -## Accessors - -### items - -• `get` **items**(): `T`[] - -Get all fetched items - -#### Returns - -`T`[] - -#### Inherited from - -Paginator.items - -#### Defined in - -[paginator.ts:97](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L97) - -___ - -### meta - -• `get` **meta**(): `any` - -Get current pagination metadata - -#### Returns - -`any` - -#### Inherited from - -Paginator.meta - -#### Defined in - -[paginator.ts:104](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L104) - -___ - -### includes - -• `get` **includes**(): `undefined` \| `Record`\<`string`, `any`\> - -Get current includes data - -#### Returns - -`undefined` \| `Record`\<`string`, `any`\> - -#### Inherited from - -Paginator.includes - -#### Defined in - -[paginator.ts:111](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L111) - -___ - -### errors - -• `get` **errors**(): `undefined` \| `any`[] - -Get current errors - -#### Returns - -`undefined` \| `any`[] - -#### Inherited from - -Paginator.errors - -#### Defined in - -[paginator.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L118) - -___ - -### done - -• `get` **done**(): `boolean` - -Check if pagination is done - -#### Returns - -`boolean` - -#### Inherited from - -Paginator.done - -#### Defined in - -[paginator.ts:125](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L125) - -___ - -### rateLimited - -• `get` **rateLimited**(): `boolean` - -Check if rate limit was hit - -#### Returns - -`boolean` - -#### Inherited from - -Paginator.rateLimited - -#### Defined in - -[paginator.ts:132](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L132) - -___ - -### events - -• `get` **events**(): `any`[] - -#### Returns - -`any`[] - -#### Defined in - -[paginator.ts:362](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L362) - -## Methods - -### fetchNext - -▸ **fetchNext**(): `Promise`\<`void`\> - -Fetch the next page and add items to current instance - -This method fetches the next page of data and appends the items to the -current paginator instance. It updates the pagination state and metadata. - -#### Returns - -`Promise`\<`void`\> - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page -console.log(followers.items.length); // Number of followers - -if (!followers.done) { - await followers.fetchNext(); // Fetch second page - console.log(followers.items.length); // Total followers across pages -} -``` - -**`Throws`** - -When the API request fails - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchNext](/xdks/typescript/reference/classes/Paginator#fetchnext) - -#### Defined in - -[paginator.ts:156](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L156) - -___ - -### next - -▸ **next**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -Get next page as a new instance - -This method creates a new paginator instance that starts from the next page, -without affecting the current paginator's state. - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -New paginator instance for the next page - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page - -if (!followers.done) { - const nextPage = await followers.next(); // Get next page as new instance - console.log(followers.items.length); // Still first page - console.log(nextPage.items.length); // Second page -} -``` - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[next](/xdks/typescript/reference/classes/Paginator#next) - -#### Defined in - -[paginator.ts:211](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L211) - -___ - -### fetchPrevious - -▸ **fetchPrevious**(): `Promise`\<`void`\> - -Fetch previous page (if supported) - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchPrevious](/xdks/typescript/reference/classes/Paginator#fetchprevious) - -#### Defined in - -[paginator.ts:225](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L225) - -___ - -### previous - -▸ **previous**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -Get previous page as a new instance - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[previous](/xdks/typescript/reference/classes/Paginator#previous) - -#### Defined in - -[paginator.ts:260](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L260) - -___ - -### fetchLast - -▸ **fetchLast**(`count`): `Promise`\<`void`\> - -Fetch up to a specified number of additional items - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `count` | `number` | - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchLast](/xdks/typescript/reference/classes/Paginator#fetchlast) - -#### Defined in - -[paginator.ts:274](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L274) - -___ - -### reset - -▸ **reset**(): `void` - -Reset paginator to initial state - -#### Returns - -`void` - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[reset](/xdks/typescript/reference/classes/Paginator#reset) - -#### Defined in - -[paginator.ts:288](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L288) - -___ - -### [iterator] - -▸ **[iterator]**(): `Iterator`\<`any`, `any`, `undefined`\> - -Iterator for all fetched items - -#### Returns - -`Iterator`\<`any`, `any`, `undefined`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[[iterator]](/xdks/typescript/reference/classes/Paginator#iterator) - -#### Defined in - -[paginator.ts:303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L303) - -___ - -### [asyncIterator] - -▸ **[asyncIterator]**(): `AsyncIterator`\<`any`, `any`, `undefined`\> - -Async iterator that fetches pages automatically - -#### Returns - -`AsyncIterator`\<`any`, `any`, `undefined`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[[asyncIterator]](/xdks/typescript/reference/classes/Paginator#asynciterator) - -#### Defined in - -[paginator.ts:312](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L312) diff --git a/xdks/typescript/reference/classes/GeneralClient.mdx b/xdks/typescript/reference/classes/GeneralClient.mdx deleted file mode 100644 index a109b41b0..000000000 --- a/xdks/typescript/reference/classes/GeneralClient.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "GeneralClient" -sidebarTitle: "GeneralClient" -description: "Reference for the GeneralClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 general endpoints." ---- - -Client for general operations - -This client provides methods for interacting with the general endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all general related operations. - -## Constructors - -### constructor - -• **new GeneralClient**(`client`): [`GeneralClient`](/xdks/typescript/reference/classes/GeneralClient) - -Creates a new general client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`GeneralClient`](/xdks/typescript/reference/classes/GeneralClient) - -#### Defined in - -[general/client.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/general/client.ts#L42) - -## Methods - -### getOpenApiSpec - -▸ **getOpenApiSpec**(`options`): `Promise`\<`Response`\> - -Get OpenAPI Spec. -Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md) - -#### 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 - -[general/client.ts:83](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/general/client.ts#L83) - -▸ **getOpenApiSpec**(): `Promise`\<[`GetOpenApiSpecResponse`](/xdks/typescript/reference/modules/General#getopenapispecresponse)\> - -#### Returns - -`Promise`\<[`GetOpenApiSpecResponse`](/xdks/typescript/reference/modules/General#getopenapispecresponse)\> - -#### Defined in - -[general/client.ts:92](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/general/client.ts#L92) diff --git a/xdks/typescript/reference/classes/HttpClient.mdx b/xdks/typescript/reference/classes/HttpClient.mdx deleted file mode 100644 index b0855b0ff..000000000 --- a/xdks/typescript/reference/classes/HttpClient.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: "HttpClient" -sidebarTitle: "HttpClient" -description: "Reference for the HttpClient class in the X API TypeScript SDK. Universal HTTP client for Node.js and browsers used to send requests to the X API." ---- - -Universal HTTP client that works in both Node.js and browser environments - -## Constructors - -### constructor - -• **new HttpClient**(): [`HttpClient`](/xdks/typescript/reference/classes/HttpClient) - -#### Returns - -[`HttpClient`](/xdks/typescript/reference/classes/HttpClient) - -#### Defined in - -[http-client.ts:43](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L43) - -## Methods - -### createHeaders - -▸ **createHeaders**(`init?`): `Headers` - -Create a new Headers instance - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `init?` | `Record`\<`string`, `string`\> \| `Headers` | - -#### Returns - -`Headers` - -#### Defined in - -[http-client.ts:99](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L99) - -___ - -### request - -▸ **request**(`url`, `options?`): `Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -Make an HTTP request - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `url` | `string` | -| `options` | [`HttpClientRequestOptions`](/xdks/typescript/reference/interfaces/HttpClientRequestOptions) | - -#### Returns - -`Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -#### Defined in - -[http-client.ts:106](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L106) - -___ - -### get - -▸ **get**(`url`, `headers?`): `Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -Make a GET request - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `url` | `string` | -| `headers?` | `Record`\<`string`, `string`\> | - -#### Returns - -`Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -#### Defined in - -[http-client.ts:141](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L141) - -___ - -### post - -▸ **post**(`url`, `body?`, `headers?`): `Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -Make a POST request - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `url` | `string` | -| `body?` | `string` | -| `headers?` | `Record`\<`string`, `string`\> | - -#### Returns - -`Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -#### Defined in - -[http-client.ts:151](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L151) - -___ - -### put - -▸ **put**(`url`, `body?`, `headers?`): `Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -Make a PUT request - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `url` | `string` | -| `body?` | `string` | -| `headers?` | `Record`\<`string`, `string`\> | - -#### Returns - -`Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -#### Defined in - -[http-client.ts:162](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L162) - -___ - -### delete - -▸ **delete**(`url`, `headers?`): `Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -Make a DELETE request - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `url` | `string` | -| `headers?` | `Record`\<`string`, `string`\> | - -#### Returns - -`Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -#### Defined in - -[http-client.ts:173](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L173) - -___ - -### patch - -▸ **patch**(`url`, `body?`, `headers?`): `Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -Make a PATCH request - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `url` | `string` | -| `body?` | `string` | -| `headers?` | `Record`\<`string`, `string`\> | - -#### Returns - -`Promise`\<[`HttpResponse`](/xdks/typescript/reference/interfaces/HttpResponse)\> - -#### Defined in - -[http-client.ts:183](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L183) diff --git a/xdks/typescript/reference/classes/ListsClient.mdx b/xdks/typescript/reference/classes/ListsClient.mdx deleted file mode 100644 index d91c30bcc..000000000 --- a/xdks/typescript/reference/classes/ListsClient.mdx +++ /dev/null @@ -1,422 +0,0 @@ ---- -title: "ListsClient" -sidebarTitle: "ListsClient" -description: "Reference for the ListsClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 lists endpoints." ---- - -Client for lists operations - -This client provides methods for interacting with the lists endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all lists related operations. - -## Constructors - -### constructor - -• **new ListsClient**(`client`): [`ListsClient`](/xdks/typescript/reference/classes/ListsClient) - -Creates a new lists client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`ListsClient`](/xdks/typescript/reference/classes/ListsClient) - -#### Defined in - -[lists/client.ts:294](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L294) - -## Methods - -### getFollowers - -▸ **getFollowers**(`id`, `options`): `Promise`\<`Response`\> - -Get List followers -Retrieves a list of Users who follow a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List. | -| `options` | `GetFollowersOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[lists/client.ts:339](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L339) - -▸ **getFollowers**(`id`, `options?`): `Promise`\<[`Get2ListsIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetFollowersOptions` | - -#### Returns - -`Promise`\<[`Get2ListsIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse)\> - -#### Defined in - -[lists/client.ts:352](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L352) - -___ - -### create - -▸ **create**(`options`): `Promise`\<`Response`\> - -Create List -Creates a new List for the authenticated user. - -#### 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 - -[lists/client.ts:560](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L560) - -▸ **create**(`options?`): `Promise`\<[`ListCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateOptions` | - -#### Returns - -`Promise`\<[`ListCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse)\> - -#### Defined in - -[lists/client.ts:569](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L569) - -___ - -### getMembers - -▸ **getMembers**(`id`, `options`): `Promise`\<`Response`\> - -Get List members -Retrieves a list of Users who are members of a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List. | -| `options` | `GetMembersOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[lists/client.ts:665](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L665) - -▸ **getMembers**(`id`, `options?`): `Promise`\<[`Get2ListsIdMembersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetMembersOptions` | - -#### Returns - -`Promise`\<[`Get2ListsIdMembersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse)\> - -#### Defined in - -[lists/client.ts:678](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L678) - -___ - -### addMember - -▸ **addMember**(`id`, `options`): `Promise`\<`Response`\> - -Add List member -Adds a User to a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List for which to add a member. | -| `options` | `AddMemberOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[lists/client.ts:890](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L890) - -▸ **addMember**(`id`, `options?`): `Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `AddMemberOptions` | - -#### Returns - -`Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)\> - -#### Defined in - -[lists/client.ts:903](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L903) - -___ - -### getPosts - -▸ **getPosts**(`id`, `options`): `Promise`\<`Response`\> - -Get List Posts -Retrieves a list of Posts associated with a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List. | -| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[lists/client.ts:1011](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1011) - -▸ **getPosts**(`id`, `options?`): `Promise`\<[`Get2ListsIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetPostsOptions` | - -#### Returns - -`Promise`\<[`Get2ListsIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse)\> - -#### Defined in - -[lists/client.ts:1024](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1024) - -___ - -### removeMemberByUserId - -▸ **removeMemberByUserId**(`id`, `userId`, `options`): `Promise`\<`Response`\> - -Remove List member -Removes a User from a specific List by its ID and the User’s ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List to remove a member. | -| `userId` | `string` | The ID of User that will be removed from the List. | -| `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 - -[lists/client.ts:1303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1303) - -▸ **removeMemberByUserId**(`id`, `userId`): `Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `userId` | `string` | - -#### Returns - -`Promise`\<[`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse)\> - -#### Defined in - -[lists/client.ts:1320](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1320) - -___ - -### getById - -▸ **getById**(`id`, `options`): `Promise`\<`Response`\> - -Get List by ID -Retrieves details of a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List. | -| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[lists/client.ts:1423](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1423) - -▸ **getById**(`id`, `options?`): `Promise`\<[`Get2ListsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetByIdOptions` | - -#### Returns - -`Promise`\<[`Get2ListsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse)\> - -#### Defined in - -[lists/client.ts:1436](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1436) - -___ - -### update - -▸ **update**(`id`, `options`): `Promise`\<`Response`\> - -Update List -Updates the details of a specific List owned by the authenticated user by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List to modify. | -| `options` | `UpdateOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[lists/client.ts:1610](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1610) - -▸ **update**(`id`, `options?`): `Promise`\<[`ListUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `UpdateOptions` | - -#### Returns - -`Promise`\<[`ListUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse)\> - -#### Defined in - -[lists/client.ts:1623](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1623) - -___ - -### delete - -▸ **delete**(`id`, `options`): `Promise`\<`Response`\> - -Delete List -Deletes a specific List owned by the authenticated user by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the List 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 - -[lists/client.ts:1731](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1731) - -▸ **delete**(`id`): `Promise`\<[`ListDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Returns - -`Promise`\<[`ListDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse)\> - -#### Defined in - -[lists/client.ts:1744](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/client.ts#L1744) diff --git a/xdks/typescript/reference/classes/MediaClient.mdx b/xdks/typescript/reference/classes/MediaClient.mdx deleted file mode 100644 index 43004e1df..000000000 --- a/xdks/typescript/reference/classes/MediaClient.mdx +++ /dev/null @@ -1,508 +0,0 @@ ---- -title: "MediaClient" -sidebarTitle: "MediaClient" -description: "Reference for the MediaClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 media endpoints." ---- - -Client for media operations - -This client provides methods for interacting with the media endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all media related operations. - -zeUpload](/xdks/typescript/reference/classes/MediaClient#finalizeupload) -- [initializeUpload](/xdks/typescript/reference/classes/MediaClient#initializeupload) -- [createSubtitles](/xdks/typescript/reference/classes/MediaClient#createsubtitles) -- [deleteSubtitles](/xdks/typescript/reference/classes/MediaClient#deletesubtitles) - -## Constructors - -### constructor - -• **new MediaClient**(`client`): [`MediaClient`](/xdks/typescript/reference/classes/MediaClient) - -Creates a new media client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`MediaClient`](/xdks/typescript/reference/classes/MediaClient) - -#### Defined in - -[media/client.ts:250](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L250) - -## Methods - -### getByKey - -▸ **getByKey**(`mediaKey`, `options`): `Promise`\<`Response`\> - -Get Media by media key -Retrieves details of a specific Media file by its media key. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `mediaKey` | `string` | A single Media Key. | -| `options` | `GetByKeyOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:295](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L295) - -▸ **getByKey**(`mediaKey`, `options?`): `Promise`\<[`Get2MediaMediaKeyResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `mediaKey` | `string` | -| `options?` | `GetByKeyOptions` | - -#### Returns - -`Promise`\<[`Get2MediaMediaKeyResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse)\> - -#### Defined in - -[media/client.ts:308](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L308) - -___ - -### getUploadStatus - -▸ **getUploadStatus**(`mediaId`, `options`): `Promise`\<`Response`\> - -Get Media upload status -Retrieves the status of a Media upload by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `mediaId` | `string` | Media id for the requested media upload status. | -| `options` | `GetUploadStatusOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:442](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L442) - -▸ **getUploadStatus**(`mediaId`, `options?`): `Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `mediaId` | `string` | -| `options?` | `GetUploadStatusOptions` | - -#### Returns - -`Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Defined in - -[media/client.ts:455](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L455) - -___ - -### upload - -▸ **upload**(`options`): `Promise`\<`Response`\> - -Upload media -Uploads a media file for use in posts or other content. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `UploadOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:582](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L582) - -▸ **upload**(`options?`): `Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `UploadOptions` | - -#### Returns - -`Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Defined in - -[media/client.ts:591](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L591) - -___ - -### getAnalytics - -▸ **getAnalytics**(`mediaKeys`, `endTime`, `startTime`, `granularity`, `options`): `Promise`\<`Response`\> - -Get Media analytics -Retrieves analytics data for media. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `mediaKeys` | `any`[] | A comma separated list of Media Keys. Up to 100 are allowed in a single request. | -| `endTime` | `string` | YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. | -| `startTime` | `string` | YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. | -| `granularity` | `string` | The granularity for the search counts results. | -| `options` | `GetAnalyticsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:699](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L699) - -▸ **getAnalytics**(`mediaKeys`, `endTime`, `startTime`, `granularity`, `options?`): `Promise`\<[`MediaAnalytics`](/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `mediaKeys` | `any`[] | -| `endTime` | `string` | -| `startTime` | `string` | -| `granularity` | `string` | -| `options?` | `GetAnalyticsOptions` | - -#### Returns - -`Promise`\<[`MediaAnalytics`](/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics)\> - -#### Defined in - -[media/client.ts:724](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L724) - -___ - -### appendUpload - -▸ **appendUpload**(`id`, `options`): `Promise`\<`Response`\> - -Append Media upload -Appends data to a Media upload request. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The media identifier for the media to perform the append operation. | -| `options` | `AppendUploadOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:918](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L918) - -▸ **appendUpload**(`id`, `options?`): `Promise`\<[`MediaUploadAppendResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `AppendUploadOptions` | - -#### Returns - -`Promise`\<[`MediaUploadAppendResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse)\> - -#### Defined in - -[media/client.ts:931](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L931) - -___ - -### getByKeys - -▸ **getByKeys**(`mediaKeys`, `options`): `Promise`\<`Response`\> - -Get Media by media keys -Retrieves details of Media files by their media keys. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `mediaKeys` | `any`[] | A comma separated list of Media Keys. Up to 100 are allowed in a single request. | -| `options` | `GetByKeysOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:1039](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1039) - -▸ **getByKeys**(`mediaKeys`, `options?`): `Promise`\<[`Get2MediaResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `mediaKeys` | `any`[] | -| `options?` | `GetByKeysOptions` | - -#### Returns - -`Promise`\<[`Get2MediaResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse)\> - -#### Defined in - -[media/client.ts:1052](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1052) - -___ - -### createMetadata - -▸ **createMetadata**(`options`): `Promise`\<`Response`\> - -Create Media metadata -Creates metadata for a Media file. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `CreateMetadataOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:1191](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1191) - -▸ **createMetadata**(`options?`): `Promise`\<[`MetadataCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateMetadataOptions` | - -#### Returns - -`Promise`\<[`MetadataCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse)\> - -#### Defined in - -[media/client.ts:1200](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1200) - -___ - -### finalizeUpload - -▸ **finalizeUpload**(`id`, `options`): `Promise`\<`Response`\> - -Finalize Media upload -Finalizes a Media upload request. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The media id of the targeted media to finalize. | -| `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 - -[media/client.ts:1296](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1296) - -▸ **finalizeUpload**(`id`): `Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Returns - -`Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Defined in - -[media/client.ts:1309](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1309) - -___ - -### initializeUpload - -▸ **initializeUpload**(`options`): `Promise`\<`Response`\> - -Initialize media upload -Initializes a media upload. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `InitializeUploadOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:1396](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1396) - -▸ **initializeUpload**(`options?`): `Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `InitializeUploadOptions` | - -#### Returns - -`Promise`\<[`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse)\> - -#### Defined in - -[media/client.ts:1405](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1405) - -___ - -### createSubtitles - -▸ **createSubtitles**(`options`): `Promise`\<`Response`\> - -Create Media subtitles -Creates subtitles for a specific Media file. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `CreateSubtitlesOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:1497](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1497) - -▸ **createSubtitles**(`options?`): `Promise`\<[`SubtitlesCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateSubtitlesOptions` | - -#### Returns - -`Promise`\<[`SubtitlesCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse)\> - -#### Defined in - -[media/client.ts:1506](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1506) - -___ - -### deleteSubtitles - -▸ **deleteSubtitles**(`options`): `Promise`\<`Response`\> - -Delete Media subtitles -Deletes subtitles for a specific Media file. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `DeleteSubtitlesOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[media/client.ts:1598](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1598) - -▸ **deleteSubtitles**(`options?`): `Promise`\<[`SubtitlesDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `DeleteSubtitlesOptions` | - -#### Returns - -`Promise`\<[`SubtitlesDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse)\> - -#### Defined in - -[media/client.ts:1607](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/client.ts#L1607) diff --git a/xdks/typescript/reference/classes/NewsClient.mdx b/xdks/typescript/reference/classes/NewsClient.mdx deleted file mode 100644 index b5b9a23d7..000000000 --- a/xdks/typescript/reference/classes/NewsClient.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "NewsClient" -sidebarTitle: "NewsClient" -description: "Reference for the NewsClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 news endpoints." ---- - -Client for news operations - -This client provides methods for interacting with the news endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all news related operations. - -## Constructors - -### constructor - -• **new NewsClient**(`client`): [`NewsClient`](/xdks/typescript/reference/classes/NewsClient) - -Creates a new news client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`NewsClient`](/xdks/typescript/reference/classes/NewsClient) - -#### Defined in - -[news/client.ts:96](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L96) - -## Methods - -### get - -▸ **get**(`id`, `options`): `Promise`\<`Response`\> - -Get news stories by ID -Retrieves news story by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the news story. | -| `options` | `GetOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[news/client.ts:141](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L141) - -▸ **get**(`id`, `options?`): `Promise`\<[`Get2NewsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetOptions` | - -#### Returns - -`Promise`\<[`Get2NewsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse)\> - -#### Defined in - -[news/client.ts:154](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L154) - -___ - -### search - -▸ **search**(`query`, `options`): `Promise`\<`Response`\> - -Search News -Retrieves a list of News stories matching the specified search query. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | The search query. | -| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[news/client.ts:288](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L288) - -▸ **search**(`query`, `options?`): `Promise`\<[`Get2NewsSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `SearchOptions` | - -#### Returns - -`Promise`\<[`Get2NewsSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse)\> - -#### Defined in - -[news/client.ts:301](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L301) diff --git a/xdks/typescript/reference/classes/Paginator.mdx b/xdks/typescript/reference/classes/Paginator.mdx deleted file mode 100644 index 6c1fbf0d0..000000000 --- a/xdks/typescript/reference/classes/Paginator.mdx +++ /dev/null @@ -1,355 +0,0 @@ ---- -title: "Paginator" -sidebarTitle: "Paginator" -description: "Reference for the Paginator class in the X API TypeScript SDK. Iterate paginated response results with async iterators and cursor helpers." ---- - -X API paginator with rich functionality - -This class provides comprehensive pagination support for the X API, including: -- Automatic iteration with `for await...of` loops -- Manual page control with `fetchNext()` and `fetchPrevious()` -- Metadata access for pagination tokens and counts -- Error handling and rate limit detection -- Support for both forward and backward pagination - -**`Example`** - -```typescript title="Example" lines wrap icon="square-js" -// Automatic iteration -const followers = await client.users.getFollowers('783214'); -for await (const follower of followers) { - console.log(follower.username); -} - -// Manual control -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); -console.log(followers.items.length); // Number of followers -console.log(followers.meta.nextToken); // Next page token - -// Check status -if (!followers.done) { - await followers.fetchNext(); -} -``` - -## Type parameters - -| Name | Description | -| :------ | :------ | -| `T` | The type of items being paginated | - -## Hierarchy - -- **`Paginator`** - - ↳ [`PostPaginator`](/xdks/typescript/reference/classes/PostPaginator) - - ↳ [`UserPaginator`](/xdks/typescript/reference/classes/UserPaginator) - - ↳ [`EventPaginator`](/xdks/typescript/reference/classes/EventPaginator) - -## Implements - -- `AsyncIterable`\<`T`\> - -## Constructors - -### constructor - -• **new Paginator**\<`T`\>(`fetchPage`): [`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`T`\> - -Creates a new paginator instance - -#### Type parameters - -| Name | -| :------ | -| `T` | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `fetchPage` | (`token?`: `string`) => `Promise`\<[`PaginatedResponse`](/xdks/typescript/reference/interfaces/PaginatedResponse)\<`T`\>\> | Function that fetches a page of data given a pagination token | - -#### Returns - -[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`T`\> - -#### Defined in - -[paginator.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L90) - -## Accessors - -### items - -• `get` **items**(): `T`[] - -Get all fetched items - -#### Returns - -`T`[] - -#### Defined in - -[paginator.ts:97](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L97) - -___ - -### meta - -• `get` **meta**(): `any` - -Get current pagination metadata - -#### Returns - -`any` - -#### Defined in - -[paginator.ts:104](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L104) - -___ - -### includes - -• `get` **includes**(): `undefined` \| `Record`\<`string`, `any`\> - -Get current includes data - -#### Returns - -`undefined` \| `Record`\<`string`, `any`\> - -#### Defined in - -[paginator.ts:111](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L111) - -___ - -### errors - -• `get` **errors**(): `undefined` \| `any`[] - -Get current errors - -#### Returns - -`undefined` \| `any`[] - -#### Defined in - -[paginator.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L118) - -___ - -### done - -• `get` **done**(): `boolean` - -Check if pagination is done - -#### Returns - -`boolean` - -#### Defined in - -[paginator.ts:125](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L125) - -___ - -### rateLimited - -• `get` **rateLimited**(): `boolean` - -Check if rate limit was hit - -#### Returns - -`boolean` - -#### Defined in - -[paginator.ts:132](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L132) - -## Methods - -### fetchNext - -▸ **fetchNext**(): `Promise`\<`void`\> - -Fetch the next page and add items to current instance - -This method fetches the next page of data and appends the items to the -current paginator instance. It updates the pagination state and metadata. - -#### Returns - -`Promise`\<`void`\> - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page -console.log(followers.items.length); // Number of followers - -if (!followers.done) { - await followers.fetchNext(); // Fetch second page - console.log(followers.items.length); // Total followers across pages -} -``` - -**`Throws`** - -When the API request fails - -#### Defined in - -[paginator.ts:156](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L156) - -___ - -### next - -▸ **next**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`T`\>\> - -Get next page as a new instance - -This method creates a new paginator instance that starts from the next page, -without affecting the current paginator's state. - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`T`\>\> - -New paginator instance for the next page - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page - -if (!followers.done) { - const nextPage = await followers.next(); // Get next page as new instance - console.log(followers.items.length); // Still first page - console.log(nextPage.items.length); // Second page -} -``` - -#### Defined in - -[paginator.ts:211](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L211) - -___ - -### fetchPrevious - -▸ **fetchPrevious**(): `Promise`\<`void`\> - -Fetch previous page (if supported) - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[paginator.ts:225](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L225) - -___ - -### previous - -▸ **previous**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`T`\>\> - -Get previous page as a new instance - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`T`\>\> - -#### Defined in - -[paginator.ts:260](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L260) - -___ - -### fetchLast - -▸ **fetchLast**(`count`): `Promise`\<`void`\> - -Fetch up to a specified number of additional items - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `count` | `number` | - -#### Returns - -`Promise`\<`void`\> - -#### Defined in - -[paginator.ts:274](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L274) - -___ - -### reset - -▸ **reset**(): `void` - -Reset paginator to initial state - -#### Returns - -`void` - -#### Defined in - -[paginator.ts:288](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L288) - -___ - -### [iterator] - -▸ **[iterator]**(): `Iterator`\<`T`, `any`, `undefined`\> - -Iterator for all fetched items - -#### Returns - -`Iterator`\<`T`, `any`, `undefined`\> - -#### Defined in - -[paginator.ts:303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L303) - -___ - -### [asyncIterator] - -▸ **[asyncIterator]**(): `AsyncIterator`\<`T`, `any`, `undefined`\> - -Async iterator that fetches pages automatically - -#### Returns - -`AsyncIterator`\<`T`, `any`, `undefined`\> - -#### Implementation of - -AsyncIterable.[asyncIterator] - -#### Defined in - -[paginator.ts:312](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L312) diff --git a/xdks/typescript/reference/classes/PostPaginator.mdx b/xdks/typescript/reference/classes/PostPaginator.mdx deleted file mode 100644 index 8572870cc..000000000 --- a/xdks/typescript/reference/classes/PostPaginator.mdx +++ /dev/null @@ -1,377 +0,0 @@ ---- -title: "PostPaginator" -sidebarTitle: "PostPaginator" -description: "Reference for the PostPaginator class in the X API TypeScript SDK. Iterate paginated post results with async iterators and cursor helpers." ---- - -Paginator for posts - -## Hierarchy - -- [`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\> - - ↳ **`PostPaginator`** - -## Constructors - -### constructor - -• **new PostPaginator**(`fetchPage`): [`PostPaginator`](/xdks/typescript/reference/classes/PostPaginator) - -Creates a new paginator instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `fetchPage` | (`token?`: `string`) => `Promise`\<[`PaginatedResponse`](/xdks/typescript/reference/interfaces/PaginatedResponse)\<`any`\>\> | Function that fetches a page of data given a pagination token | - -#### Returns - -[`PostPaginator`](/xdks/typescript/reference/classes/PostPaginator) - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[constructor](/xdks/typescript/reference/classes/Paginator#constructor) - -#### Defined in - -[paginator.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L90) - -## Accessors - -### items - -• `get` **items**(): `T`[] - -Get all fetched items - -#### Returns - -`T`[] - -#### Inherited from - -Paginator.items - -#### Defined in - -[paginator.ts:97](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L97) - -___ - -### meta - -• `get` **meta**(): `any` - -Get current pagination metadata - -#### Returns - -`any` - -#### Inherited from - -Paginator.meta - -#### Defined in - -[paginator.ts:104](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L104) - -___ - -### includes - -• `get` **includes**(): `undefined` \| `Record`\<`string`, `any`\> - -Get current includes data - -#### Returns - -`undefined` \| `Record`\<`string`, `any`\> - -#### Inherited from - -Paginator.includes - -#### Defined in - -[paginator.ts:111](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L111) - -___ - -### errors - -• `get` **errors**(): `undefined` \| `any`[] - -Get current errors - -#### Returns - -`undefined` \| `any`[] - -#### Inherited from - -Paginator.errors - -#### Defined in - -[paginator.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L118) - -___ - -### done - -• `get` **done**(): `boolean` - -Check if pagination is done - -#### Returns - -`boolean` - -#### Inherited from - -Paginator.done - -#### Defined in - -[paginator.ts:125](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L125) - -___ - -### rateLimited - -• `get` **rateLimited**(): `boolean` - -Check if rate limit was hit - -#### Returns - -`boolean` - -#### Inherited from - -Paginator.rateLimited - -#### Defined in - -[paginator.ts:132](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L132) - -___ - -### posts - -• `get` **posts**(): `any`[] - -#### Returns - -`any`[] - -#### Defined in - -[paginator.ts:342](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L342) - -## Methods - -### fetchNext - -▸ **fetchNext**(): `Promise`\<`void`\> - -Fetch the next page and add items to current instance - -This method fetches the next page of data and appends the items to the -current paginator instance. It updates the pagination state and metadata. - -#### Returns - -`Promise`\<`void`\> - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page -console.log(followers.items.length); // Number of followers - -if (!followers.done) { - await followers.fetchNext(); // Fetch second page - console.log(followers.items.length); // Total followers across pages -} -``` - -**`Throws`** - -When the API request fails - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchNext](/xdks/typescript/reference/classes/Paginator#fetchnext) - -#### Defined in - -[paginator.ts:156](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L156) - -___ - -### next - -▸ **next**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -Get next page as a new instance - -This method creates a new paginator instance that starts from the next page, -without affecting the current paginator's state. - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -New paginator instance for the next page - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page - -if (!followers.done) { - const nextPage = await followers.next(); // Get next page as new instance - console.log(followers.items.length); // Still first page - console.log(nextPage.items.length); // Second page -} -``` - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[next](/xdks/typescript/reference/classes/Paginator#next) - -#### Defined in - -[paginator.ts:211](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L211) - -___ - -### fetchPrevious - -▸ **fetchPrevious**(): `Promise`\<`void`\> - -Fetch previous page (if supported) - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchPrevious](/xdks/typescript/reference/classes/Paginator#fetchprevious) - -#### Defined in - -[paginator.ts:225](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L225) - -___ - -### previous - -▸ **previous**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -Get previous page as a new instance - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[previous](/xdks/typescript/reference/classes/Paginator#previous) - -#### Defined in - -[paginator.ts:260](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L260) - -___ - -### fetchLast - -▸ **fetchLast**(`count`): `Promise`\<`void`\> - -Fetch up to a specified number of additional items - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `count` | `number` | - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchLast](/xdks/typescript/reference/classes/Paginator#fetchlast) - -#### Defined in - -[paginator.ts:274](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L274) - -___ - -### reset - -▸ **reset**(): `void` - -Reset paginator to initial state - -#### Returns - -`void` - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[reset](/xdks/typescript/reference/classes/Paginator#reset) - -#### Defined in - -[paginator.ts:288](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L288) - -___ - -### [iterator] - -▸ **[iterator]**(): `Iterator`\<`any`, `any`, `undefined`\> - -Iterator for all fetched items - -#### Returns - -`Iterator`\<`any`, `any`, `undefined`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[[iterator]](/xdks/typescript/reference/classes/Paginator#iterator) - -#### Defined in - -[paginator.ts:303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L303) - -___ - -### [asyncIterator] - -▸ **[asyncIterator]**(): `AsyncIterator`\<`any`, `any`, `undefined`\> - -Async iterator that fetches pages automatically - -#### Returns - -`AsyncIterator`\<`any`, `any`, `undefined`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[[asyncIterator]](/xdks/typescript/reference/classes/Paginator#asynciterator) - -#### Defined in - -[paginator.ts:312](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L312) diff --git a/xdks/typescript/reference/classes/PostsClient.mdx b/xdks/typescript/reference/classes/PostsClient.mdx deleted file mode 100644 index 6c274715b..000000000 --- a/xdks/typescript/reference/classes/PostsClient.mdx +++ /dev/null @@ -1,741 +0,0 @@ ---- -title: "PostsClient" -sidebarTitle: "PostsClient" -description: "Reference for the PostsClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 posts endpoints." ---- - -Client for posts operations - -This client provides methods for interacting with the posts endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all posts related operations. - -## Constructors - -### constructor - -• **new PostsClient**(`client`): [`PostsClient`](/xdks/typescript/reference/classes/PostsClient) - -Creates a new posts client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`PostsClient`](/xdks/typescript/reference/classes/PostsClient) - -#### Defined in - -[posts/client.ts:789](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L789) - -## Methods - -### getInsights28hr - -▸ **getInsights28hr**(`tweetIds`, `granularity`, `requestedMetrics`, `options`): `Promise`\<`Response`\> - -Get 28-hour Post insights -Retrieves engagement metrics for specified Posts over the last 28 hours. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `tweetIds` | `any`[] | List of PostIds for 28hr metrics. | -| `granularity` | `string` | granularity of metrics response. | -| `requestedMetrics` | `any`[] | request metrics for historical request. | -| `options` | `GetInsights28hrOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:842](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L842) - -▸ **getInsights28hr**(`tweetIds`, `granularity`, `requestedMetrics`, `options?`): `Promise`\<[`Get2Insights28hrResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `tweetIds` | `any`[] | -| `granularity` | `string` | -| `requestedMetrics` | `any`[] | -| `options?` | `GetInsights28hrOptions` | - -#### Returns - -`Promise`\<[`Get2Insights28hrResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse)\> - -#### Defined in - -[posts/client.ts:863](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L863) - -___ - -### getAnalytics - -▸ **getAnalytics**(`ids`, `endTime`, `startTime`, `granularity`, `options`): `Promise`\<`Response`\> - -Get Post analytics -Retrieves analytics data for specified Posts within a defined time range. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `ids` | `any`[] | A comma separated list of Post IDs. Up to 100 are allowed in a single request. | -| `endTime` | `string` | YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. | -| `startTime` | `string` | YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. | -| `granularity` | `string` | The granularity for the search counts results. | -| `options` | `GetAnalyticsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:1052](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1052) - -▸ **getAnalytics**(`ids`, `endTime`, `startTime`, `granularity`, `options?`): `Promise`\<[`Analytics`](/xdks/typescript/reference/interfaces/Schemas.Analytics)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ids` | `any`[] | -| `endTime` | `string` | -| `startTime` | `string` | -| `granularity` | `string` | -| `options?` | `GetAnalyticsOptions` | - -#### Returns - -`Promise`\<[`Analytics`](/xdks/typescript/reference/interfaces/Schemas.Analytics)\> - -#### Defined in - -[posts/client.ts:1077](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1077) - -___ - -### getReposts - -▸ **getReposts**(`id`, `options`): `Promise`\<`Response`\> - -Get Reposts -Retrieves a list of Posts that repost a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | A single Post ID. | -| `options` | `GetRepostsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:1271](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1271) - -▸ **getReposts**(`id`, `options?`): `Promise`\<[`Get2TweetsIdRetweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetRepostsOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsIdRetweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse)\> - -#### Defined in - -[posts/client.ts:1284](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1284) - -___ - -### searchRecent - -▸ **searchRecent**(`query`, `options`): `Promise`\<`Response`\> - -Search recent Posts -Retrieves Posts from the last 7 days matching a search query. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. | -| `options` | `SearchRecentOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:1559](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1559) - -▸ **searchRecent**(`query`, `options?`): `Promise`\<[`Get2TweetsSearchRecentResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `SearchRecentOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsSearchRecentResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse)\> - -#### Defined in - -[posts/client.ts:1572](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1572) - -___ - -### searchAll - -▸ **searchAll**(`query`, `options`): `Promise`\<`Response`\> - -Search all Posts -Retrieves Posts from the full archive matching a search query. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. | -| `options` | `SearchAllOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:1968](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1968) - -▸ **searchAll**(`query`, `options?`): `Promise`\<[`Get2TweetsSearchAllResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `SearchAllOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsSearchAllResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse)\> - -#### Defined in - -[posts/client.ts:1981](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L1981) - -___ - -### getByIds - -▸ **getByIds**(`ids`, `options`): `Promise`\<`Response`\> - -Get Posts by IDs -Retrieves details of multiple Posts by their IDs. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `ids` | `any`[] | A comma separated list of Post IDs. Up to 100 are allowed in a single request. | -| `options` | `GetByIdsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:2365](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L2365) - -▸ **getByIds**(`ids`, `options?`): `Promise`\<[`Get2TweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ids` | `any`[] | -| `options?` | `GetByIdsOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse)\> - -#### Defined in - -[posts/client.ts:2378](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L2378) - -___ - -### create - -▸ **create**(`body`, `options`): `Promise`\<`Response`\> - -Create or Edit Post -Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `body` | [`TweetCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest) | Request body | -| `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 - -[posts/client.ts:2622](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L2622) - -▸ **create**(`body`): `Promise`\<[`TweetCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `body` | [`TweetCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest) | - -#### Returns - -`Promise`\<[`TweetCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse)\> - -#### Defined in - -[posts/client.ts:2633](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L2633) - -___ - -### getQuoted - -▸ **getQuoted**(`id`, `options`): `Promise`\<`Response`\> - -Get Quoted Posts -Retrieves a list of Posts that quote a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | A single Post ID. | -| `options` | `GetQuotedOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:2718](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L2718) - -▸ **getQuoted**(`id`, `options?`): `Promise`\<[`Get2TweetsIdQuoteTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetQuotedOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsIdQuoteTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse)\> - -#### Defined in - -[posts/client.ts:2731](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L2731) - -___ - -### getCountsRecent - -▸ **getCountsRecent**(`query`, `options`): `Promise`\<`Response`\> - -Get count of recent Posts -Retrieves the count of Posts from the last 7 days matching a search query. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. | -| `options` | `GetCountsRecentOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:3025](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3025) - -▸ **getCountsRecent**(`query`, `options?`): `Promise`\<[`Get2TweetsCountsRecentResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `GetCountsRecentOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsCountsRecentResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse)\> - -#### Defined in - -[posts/client.ts:3038](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3038) - -___ - -### hideReply - -▸ **hideReply**(`tweetId`, `options`): `Promise`\<`Response`\> - -Hide reply -Hides or unhides a reply to a conversation owned by the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `tweetId` | `string` | The ID of the reply that you want to hide or unhide. | -| `options` | `HideReplyOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:3298](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3298) - -▸ **hideReply**(`tweetId`, `options?`): `Promise`\<[`TweetHideResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `tweetId` | `string` | -| `options?` | `HideReplyOptions` | - -#### Returns - -`Promise`\<[`TweetHideResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse)\> - -#### Defined in - -[posts/client.ts:3311](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3311) - -___ - -### getInsightsHistorical - -▸ **getInsightsHistorical**(`tweetIds`, `endTime`, `startTime`, `granularity`, `requestedMetrics`, `options`): `Promise`\<`Response`\> - -Get historical Post insights -Retrieves historical engagement metrics for specified Posts within a defined time range. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `tweetIds` | `any`[] | List of PostIds for historical metrics. | -| `endTime` | `string` | YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. | -| `startTime` | `string` | YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. | -| `granularity` | `string` | granularity of metrics response. | -| `requestedMetrics` | `any`[] | request metrics for historical request. | -| `options` | `GetInsightsHistoricalOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:3435](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3435) - -▸ **getInsightsHistorical**(`tweetIds`, `endTime`, `startTime`, `granularity`, `requestedMetrics`, `options?`): `Promise`\<[`Get2InsightsHistoricalResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `tweetIds` | `any`[] | -| `endTime` | `string` | -| `startTime` | `string` | -| `granularity` | `string` | -| `requestedMetrics` | `any`[] | -| `options?` | `GetInsightsHistoricalOptions` | - -#### Returns - -`Promise`\<[`Get2InsightsHistoricalResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse)\> - -#### Defined in - -[posts/client.ts:3464](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3464) - -___ - -### getCountsAll - -▸ **getCountsAll**(`query`, `options`): `Promise`\<`Response`\> - -Get count of all Posts -Retrieves the count of Posts matching a search query from the full archive. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. | -| `options` | `GetCountsAllOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:3679](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3679) - -▸ **getCountsAll**(`query`, `options?`): `Promise`\<[`Get2TweetsCountsAllResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `GetCountsAllOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsCountsAllResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse)\> - -#### Defined in - -[posts/client.ts:3692](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3692) - -___ - -### getById - -▸ **getById**(`id`, `options`): `Promise`\<`Response`\> - -Get Post by ID -Retrieves details of a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | A single Post ID. | -| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:3952](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3952) - -▸ **getById**(`id`, `options?`): `Promise`\<[`Get2TweetsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetByIdOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse)\> - -#### Defined in - -[posts/client.ts:3965](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L3965) - -___ - -### delete - -▸ **delete**(`id`, `options`): `Promise`\<`Response`\> - -Delete Post -Deletes a specific Post by its ID, if owned by the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the Post to be deleted. | -| `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 - -[posts/client.ts:4202](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L4202) - -▸ **delete**(`id`): `Promise`\<[`TweetDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Returns - -`Promise`\<[`TweetDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse)\> - -#### Defined in - -[posts/client.ts:4215](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L4215) - -___ - -### getLikingUsers - -▸ **getLikingUsers**(`id`, `options`): `Promise`\<`Response`\> - -Get Liking Users -Retrieves a list of Users who liked a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | A single Post ID. | -| `options` | `GetLikingUsersOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:4306](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L4306) - -▸ **getLikingUsers**(`id`, `options?`): `Promise`\<[`Get2TweetsIdLikingUsersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetLikingUsersOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsIdLikingUsersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse)\> - -#### Defined in - -[posts/client.ts:4319](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L4319) - -___ - -### getRepostedBy - -▸ **getRepostedBy**(`id`, `options`): `Promise`\<`Response`\> - -Get Reposted by -Retrieves a list of Users who reposted a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | A single Post ID. | -| `options` | `GetRepostedByOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[posts/client.ts:4525](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L4525) - -▸ **getRepostedBy**(`id`, `options?`): `Promise`\<[`Get2TweetsIdRetweetedByResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetRepostedByOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsIdRetweetedByResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse)\> - -#### Defined in - -[posts/client.ts:4538](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/client.ts#L4538) diff --git a/xdks/typescript/reference/classes/SpacesClient.mdx b/xdks/typescript/reference/classes/SpacesClient.mdx deleted file mode 100644 index 42ee76962..000000000 --- a/xdks/typescript/reference/classes/SpacesClient.mdx +++ /dev/null @@ -1,291 +0,0 @@ ---- -title: "SpacesClient" -sidebarTitle: "SpacesClient" -description: "Reference for the SpacesClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 spaces endpoints." ---- - -Client for spaces operations - -This client provides methods for interacting with the spaces endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all spaces related operations. - -## Constructors - -### constructor - -• **new SpacesClient**(`client`): [`SpacesClient`](/xdks/typescript/reference/classes/SpacesClient) - -Creates a new spaces client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`SpacesClient`](/xdks/typescript/reference/classes/SpacesClient) - -#### Defined in - -[spaces/client.ts:316](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L316) - -## Methods - -### getByIds - -▸ **getByIds**(`ids`, `options`): `Promise`\<`Response`\> - -Get Spaces by IDs -Retrieves details of multiple Spaces by their IDs. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `ids` | `any`[] | The list of Space IDs to return. | -| `options` | `GetByIdsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[spaces/client.ts:361](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L361) - -▸ **getByIds**(`ids`, `options?`): `Promise`\<[`Get2SpacesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ids` | `any`[] | -| `options?` | `GetByIdsOptions` | - -#### Returns - -`Promise`\<[`Get2SpacesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse)\> - -#### Defined in - -[spaces/client.ts:374](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L374) - -___ - -### getPosts - -▸ **getPosts**(`id`, `options`): `Promise`\<`Response`\> - -Get Space Posts -Retrieves a list of Posts shared in a specific Space by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the Space to be retrieved. | -| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[spaces/client.ts:572](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L572) - -▸ **getPosts**(`id`, `options?`): `Promise`\<[`Get2SpacesIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetPostsOptions` | - -#### Returns - -`Promise`\<[`Get2SpacesIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse)\> - -#### Defined in - -[spaces/client.ts:585](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L585) - -___ - -### search - -▸ **search**(`query`, `options`): `Promise`\<`Response`\> - -Search Spaces -Retrieves a list of Spaces matching the specified search query. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | The search query. | -| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[spaces/client.ts:835](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L835) - -▸ **search**(`query`, `options?`): `Promise`\<[`Get2SpacesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `SearchOptions` | - -#### Returns - -`Promise`\<[`Get2SpacesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse)\> - -#### Defined in - -[spaces/client.ts:848](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L848) - -___ - -### getBuyers - -▸ **getBuyers**(`id`, `options`): `Promise`\<`Response`\> - -Get Space ticket buyers -Retrieves a list of Users who purchased tickets to a specific Space by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the Space to be retrieved. | -| `options` | `GetBuyersOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[spaces/client.ts:1080](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1080) - -▸ **getBuyers**(`id`, `options?`): `Promise`\<[`Get2SpacesIdBuyersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetBuyersOptions` | - -#### Returns - -`Promise`\<[`Get2SpacesIdBuyersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse)\> - -#### Defined in - -[spaces/client.ts:1093](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1093) - -___ - -### getById - -▸ **getById**(`id`, `options`): `Promise`\<`Response`\> - -Get space by ID -Retrieves details of a specific space by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the Space to be retrieved. | -| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[spaces/client.ts:1293](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1293) - -▸ **getById**(`id`, `options?`): `Promise`\<[`Get2SpacesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetByIdOptions` | - -#### Returns - -`Promise`\<[`Get2SpacesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse)\> - -#### Defined in - -[spaces/client.ts:1306](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1306) - -___ - -### getByCreatorIds - -▸ **getByCreatorIds**(`userIds`, `options`): `Promise`\<`Response`\> - -Get Spaces by creator IDs -Retrieves details of Spaces created by specified User IDs. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `userIds` | `any`[] | The IDs of Users to search through. | -| `options` | `GetByCreatorIdsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[spaces/client.ts:1495](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1495) - -▸ **getByCreatorIds**(`userIds`, `options?`): `Promise`\<[`Get2SpacesByCreatorIdsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `userIds` | `any`[] | -| `options?` | `GetByCreatorIdsOptions` | - -#### Returns - -`Promise`\<[`Get2SpacesByCreatorIdsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse)\> - -#### Defined in - -[spaces/client.ts:1508](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/client.ts#L1508) diff --git a/xdks/typescript/reference/classes/StreamClient.mdx b/xdks/typescript/reference/classes/StreamClient.mdx deleted file mode 100644 index 64d5b9e57..000000000 --- a/xdks/typescript/reference/classes/StreamClient.mdx +++ /dev/null @@ -1,517 +0,0 @@ ---- -title: "StreamClient" -sidebarTitle: "StreamClient" -description: "Reference for the StreamClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 stream endpoints." ---- - -## Constructors - -### constructor - -• **new StreamClient**(`client`): [`StreamClient`](/xdks/typescript/reference/classes/StreamClient) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | - -#### Returns - -[`StreamClient`](/xdks/typescript/reference/classes/StreamClient) - -#### Defined in - -[stream/stream_client.ts:972](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L972) - -## Methods - -### likesCompliance - -▸ **likesCompliance**(`options?`): `Promise`\<`EventDrivenStream`\> - -Stream Likes compliance data -Streams all compliance data related to Likes for Users. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `LikesComplianceStreamingOptions` | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:1016](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L1016) - -___ - -### usersCompliance - -▸ **usersCompliance**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream Users compliance data -Streams all compliance data related to Users. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `UsersComplianceStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:1196](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L1196) - -___ - -### postsFirehoseKo - -▸ **postsFirehoseKo**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream Korean Posts -Streams all public Korean-language Posts in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `PostsFirehoseKoStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:1392](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L1392) - -___ - -### likesSample10 - -▸ **likesSample10**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream sampled Likes -Streams a 10% sample of public Likes in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `LikesSample10StreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:1706](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L1706) - -___ - -### likesFirehose - -▸ **likesFirehose**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream all Likes -Streams all public Likes in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `LikesFirehoseStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:1983](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L1983) - -___ - -### postsFirehoseJa - -▸ **postsFirehoseJa**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream Japanese Posts -Streams all public Japanese-language Posts in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `PostsFirehoseJaStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:2257](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L2257) - -___ - -### postsFirehoseEn - -▸ **postsFirehoseEn**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream English Posts -Streams all public English-language Posts in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `PostsFirehoseEnStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:2571](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L2571) - -___ - -### postsSample - -▸ **postsSample**(`options?`): `Promise`\<`EventDrivenStream`\> - -Stream sampled Posts -Streams a 1% sample of public Posts in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `PostsSampleStreamingOptions` | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:2887](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L2887) - -___ - -### postsSample10 - -▸ **postsSample10**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream 10% sampled Posts -Streams a 10% sample of public Posts in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `PostsSample10StreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:3145](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L3145) - -___ - -### postsCompliance - -▸ **postsCompliance**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream Posts compliance data -Streams all compliance data related to Posts. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `PostsComplianceStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:3459](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L3459) - -___ - -### labelsCompliance - -▸ **labelsCompliance**(`options?`): `Promise`\<`EventDrivenStream`\> - -Stream Post labels -Streams all labeling events applied to Posts. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `LabelsComplianceStreamingOptions` | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:3651](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L3651) - -___ - -### posts - -▸ **posts**(`options?`): `Promise`\<`EventDrivenStream`\> - -Stream filtered Posts -Streams Posts in real-time matching the active rule set. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `PostsStreamingOptions` | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:3827](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L3827) - -___ - -### postsFirehose - -▸ **postsFirehose**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream all Posts -Streams all public Posts in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `PostsFirehoseStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:4125](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L4125) - -___ - -### postsFirehosePt - -▸ **postsFirehosePt**(`partition`, `options?`): `Promise`\<`EventDrivenStream`\> - -Stream Portuguese Posts -Streams all public Portuguese-language Posts in real-time. - -Returns an event-driven stream that's easy to use. -Use .on() to listen for events like 'data', 'error', 'close'. -Also supports async iteration with for await...of. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `partition` | `number` | The partition number. | -| `options` | `PostsFirehosePtStreamingOptions` | - | - -#### Returns - -`Promise`\<`EventDrivenStream`\> - -Event-driven stream for handling streaming data - -#### Defined in - -[stream/stream_client.ts:4439](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L4439) - -___ - -### getRuleCounts - -▸ **getRuleCounts**(`options?`): `Promise`\<[`Get2TweetsSearchStreamRulesCountsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse)\> - -Get stream rule counts -Retrieves the count of rules in the active rule set for the filtered stream. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `GetRuleCountsStreamingOptions` | - -#### Returns - -`Promise`\<[`Get2TweetsSearchStreamRulesCountsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse)\> - -Promise with the API response - -#### Defined in - -[stream/stream_client.ts:4753](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L4753) - -___ - -### getRules - -▸ **getRules**(`options?`): `Promise`\<[`RulesLookupResponse`](/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse)\> - -Get stream rules -Retrieves the active rule set or a subset of rules for the filtered stream. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `GetRulesStreamingOptions` | - -#### Returns - -`Promise`\<[`RulesLookupResponse`](/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse)\> - -Promise with the API response - -#### Defined in - -[stream/stream_client.ts:4854](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L4854) - -___ - -### updateRules - -▸ **updateRules**(`body`, `options?`): `Promise`\<[`AddOrDeleteRulesResponse`](/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse)\> - -Update stream rules -Adds or deletes rules from the active rule set for the filtered stream. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `body` | `any` | -| `options` | `UpdateRulesStreamingOptions` | - -#### Returns - -`Promise`\<[`AddOrDeleteRulesResponse`](/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse)\> - -Promise with the API response - -#### Defined in - -[stream/stream_client.ts:4987](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/stream_client.ts#L4987) diff --git a/xdks/typescript/reference/classes/TrendsClient.mdx b/xdks/typescript/reference/classes/TrendsClient.mdx deleted file mode 100644 index 20fb02905..000000000 --- a/xdks/typescript/reference/classes/TrendsClient.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "TrendsClient" -sidebarTitle: "TrendsClient" -description: "Reference for the TrendsClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 trends endpoints." ---- - -Client for trends operations - -This client provides methods for interacting with the trends endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all trends related operations. - -zed](/xdks/typescript/reference/classes/TrendsClient#getpersonalized) - -## Constructors - -### constructor - -• **new TrendsClient**(`client`): [`TrendsClient`](/xdks/typescript/reference/classes/TrendsClient) - -Creates a new trends client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`TrendsClient`](/xdks/typescript/reference/classes/TrendsClient) - -#### Defined in - -[trends/client.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L90) - -## Methods - -### getByWoeid - -▸ **getByWoeid**(`woeid`, `options`): `Promise`\<`Response`\> - -Get Trends by WOEID -Retrieves trending topics for a specific location identified by its WOEID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `woeid` | `number` | The WOEID of the place to lookup a trend for. | -| `options` | `GetByWoeidOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[trends/client.ts:135](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L135) - -▸ **getByWoeid**(`woeid`, `options?`): `Promise`\<[`Get2TrendsByWoeidWoeidResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `woeid` | `number` | -| `options?` | `GetByWoeidOptions` | - -#### Returns - -`Promise`\<[`Get2TrendsByWoeidWoeidResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse)\> - -#### Defined in - -[trends/client.ts:148](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L148) - -___ - -### getPersonalized - -▸ **getPersonalized**(`options`): `Promise`\<`Response`\> - -Get personalized Trends -Retrieves personalized trending topics for the authenticated user. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `GetPersonalizedOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[trends/client.ts:285](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L285) - -▸ **getPersonalized**(`options?`): `Promise`\<[`Get2UsersPersonalizedTrendsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `GetPersonalizedOptions` | - -#### Returns - -`Promise`\<[`Get2UsersPersonalizedTrendsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse)\> - -#### Defined in - -[trends/client.ts:294](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/client.ts#L294) diff --git a/xdks/typescript/reference/classes/UsageClient.mdx b/xdks/typescript/reference/classes/UsageClient.mdx deleted file mode 100644 index de1158815..000000000 --- a/xdks/typescript/reference/classes/UsageClient.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "UsageClient" -sidebarTitle: "UsageClient" -description: "Reference for the UsageClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 usage endpoints." ---- - -Client for usage operations - -This client provides methods for interacting with the usage endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all usage related operations. - -## Constructors - -### constructor - -• **new UsageClient**(`client`): [`UsageClient`](/xdks/typescript/reference/classes/UsageClient) - -Creates a new usage client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`UsageClient`](/xdks/typescript/reference/classes/UsageClient) - -#### Defined in - -[usage/client.ts:68](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/usage/client.ts#L68) - -## Methods - -### get - -▸ **get**(`options`): `Promise`\<`Response`\> - -Get usage -Retrieves usage statistics for Posts over a specified number of days. - -#### 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 - -[usage/client.ts:109](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/usage/client.ts#L109) - -▸ **get**(`options?`): `Promise`\<[`Get2UsageTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `GetOptions` | - -#### Returns - -`Promise`\<[`Get2UsageTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse)\> - -#### Defined in - -[usage/client.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/usage/client.ts#L118) diff --git a/xdks/typescript/reference/classes/UserPaginator.mdx b/xdks/typescript/reference/classes/UserPaginator.mdx deleted file mode 100644 index efe2c26e1..000000000 --- a/xdks/typescript/reference/classes/UserPaginator.mdx +++ /dev/null @@ -1,377 +0,0 @@ ---- -title: "UserPaginator" -sidebarTitle: "UserPaginator" -description: "Reference for the UserPaginator class in the X API TypeScript SDK. Iterate paginated user results with async iterators and cursor helpers." ---- - -Paginator for users - -## Hierarchy - -- [`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\> - - ↳ **`UserPaginator`** - -## Constructors - -### constructor - -• **new UserPaginator**(`fetchPage`): [`UserPaginator`](/xdks/typescript/reference/classes/UserPaginator) - -Creates a new paginator instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `fetchPage` | (`token?`: `string`) => `Promise`\<[`PaginatedResponse`](/xdks/typescript/reference/interfaces/PaginatedResponse)\<`any`\>\> | Function that fetches a page of data given a pagination token | - -#### Returns - -[`UserPaginator`](/xdks/typescript/reference/classes/UserPaginator) - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[constructor](/xdks/typescript/reference/classes/Paginator#constructor) - -#### Defined in - -[paginator.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L90) - -## Accessors - -### items - -• `get` **items**(): `T`[] - -Get all fetched items - -#### Returns - -`T`[] - -#### Inherited from - -Paginator.items - -#### Defined in - -[paginator.ts:97](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L97) - -___ - -### meta - -• `get` **meta**(): `any` - -Get current pagination metadata - -#### Returns - -`any` - -#### Inherited from - -Paginator.meta - -#### Defined in - -[paginator.ts:104](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L104) - -___ - -### includes - -• `get` **includes**(): `undefined` \| `Record`\<`string`, `any`\> - -Get current includes data - -#### Returns - -`undefined` \| `Record`\<`string`, `any`\> - -#### Inherited from - -Paginator.includes - -#### Defined in - -[paginator.ts:111](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L111) - -___ - -### errors - -• `get` **errors**(): `undefined` \| `any`[] - -Get current errors - -#### Returns - -`undefined` \| `any`[] - -#### Inherited from - -Paginator.errors - -#### Defined in - -[paginator.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L118) - -___ - -### done - -• `get` **done**(): `boolean` - -Check if pagination is done - -#### Returns - -`boolean` - -#### Inherited from - -Paginator.done - -#### Defined in - -[paginator.ts:125](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L125) - -___ - -### rateLimited - -• `get` **rateLimited**(): `boolean` - -Check if rate limit was hit - -#### Returns - -`boolean` - -#### Inherited from - -Paginator.rateLimited - -#### Defined in - -[paginator.ts:132](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L132) - -___ - -### users - -• `get` **users**(): `any`[] - -#### Returns - -`any`[] - -#### Defined in - -[paginator.ts:351](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L351) - -## Methods - -### fetchNext - -▸ **fetchNext**(): `Promise`\<`void`\> - -Fetch the next page and add items to current instance - -This method fetches the next page of data and appends the items to the -current paginator instance. It updates the pagination state and metadata. - -#### Returns - -`Promise`\<`void`\> - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page -console.log(followers.items.length); // Number of followers - -if (!followers.done) { - await followers.fetchNext(); // Fetch second page - console.log(followers.items.length); // Total followers across pages -} -``` - -**`Throws`** - -When the API request fails - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchNext](/xdks/typescript/reference/classes/Paginator#fetchnext) - -#### Defined in - -[paginator.ts:156](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L156) - -___ - -### next - -▸ **next**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -Get next page as a new instance - -This method creates a new paginator instance that starts from the next page, -without affecting the current paginator's state. - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -New paginator instance for the next page - -**`Example`** - -```typescript -const followers = await client.users.getFollowers('783214'); -await followers.fetchNext(); // Fetch first page - -if (!followers.done) { - const nextPage = await followers.next(); // Get next page as new instance - console.log(followers.items.length); // Still first page - console.log(nextPage.items.length); // Second page -} -``` - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[next](/xdks/typescript/reference/classes/Paginator#next) - -#### Defined in - -[paginator.ts:211](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L211) - -___ - -### fetchPrevious - -▸ **fetchPrevious**(): `Promise`\<`void`\> - -Fetch previous page (if supported) - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchPrevious](/xdks/typescript/reference/classes/Paginator#fetchprevious) - -#### Defined in - -[paginator.ts:225](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L225) - -___ - -### previous - -▸ **previous**(): `Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -Get previous page as a new instance - -#### Returns - -`Promise`\<[`Paginator`](/xdks/typescript/reference/classes/Paginator)\<`any`\>\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[previous](/xdks/typescript/reference/classes/Paginator#previous) - -#### Defined in - -[paginator.ts:260](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L260) - -___ - -### fetchLast - -▸ **fetchLast**(`count`): `Promise`\<`void`\> - -Fetch up to a specified number of additional items - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `count` | `number` | - -#### Returns - -`Promise`\<`void`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[fetchLast](/xdks/typescript/reference/classes/Paginator#fetchlast) - -#### Defined in - -[paginator.ts:274](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L274) - -___ - -### reset - -▸ **reset**(): `void` - -Reset paginator to initial state - -#### Returns - -`void` - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[reset](/xdks/typescript/reference/classes/Paginator#reset) - -#### Defined in - -[paginator.ts:288](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L288) - -___ - -### [iterator] - -▸ **[iterator]**(): `Iterator`\<`any`, `any`, `undefined`\> - -Iterator for all fetched items - -#### Returns - -`Iterator`\<`any`, `any`, `undefined`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[[iterator]](/xdks/typescript/reference/classes/Paginator#iterator) - -#### Defined in - -[paginator.ts:303](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L303) - -___ - -### [asyncIterator] - -▸ **[asyncIterator]**(): `AsyncIterator`\<`any`, `any`, `undefined`\> - -Async iterator that fetches pages automatically - -#### Returns - -`AsyncIterator`\<`any`, `any`, `undefined`\> - -#### Inherited from - -[Paginator](/xdks/typescript/reference/classes/Paginator).[[asyncIterator]](/xdks/typescript/reference/classes/Paginator#asynciterator) - -#### Defined in - -[paginator.ts:312](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/paginator.ts#L312) diff --git a/xdks/typescript/reference/classes/UsersClient.mdx b/xdks/typescript/reference/classes/UsersClient.mdx deleted file mode 100644 index 3008731be..000000000 --- a/xdks/typescript/reference/classes/UsersClient.mdx +++ /dev/null @@ -1,1695 +0,0 @@ ---- -title: "UsersClient" -sidebarTitle: "UsersClient" -description: "Reference for the UsersClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 users endpoints." ---- - -Client for users operations - -This client provides methods for interacting with the users endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all users related operations. - -## Constructors - -### constructor - -• **new UsersClient**(`client`): [`UsersClient`](/xdks/typescript/reference/classes/UsersClient) - -Creates a new users client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`UsersClient`](/xdks/typescript/reference/classes/UsersClient) - -#### Defined in - -[users/client.ts:1234](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1234) - -## Methods - -### getByUsernames - -▸ **getByUsernames**(`usernames`, `options`): `Promise`\<`Response`\> - -Get Users by usernames -Retrieves details of multiple Users by their usernames. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `usernames` | `any`[] | A list of usernames, comma-separated. | -| `options` | `GetByUsernamesOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:1279](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1279) - -▸ **getByUsernames**(`usernames`, `options?`): `Promise`\<[`Get2UsersByResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `usernames` | `any`[] | -| `options?` | `GetByUsernamesOptions` | - -#### Returns - -`Promise`\<[`Get2UsersByResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse)\> - -#### Defined in - -[users/client.ts:1292](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1292) - -___ - -### getRepostsOfMe - -▸ **getRepostsOfMe**(`options`): `Promise`\<`Response`\> - -Get Reposts of me -Retrieves a list of Posts that repost content from the authenticated user. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `GetRepostsOfMeOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:1471](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1471) - -▸ **getRepostsOfMe**(`options?`): `Promise`\<[`Get2UsersRepostsOfMeResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `GetRepostsOfMeOptions` | - -#### Returns - -`Promise`\<[`Get2UsersRepostsOfMeResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse)\> - -#### Defined in - -[users/client.ts:1480](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1480) - -___ - -### unlikePost - -▸ **unlikePost**(`id`, `tweetId`, `options`): `Promise`\<`Response`\> - -Unlike Post -Causes the authenticated user to Unlike a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that is requesting to unlike the Post. | -| `tweetId` | `string` | The ID of the Post that the User is requesting to unlike. | -| `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 - -[users/client.ts:1741](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1741) - -▸ **unlikePost**(`id`, `tweetId`): `Promise`\<[`UsersLikesDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `tweetId` | `string` | - -#### Returns - -`Promise`\<[`UsersLikesDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse)\> - -#### Defined in - -[users/client.ts:1758](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1758) - -___ - -### getBookmarks - -▸ **getBookmarks**(`id`, `options`): `Promise`\<`Response`\> - -Get Bookmarks -Retrieves a list of Posts bookmarked by the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to return results. | -| `options` | `GetBookmarksOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:1861](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1861) - -▸ **getBookmarks**(`id`, `options?`): `Promise`\<[`Get2UsersIdBookmarksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetBookmarksOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdBookmarksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse)\> - -#### Defined in - -[users/client.ts:1874](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L1874) - -___ - -### createBookmark - -▸ **createBookmark**(`id`, `body`, `options`): `Promise`\<`Response`\> - -Create Bookmark -Adds a post to the authenticated user’s bookmarks. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to add bookmarks. | -| `body` | [`BookmarkAddRequest`](/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest) | Request body | -| `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 - -[users/client.ts:2139](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2139) - -▸ **createBookmark**(`id`, `body`): `Promise`\<[`BookmarkMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `body` | [`BookmarkAddRequest`](/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest) | - -#### Returns - -`Promise`\<[`BookmarkMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse)\> - -#### Defined in - -[users/client.ts:2154](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2154) - -___ - -### getFollowers - -▸ **getFollowers**(`id`, `options`): `Promise`\<`Response`\> - -Get followers -Retrieves a list of Users who follow a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetFollowersOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:2245](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2245) - -▸ **getFollowers**(`id`, `options?`): `Promise`\<[`Get2UsersIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetFollowersOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse)\> - -#### Defined in - -[users/client.ts:2258](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2258) - -___ - -### unpinList - -▸ **unpinList**(`id`, `listId`, `options`): `Promise`\<`Response`\> - -Unpin List -Causes the authenticated user to unpin a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to return results. | -| `listId` | `string` | The ID of the List to unpin. | -| `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 - -[users/client.ts:2474](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2474) - -▸ **unpinList**(`id`, `listId`): `Promise`\<[`ListUnpinResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `listId` | `string` | - -#### Returns - -`Promise`\<[`ListUnpinResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse)\> - -#### Defined in - -[users/client.ts:2491](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2491) - -___ - -### getById - -▸ **getById**(`id`, `options`): `Promise`\<`Response`\> - -Get User by ID -Retrieves details of a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetByIdOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:2594](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2594) - -▸ **getById**(`id`, `options?`): `Promise`\<[`Get2UsersIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetByIdOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse)\> - -#### Defined in - -[users/client.ts:2607](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2607) - -___ - -### getMentions - -▸ **getMentions**(`id`, `options`): `Promise`\<`Response`\> - -Get mentions -Retrieves a list of Posts that mention a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetMentionsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:2781](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2781) - -▸ **getMentions**(`id`, `options?`): `Promise`\<[`Get2UsersIdMentionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetMentionsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdMentionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse)\> - -#### Defined in - -[users/client.ts:2794](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L2794) - -___ - -### unrepostPost - -▸ **unrepostPost**(`id`, `sourceTweetId`, `options`): `Promise`\<`Response`\> - -Unrepost Post -Causes the authenticated user to unrepost a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that is requesting to repost the Post. | -| `sourceTweetId` | `string` | The ID of the Post that the User is requesting to unretweet. | -| `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 - -[users/client.ts:3149](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3149) - -▸ **unrepostPost**(`id`, `sourceTweetId`): `Promise`\<[`UsersRetweetsDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `sourceTweetId` | `string` | - -#### Returns - -`Promise`\<[`UsersRetweetsDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse)\> - -#### Defined in - -[users/client.ts:3166](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3166) - -___ - -### deleteBookmark - -▸ **deleteBookmark**(`id`, `tweetId`, `options`): `Promise`\<`Response`\> - -Delete Bookmark -Removes a Post from the authenticated user’s Bookmarks by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User whose bookmark is to be removed. | -| `tweetId` | `string` | The ID of the Post that the source User is removing from bookmarks. | -| `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 - -[users/client.ts:3273](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3273) - -▸ **deleteBookmark**(`id`, `tweetId`): `Promise`\<[`BookmarkMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `tweetId` | `string` | - -#### Returns - -`Promise`\<[`BookmarkMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse)\> - -#### Defined in - -[users/client.ts:3290](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3290) - -___ - -### unfollowList - -▸ **unfollowList**(`id`, `listId`, `options`): `Promise`\<`Response`\> - -Unfollow List -Causes the authenticated user to unfollow a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that will unfollow the List. | -| `listId` | `string` | The ID of the List to unfollow. | -| `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 - -[users/client.ts:3391](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3391) - -▸ **unfollowList**(`id`, `listId`): `Promise`\<[`ListFollowedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `listId` | `string` | - -#### Returns - -`Promise`\<[`ListFollowedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse)\> - -#### Defined in - -[users/client.ts:3408](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3408) - -___ - -### unmuteUser - -▸ **unmuteUser**(`sourceUserId`, `targetUserId`, `options`): `Promise`\<`Response`\> - -Unmute User -Causes the authenticated user to unmute a specific user by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `sourceUserId` | `string` | The ID of the authenticated source User that is requesting to unmute the target User. | -| `targetUserId` | `string` | The ID of the User that the source User is requesting to unmute. | -| `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 - -[users/client.ts:3515](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3515) - -▸ **unmuteUser**(`sourceUserId`, `targetUserId`): `Promise`\<[`MuteUserMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `sourceUserId` | `string` | -| `targetUserId` | `string` | - -#### Returns - -`Promise`\<[`MuteUserMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse)\> - -#### Defined in - -[users/client.ts:3532](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3532) - -___ - -### getMe - -▸ **getMe**(`options`): `Promise`\<`Response`\> - -Get my User -Retrieves details of the authenticated user. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options` | `GetMeOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:3631](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3631) - -▸ **getMe**(`options?`): `Promise`\<[`Get2UsersMeResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `GetMeOptions` | - -#### Returns - -`Promise`\<[`Get2UsersMeResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse)\> - -#### Defined in - -[users/client.ts:3640](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3640) - -___ - -### getMuting - -▸ **getMuting**(`id`, `options`): `Promise`\<`Response`\> - -Get muting -Retrieves a list of Users muted by the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to return results. | -| `options` | `GetMutingOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:3796](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3796) - -▸ **getMuting**(`id`, `options?`): `Promise`\<[`Get2UsersIdMutingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetMutingOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdMutingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse)\> - -#### Defined in - -[users/client.ts:3809](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L3809) - -___ - -### muteUser - -▸ **muteUser**(`id`, `options`): `Promise`\<`Response`\> - -Mute User -Causes the authenticated user to mute a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that is requesting to mute the target User. | -| `options` | `MuteUserOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:4015](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4015) - -▸ **muteUser**(`id`, `options?`): `Promise`\<[`MuteUserMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `MuteUserOptions` | - -#### Returns - -`Promise`\<[`MuteUserMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse)\> - -#### Defined in - -[users/client.ts:4028](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4028) - -___ - -### search - -▸ **search**(`query`, `options`): `Promise`\<`Response`\> - -Search Users -Retrieves a list of Users matching a search query. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `query` | `string` | TThe the query string by which to query for users. | -| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:4136](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4136) - -▸ **search**(`query`, `options?`): `Promise`\<[`Get2UsersSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `query` | `string` | -| `options?` | `SearchOptions` | - -#### Returns - -`Promise`\<[`Get2UsersSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse)\> - -#### Defined in - -[users/client.ts:4149](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4149) - -___ - -### getBlocking - -▸ **getBlocking**(`id`, `options`): `Promise`\<`Response`\> - -Get blocking -Retrieves a list of Users blocked by the specified User ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to return results. | -| `options` | `GetBlockingOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:4362](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4362) - -▸ **getBlocking**(`id`, `options?`): `Promise`\<[`Get2UsersIdBlockingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetBlockingOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdBlockingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse)\> - -#### Defined in - -[users/client.ts:4375](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4375) - -___ - -### getByIds - -▸ **getByIds**(`ids`, `options`): `Promise`\<`Response`\> - -Get Users by IDs -Retrieves details of multiple Users by their IDs. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `ids` | `any`[] | A list of User IDs, comma-separated. You can specify up to 100 IDs. | -| `options` | `GetByIdsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:4581](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4581) - -▸ **getByIds**(`ids`, `options?`): `Promise`\<[`Get2UsersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ids` | `any`[] | -| `options?` | `GetByIdsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse)\> - -#### Defined in - -[users/client.ts:4594](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4594) - -___ - -### getFollowing - -▸ **getFollowing**(`id`, `options`): `Promise`\<`Response`\> - -Get following -Retrieves a list of Users followed by a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetFollowingOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:4777](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4777) - -▸ **getFollowing**(`id`, `options?`): `Promise`\<[`Get2UsersIdFollowingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetFollowingOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdFollowingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse)\> - -#### Defined in - -[users/client.ts:4790](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L4790) - -___ - -### followUser - -▸ **followUser**(`id`, `options`): `Promise`\<`Response`\> - -Follow User -Causes the authenticated user to follow a specific user by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that is requesting to follow the target User. | -| `options` | `FollowUserOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:5002](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5002) - -▸ **followUser**(`id`, `options?`): `Promise`\<[`UsersFollowingCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `FollowUserOptions` | - -#### Returns - -`Promise`\<[`UsersFollowingCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse)\> - -#### Defined in - -[users/client.ts:5015](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5015) - -___ - -### likePost - -▸ **likePost**(`id`, `options`): `Promise`\<`Response`\> - -Like Post -Causes the authenticated user to Like a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that is requesting to like the Post. | -| `options` | `LikePostOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:5123](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5123) - -▸ **likePost**(`id`, `options?`): `Promise`\<[`UsersLikesCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `LikePostOptions` | - -#### Returns - -`Promise`\<[`UsersLikesCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse)\> - -#### Defined in - -[users/client.ts:5136](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5136) - -___ - -### getLikedPosts - -▸ **getLikedPosts**(`id`, `options`): `Promise`\<`Response`\> - -Get liked Posts -Retrieves a list of Posts liked by a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetLikedPostsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:5244](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5244) - -▸ **getLikedPosts**(`id`, `options?`): `Promise`\<[`Get2UsersIdLikedTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetLikedPostsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdLikedTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse)\> - -#### Defined in - -[users/client.ts:5257](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5257) - -___ - -### getPosts - -▸ **getPosts**(`id`, `options`): `Promise`\<`Response`\> - -Get Posts -Retrieves a list of posts authored by a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetPostsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:5526](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5526) - -▸ **getPosts**(`id`, `options?`): `Promise`\<[`Get2UsersIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetPostsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse)\> - -#### Defined in - -[users/client.ts:5539](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5539) - -___ - -### blockDms - -▸ **blockDms**(`id`, `options`): `Promise`\<`Response`\> - -Block DMs -Blocks direct messages to or from a specific User by their ID for the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the target User that the authenticated user requesting to block dms for. | -| `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 - -[users/client.ts:5909](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5909) - -▸ **blockDms**(`id`): `Promise`\<[`UsersDMBlockCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Returns - -`Promise`\<[`UsersDMBlockCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse)\> - -#### Defined in - -[users/client.ts:5922](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L5922) - -___ - -### getListMemberships - -▸ **getListMemberships**(`id`, `options`): `Promise`\<`Response`\> - -Get List memberships -Retrieves a list of Lists that a specific User is a member of by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetListMembershipsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:6013](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6013) - -▸ **getListMemberships**(`id`, `options?`): `Promise`\<[`Get2UsersIdListMembershipsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetListMembershipsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdListMembershipsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse)\> - -#### Defined in - -[users/client.ts:6026](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6026) - -___ - -### getPinnedLists - -▸ **getPinnedLists**(`id`, `options`): `Promise`\<`Response`\> - -Get pinned Lists -Retrieves a list of Lists pinned by the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to return results. | -| `options` | `GetPinnedListsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:6238](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6238) - -▸ **getPinnedLists**(`id`, `options?`): `Promise`\<[`Get2UsersIdPinnedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetPinnedListsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdPinnedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse)\> - -#### Defined in - -[users/client.ts:6251](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6251) - -___ - -### pinList - -▸ **pinList**(`id`, `body`, `options`): `Promise`\<`Response`\> - -Pin List -Causes the authenticated user to pin a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that will pin the List. | -| `body` | [`ListPinnedRequest`](/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest) | Request body | -| `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 - -[users/client.ts:6421](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6421) - -▸ **pinList**(`id`, `body`): `Promise`\<[`ListPinnedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `body` | [`ListPinnedRequest`](/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest) | - -#### Returns - -`Promise`\<[`ListPinnedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse)\> - -#### Defined in - -[users/client.ts:6436](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6436) - -___ - -### getByUsername - -▸ **getByUsername**(`username`, `options`): `Promise`\<`Response`\> - -Get User by username -Retrieves details of a specific User by their username. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `username` | `string` | A username. | -| `options` | `GetByUsernameOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:6533](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6533) - -▸ **getByUsername**(`username`, `options?`): `Promise`\<[`Get2UsersByUsernameUsernameResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `username` | `string` | -| `options?` | `GetByUsernameOptions` | - -#### Returns - -`Promise`\<[`Get2UsersByUsernameUsernameResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse)\> - -#### Defined in - -[users/client.ts:6546](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6546) - -___ - -### unfollowUser - -▸ **unfollowUser**(`sourceUserId`, `targetUserId`, `options`): `Promise`\<`Response`\> - -Unfollow User -Causes the authenticated user to unfollow a specific user by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `sourceUserId` | `string` | The ID of the authenticated source User that is requesting to unfollow the target User. | -| `targetUserId` | `string` | The ID of the User that the source User is requesting to unfollow. | -| `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 - -[users/client.ts:6724](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6724) - -▸ **unfollowUser**(`sourceUserId`, `targetUserId`): `Promise`\<[`UsersFollowingDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `sourceUserId` | `string` | -| `targetUserId` | `string` | - -#### Returns - -`Promise`\<[`UsersFollowingDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse)\> - -#### Defined in - -[users/client.ts:6741](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6741) - -___ - -### getTimeline - -▸ **getTimeline**(`id`, `options`): `Promise`\<`Response`\> - -Get Timeline -Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User to list Reverse Chronological Timeline Posts of. | -| `options` | `GetTimelineOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:6844](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6844) - -▸ **getTimeline**(`id`, `options?`): `Promise`\<[`Get2UsersIdTimelinesReverseChronologicalResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetTimelineOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdTimelinesReverseChronologicalResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse)\> - -#### Defined in - -[users/client.ts:6857](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L6857) - -___ - -### getFollowedLists - -▸ **getFollowedLists**(`id`, `options`): `Promise`\<`Response`\> - -Get followed Lists -Retrieves a list of Lists followed by a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetFollowedListsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:7221](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7221) - -▸ **getFollowedLists**(`id`, `options?`): `Promise`\<[`Get2UsersIdFollowedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetFollowedListsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdFollowedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse)\> - -#### Defined in - -[users/client.ts:7234](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7234) - -___ - -### followList - -▸ **followList**(`id`, `options`): `Promise`\<`Response`\> - -Follow List -Causes the authenticated user to follow a specific List by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that will follow the List. | -| `options` | `FollowListOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:7446](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7446) - -▸ **followList**(`id`, `options?`): `Promise`\<[`ListFollowedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `FollowListOptions` | - -#### Returns - -`Promise`\<[`ListFollowedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse)\> - -#### Defined in - -[users/client.ts:7459](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7459) - -___ - -### unblockDms - -▸ **unblockDms**(`id`, `options`): `Promise`\<`Response`\> - -Unblock DMs -Unblocks direct messages to or from a specific User by their ID for the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the target User that the authenticated user requesting to unblock dms for. | -| `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 - -[users/client.ts:7567](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7567) - -▸ **unblockDms**(`id`): `Promise`\<[`UsersDMUnBlockCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | - -#### Returns - -`Promise`\<[`UsersDMUnBlockCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse)\> - -#### Defined in - -[users/client.ts:7580](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7580) - -___ - -### repostPost - -▸ **repostPost**(`id`, `options`): `Promise`\<`Response`\> - -Repost Post -Causes the authenticated user to repost a specific Post by its ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User that is requesting to repost the Post. | -| `options` | `RepostPostOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:7671](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7671) - -▸ **repostPost**(`id`, `options?`): `Promise`\<[`UsersRetweetsCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `RepostPostOptions` | - -#### Returns - -`Promise`\<[`UsersRetweetsCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse)\> - -#### Defined in - -[users/client.ts:7684](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7684) - -___ - -### getBookmarkFolders - -▸ **getBookmarkFolders**(`id`, `options`): `Promise`\<`Response`\> - -Get Bookmark folders -Retrieves a list of Bookmark folders created by the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to return results. | -| `options` | `GetBookmarkFoldersOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:7792](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7792) - -▸ **getBookmarkFolders**(`id`, `options?`): `Promise`\<[`BookmarkFoldersResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetBookmarkFoldersOptions` | - -#### Returns - -`Promise`\<[`BookmarkFoldersResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse)\> - -#### Defined in - -[users/client.ts:7805](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7805) - -___ - -### getOwnedLists - -▸ **getOwnedLists**(`id`, `options`): `Promise`\<`Response`\> - -Get owned Lists -Retrieves a list of Lists owned by a specific User by their ID. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the User to lookup. | -| `options` | `GetOwnedListsOptions` & \{ `requestOptions`: \{ `raw`: ``true`` } } | - | - -#### Returns - -`Promise`\<`Response`\> - -Promise resolving to the API response, or raw Response if requestOptions.raw is true - -#### Defined in - -[users/client.ts:7944](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7944) - -▸ **getOwnedLists**(`id`, `options?`): `Promise`\<[`Get2UsersIdOwnedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `options?` | `GetOwnedListsOptions` | - -#### Returns - -`Promise`\<[`Get2UsersIdOwnedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse)\> - -#### Defined in - -[users/client.ts:7957](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L7957) - -___ - -### getBookmarksByFolderId - -▸ **getBookmarksByFolderId**(`id`, `folderId`, `options`): `Promise`\<`Response`\> - -Get Bookmarks by folder ID -Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `id` | `string` | The ID of the authenticated source User for whom to return results. | -| `folderId` | `string` | The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for. | -| `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 - -[users/client.ts:8173](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L8173) - -▸ **getBookmarksByFolderId**(`id`, `folderId`): `Promise`\<[`BookmarkFolderPostsResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `id` | `string` | -| `folderId` | `string` | - -#### Returns - -`Promise`\<[`BookmarkFolderPostsResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse)\> - -#### Defined in - -[users/client.ts:8190](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/client.ts#L8190) diff --git a/xdks/typescript/reference/classes/WebhooksClient.mdx b/xdks/typescript/reference/classes/WebhooksClient.mdx deleted file mode 100644 index a6815b514..000000000 --- a/xdks/typescript/reference/classes/WebhooksClient.mdx +++ /dev/null @@ -1,368 +0,0 @@ ---- -title: "WebhooksClient" -sidebarTitle: "WebhooksClient" -description: "Reference for the WebhooksClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 webhooks endpoints." ---- - -Client for webhooks operations - -This client provides methods for interacting with the webhooks endpoints -of the X API. It handles authentication, request formatting, and response -parsing for all webhooks related operations. - -## Constructors - -### constructor - -• **new WebhooksClient**(`client`): [`WebhooksClient`](/xdks/typescript/reference/classes/WebhooksClient) - -Creates a new webhooks client instance - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance | - -#### Returns - -[`WebhooksClient`](/xdks/typescript/reference/classes/WebhooksClient) - -#### Defined in - -[webhooks/client.ts:162](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L162) - -## Methods - -### 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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L207) - -▸ **createStreamLink**(`webhookId`, `options?`): `Promise`\<[`WebhookLinksCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | -| `options?` | `CreateStreamLinkOptions` | - -#### Returns - -`Promise`\<[`WebhookLinksCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse)\> - -#### Defined in - -[webhooks/client.ts:220](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L220) - -___ - -### deleteStreamLink - -▸ **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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L433) - -▸ **deleteStreamLink**(`webhookId`): `Promise`\<[`WebhookLinksDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | - -#### Returns - -`Promise`\<[`WebhookLinksDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse)\> - -#### Defined in - -[webhooks/client.ts:446](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L446) - -___ - -### getStreamLinks - -▸ **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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L527) - -▸ **getStreamLinks**(): `Promise`\<[`WebhookLinksGetResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse)\> - -#### Returns - -`Promise`\<[`WebhookLinksGetResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse)\> - -#### Defined in - -[webhooks/client.ts:536](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L536) - -___ - -### createWebhookReplayJob - -▸ **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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L605) - -▸ **createWebhookReplayJob**(`options?`): `Promise`\<[`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateWebhookReplayJobOptions` | - -#### Returns - -`Promise`\<[`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)\> - -#### Defined in - -[webhooks/client.ts:614](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L614) - -___ - -### validate - -▸ **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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L704) - -▸ **validate**(`webhookId`): `Promise`\<[`WebhookConfigPutResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | - -#### Returns - -`Promise`\<[`WebhookConfigPutResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse)\> - -#### Defined in - -[webhooks/client.ts:717](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L717) - -___ - -### delete - -▸ **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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L808) - -▸ **delete**(`webhookId`): `Promise`\<[`WebhookConfigDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `webhookId` | `string` | - -#### Returns - -`Promise`\<[`WebhookConfigDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse)\> - -#### Defined in - -[webhooks/client.ts:821](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L821) - -___ - -### get - -▸ **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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L908) - -▸ **get**(`options?`): `Promise`\<[`Get2WebhooksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `GetOptions` | - -#### Returns - -`Promise`\<[`Get2WebhooksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse)\> - -#### Defined in - -[webhooks/client.ts:917](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L917) - -___ - -### create - -▸ **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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L1023) - -▸ **create**(`options?`): `Promise`\<[`WebhookConfigCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `options?` | `CreateOptions` | - -#### Returns - -`Promise`\<[`WebhookConfigCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse)\> - -#### Defined in - -[webhooks/client.ts:1032](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L1032) diff --git a/xdks/typescript/reference/clients/account-activity.mdx b/xdks/typescript/reference/clients/account-activity.mdx new file mode 100644 index 000000000..1a4089281 --- /dev/null +++ b/xdks/typescript/reference/clients/account-activity.mdx @@ -0,0 +1,155 @@ +--- +title: "AccountActivityClient (TypeScript XDK)" +sidebarTitle: "Account Activity" +description: "TypeScript XDK AccountActivityClient reference — 5 methods for X API v2 Account Activity endpoints." +--- + +Access **Account Activity** endpoints via `client.accountActivity` (`AccountActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createSubscription`](#createsubscription) | `POST /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Create Subscription | +| [`deleteSubscription`](#deletesubscription) | `DELETE /2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` | Standard | Delete Subscription | +| [`getSubscriptionCount`](#getsubscriptioncount) | `GET /2/account_activity/subscriptions/count` | Standard | Get Subscription Count | +| [`getSubscriptions`](#getsubscriptions) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` | Standard | Get Subscriptions | +| [`validateSubscription`](#validatesubscription) | `GET /2/account_activity/webhooks/{webhook_id}/subscriptions/all` | Standard | Validate Subscription | + +## `createSubscription` + +POST `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Create Subscription** + +Creates an Account Activity subscription for the user and the given webhook. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.accountActivity.createSubscription("1234567890", {}); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteSubscription` + +DELETE `/2/account_activity/webhooks/{webhook_id}/subscriptions/{user_id}/all` + +**Delete Subscription** + +Deletes an Account Activity subscription for the given webhook and user ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.accountActivity.deleteSubscription("1234567890", "2244994945"); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `getSubscriptionCount` + +GET `/2/account_activity/subscriptions/count` + +**Get Subscription Count** + +Retrieves a count of currently active Account Activity subscriptions. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.accountActivity.getSubscriptionCount(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `getSubscriptions` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all/list` + +**Get Subscriptions** + +Retrieves a list of all active subscriptions for a given webhook. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.accountActivity.getSubscriptions("1234567890"); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `validateSubscription` + +GET `/2/account_activity/webhooks/{webhook_id}/subscriptions/all` + +**Validate Subscription** + +Checks a user's Account Activity subscription for a given webhook. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.accountActivity.validateSubscription("1234567890"); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/account.mdx b/xdks/typescript/reference/clients/account.mdx new file mode 100644 index 000000000..589899566 --- /dev/null +++ b/xdks/typescript/reference/clients/account.mdx @@ -0,0 +1,63 @@ +--- +title: "AccountClient (TypeScript XDK)" +sidebarTitle: "Account" +description: "TypeScript XDK AccountClient reference — 2 methods for X API v2 Account endpoints." +--- + +Access **Account** endpoints via `client.account` (`AccountClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`ensure`](#ensure) | `POST /2/account` | Standard | Ensure Developer Account | +| [`getDeveloper`](#getdeveloper) | `GET /2/account` | Standard | Get Developer Account | + +## `ensure` + +POST `/2/account` + +**Ensure Developer Account** + +Creates an X Developer Platform account for the authenticated user if they do not already have one, and returns it. Idempotent: when the user already has an account it is returned unchanged with `created` false. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.account.ensure({ metadata: "example" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `getDeveloper` + +GET `/2/account` + +**Get Developer Account** + +Returns the X Developer Platform account that is billed for the authenticated user's API access. A user with no such account gets a resource-not-found error entry. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.account.getDeveloper(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/activity.mdx b/xdks/typescript/reference/clients/activity.mdx new file mode 100644 index 000000000..e4137952a --- /dev/null +++ b/xdks/typescript/reference/clients/activity.mdx @@ -0,0 +1,171 @@ +--- +title: "ActivityClient (TypeScript XDK)" +sidebarTitle: "Activity" +description: "TypeScript XDK ActivityClient reference — 5 methods for X API v2 Activity endpoints." +--- + +Access **Activity** endpoints via `client.activity` (`ActivityClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createSubscription`](#createsubscription) | `POST /2/activity/subscriptions` | Standard | Create X Activity Subscription | +| [`deleteSubscription`](#deletesubscription) | `DELETE /2/activity/subscriptions/{subscription_id}` | Standard | Delete X Activity Subscription | +| [`deleteSubscriptionsByIds`](#deletesubscriptionsbyids) | `DELETE /2/activity/subscriptions` | Standard | Delete X Activity Subscriptions by IDs | +| [`getSubscriptions`](#getsubscriptions) | `GET /2/activity/subscriptions` | Paginated | Get X Activity Subscriptions | +| [`updateSubscription`](#updatesubscription) | `PUT /2/activity/subscriptions/{subscription_id}` | Standard | Update X Activity Subscription | + +## `createSubscription` + +POST `/2/activity/subscriptions` + +**Create X Activity Subscription** + +Creates a subscription for an X activity event. OAuth2 user-context tokens must hold the scope matching the requested event_type: dm.read for chat.* and dm.* events, like.read for like.* events, mute.read for mute.* events, block.read for block.* events, follows.read for subscriptions.* events, and tweet.read for all other event types. Mute and block subscriptions are actor-only: filter.user_id must identify the authenticated user and direction is not supported. subscriptions.* events require a user-context token and filter.user_id must identify the authenticated user. Optional filter.qualifiers further narrow supported chat, follow, unfollow, like, subscriptions, and trends events. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.activity.createSubscription( + { "event_type": "profile.update.bio", filter: { "user_id": "2244994945" } } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteSubscription` + +DELETE `/2/activity/subscriptions/{subscription_id}` + +**Delete X Activity Subscription** + +Deletes a subscription for an X activity event + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.activity.deleteSubscription("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `subscription_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `deleteSubscriptionsByIds` + +DELETE `/2/activity/subscriptions` + +**Delete X Activity Subscriptions by IDs** + +Deletes multiple subscriptions for X activity events by their IDs + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.activity.deleteSubscriptionsByIds(["1895000000000000000"]); +console.log(response); +``` + +### Parameters + + + `ids` (query parameter). + + +**Returns:** `Promise` + +--- + +## `getSubscriptions` + +GET `/2/activity/subscriptions` Paginated + +**Get X Activity Subscriptions** + +Get a list of active subscriptions for XAA. Optional user_id narrows the list to subscriptions whose filter.user_id matches; with a user-context token it must identify the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.activity.getSubscriptions(); +console.log(response); +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 9 bytes. + + + + Only return subscriptions whose filter.user_id matches. + + + + +**Returns:** `Promise` + +--- + +## `updateSubscription` + +PUT `/2/activity/subscriptions/{subscription_id}` + +**Update X Activity Subscription** + +Updates a subscription for an X activity event + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.activity.updateSubscription("1895000000000000000", { tag: "example" }); +console.log(response); +``` + +### Parameters + + + `subscription_id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/articles.mdx b/xdks/typescript/reference/clients/articles.mdx new file mode 100644 index 000000000..6735ea25e --- /dev/null +++ b/xdks/typescript/reference/clients/articles.mdx @@ -0,0 +1,71 @@ +--- +title: "ArticlesClient (TypeScript XDK)" +sidebarTitle: "Articles" +description: "TypeScript XDK ArticlesClient reference — 2 methods for X API v2 Articles endpoints." +--- + +Access **Articles** endpoints via `client.articles` (`ArticlesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`articleCreateDraft`](#articlecreatedraft) | `POST /2/articles/draft` | Standard | Create Draft Article | +| [`articlePublish`](#articlepublish) | `POST /2/articles/{article_id}/publish` | Standard | Publish Article | + +## `articleCreateDraft` + +POST `/2/articles/draft` + +**Create Draft Article** + +Creates a new Article draft that can later be published. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.articles.articleCreateDraft( + { title: "example", "content_state": { blocks: [{}], entities: [{}] } } +); +console.log(response); +``` + +### Parameters + + + Create a draft Article. + + +**Returns:** `Promise` + +--- + +## `articlePublish` + +POST `/2/articles/{article_id}/publish` + +**Publish Article** + +Publishes a draft Article, making it publicly visible. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.articles.articlePublish("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `article_id` (path parameter). + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/bots.mdx b/xdks/typescript/reference/clients/bots.mdx new file mode 100644 index 000000000..2b2bfd745 --- /dev/null +++ b/xdks/typescript/reference/clients/bots.mdx @@ -0,0 +1,201 @@ +--- +title: "BotsClient (TypeScript XDK)" +sidebarTitle: "Bots" +description: "TypeScript XDK BotsClient reference — 6 methods for X API v2 Bots endpoints." +--- + +Access **Bots** endpoints via `client.bots` (`BotsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createBot`](#createbot) | `POST /2/bots` | Standard | Create a Bot | +| [`deleteBot`](#deletebot) | `DELETE /2/bots/{id}` | Standard | Delete Bot | +| [`get`](#get) | `GET /2/bots` | Standard | Get Bots | +| [`revokeBotToken`](#revokebottoken) | `DELETE /2/bots/{id}/token` | Standard | Revoke Bot Token | +| [`rotateBotToken`](#rotatebottoken) | `POST /2/bots/{id}/token` | Standard | Rotate Bot Token | +| [`updateBot`](#updatebot) | `PUT /2/bots/{id}` | Standard | Update Bot | + +## `createBot` + +POST `/2/bots` + +**Create a Bot** + +Creates a bot account in the calling app's project and returns its bearer token. Idempotent on handle: repeating the request for a handle that already names one of the project's bots returns that bot with a freshly minted token, revoking the previous one — safe to retry when a response was lost, since the replaced token was never seen. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is created in the user's project instead; its token is still minted for the calling app. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.bots.createBot({ handle: "example" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteBot` + +DELETE `/2/bots/{id}` + +**Delete Bot** + +Deletes a bot account from the calling app's project. With an OAuth 2.0 user token, the user must be an admin of the project's developer account. On API Connect, where the request bills the user's own account, the bot is deleted from the user's project instead. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.bots.deleteBot("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `get` + +GET `/2/bots` + +**Get Bots** + +Retrieves the bot accounts in the calling app's project. meta.max_bots is the most bots the project can have. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.bots.get(); +console.log(response); +``` + +### Parameters + + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `revokeBotToken` + +DELETE `/2/bots/{id}/token` + +**Revoke Bot Token** + +Revokes a bot's bearer token. The bot account is kept, and rotating its token mints a new one. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.bots.revokeBotToken("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `rotateBotToken` + +POST `/2/bots/{id}/token` + +**Rotate Bot Token** + +Mints a new bearer token for a bot and invalidates every token previously issued for it. The new token is returned only once. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.bots.rotateBotToken("1895000000000000000", { scopes: ["example"] }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateBot` + +PUT `/2/bots/{id}` + +**Update Bot** + +Updates a bot's handle, display name, or who may send it Direct Messages. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.bots.updateBot("1895000000000000000", { handle: "example" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/broadcasts.mdx b/xdks/typescript/reference/clients/broadcasts.mdx new file mode 100644 index 000000000..77cc99411 --- /dev/null +++ b/xdks/typescript/reference/clients/broadcasts.mdx @@ -0,0 +1,1342 @@ +--- +title: "BroadcastsClient (TypeScript XDK)" +sidebarTitle: "Broadcasts" +description: "TypeScript XDK BroadcastsClient reference — 41 methods for X API v2 Broadcasts endpoints." +--- + +Access **Broadcasts** endpoints via `client.broadcasts` (`BroadcastsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`addChatModerator`](#addchatmoderator) | `POST /2/broadcasts/chat/moderators` | Standard | Add a Chat Moderator | +| [`createBroadcast`](#createbroadcast) | `POST /2/broadcasts` | Standard | Go Live on a Source | +| [`createScheduledBroadcast`](#createscheduledbroadcast) | `POST /2/broadcasts/scheduled` | Standard | Create a Scheduled Broadcast | +| [`createSource`](#createsource) | `POST /2/sources` | Standard | Create a Stream Source | +| [`createUserBroadcast`](#createuserbroadcast) | `POST /2/users/{id}/broadcasts` | Standard | Create a Broadcast on a User's Source | +| [`createUserSource`](#createusersource) | `POST /2/users/{id}/sources` | Standard | Create a Stream Source for a User | +| [`deleteBroadcast`](#deletebroadcast) | `DELETE /2/broadcasts/{id}` | Standard | Delete a Broadcast | +| [`deleteBroadcastChatMessage`](#deletebroadcastchatmessage) | `DELETE /2/broadcasts/{id}/chat/{message_id}` | Standard | Remove a Chat Message from a Live Broadcast | +| [`deleteScheduledBroadcast`](#deletescheduledbroadcast) | `DELETE /2/broadcasts/scheduled/{id}` | Standard | Delete a Scheduled Broadcast | +| [`deleteSource`](#deletesource) | `DELETE /2/sources/{id}` | Standard | Delete a Stream Source | +| [`deleteUserBroadcast`](#deleteuserbroadcast) | `DELETE /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Delete a User's Broadcast | +| [`deleteUserSource`](#deleteusersource) | `DELETE /2/users/{id}/sources/{source_id}` | Standard | Delete a User's Stream Source | +| [`getBroadcast`](#getbroadcast) | `GET /2/broadcasts/{id}` | Standard | Get a Broadcast | +| [`getBroadcastChat`](#getbroadcastchat) | `GET /2/broadcasts/{id}/chat` | Paginated | Get Broadcast Chat History | +| [`getChatModerators`](#getchatmoderators) | `GET /2/broadcasts/chat/moderators` | Standard | Get Chat Moderators | +| [`getChatMutedUsers`](#getchatmutedusers) | `GET /2/broadcasts/chat/mutes` | Paginated | Get Muted Chat Users | +| [`getRegion`](#getregion) | `GET /2/region` | Standard | Get the Ingest Region | +| [`getScheduledBroadcast`](#getscheduledbroadcast) | `GET /2/broadcasts/scheduled/{id}` | Standard | Get a Scheduled Broadcast | +| [`getSource`](#getsource) | `GET /2/sources/{id}` | Standard | Get a Stream Source | +| [`getSourceStreamKey`](#getsourcestreamkey) | `GET /2/sources/{id}/stream_key` | Standard | Get a Stream Source's Stream Key | +| [`getUserBroadcast`](#getuserbroadcast) | `GET /2/users/{id}/broadcasts/{broadcast_id}` | Standard | Get a User's Broadcast | +| [`getUserSource`](#getusersource) | `GET /2/users/{id}/sources/{source_id}` | Standard | Get a User's Stream Source | +| [`goLiveScheduledBroadcast`](#golivescheduledbroadcast) | `POST /2/broadcasts/scheduled/{id}/live` | Standard | Go Live on a Scheduled Broadcast | +| [`list`](#list) | `GET /2/broadcasts` | Paginated | List Broadcasts | +| [`listLiveCategories`](#listlivecategories) | `GET /2/broadcasts/categories` | Standard | List Live Categories | +| [`listScheduled`](#listscheduled) | `GET /2/broadcasts/scheduled` | Paginated | List Scheduled Broadcasts | +| [`listSources`](#listsources) | `GET /2/sources` | Standard | List Stream Sources | +| [`listUser`](#listuser) | `GET /2/users/{id}/broadcasts` | Paginated | List a User's Broadcasts | +| [`listUserSources`](#listusersources) | `GET /2/users/{id}/sources` | Standard | List a User's Stream Sources | +| [`muteBroadcastChatUser`](#mutebroadcastchatuser) | `POST /2/broadcasts/{id}/chat/mutes` | Standard | Mute or Time Out a User in a Broadcast Chat | +| [`muteChatUser`](#mutechatuser) | `POST /2/broadcasts/chat/mutes` | Standard | Mute or Time Out a User in Chat | +| [`removeChatModerator`](#removechatmoderator) | `DELETE /2/broadcasts/chat/moderators/{user_id}` | Standard | Remove a Chat Moderator | +| [`sendBroadcastChat`](#sendbroadcastchat) | `POST /2/broadcasts/{id}/chat` | Standard | Send a Chat Message to a Live Broadcast | +| [`unmuteBroadcastChatUser`](#unmutebroadcastchatuser) | `DELETE /2/broadcasts/{id}/chat/mutes/{user_id}` | Standard | Unmute a User in a Broadcast Chat | +| [`unmuteChatUser`](#unmutechatuser) | `DELETE /2/broadcasts/chat/mutes/{user_id}` | Standard | Unmute a User in Chat | +| [`updateBroadcast`](#updatebroadcast) | `PUT /2/broadcasts/{id}` | Standard | Update a Broadcast | +| [`updateBroadcastState`](#updatebroadcaststate) | `PUT /2/broadcasts/{id}/state` | Standard | End a Broadcast | +| [`updateScheduledBroadcast`](#updatescheduledbroadcast) | `PUT /2/broadcasts/scheduled/{id}` | Standard | Update a Scheduled Broadcast | +| [`updateSource`](#updatesource) | `PUT /2/sources/{id}` | Standard | Rename a Stream Source | +| [`updateUserBroadcastState`](#updateuserbroadcaststate) | `PUT /2/users/{id}/broadcasts/{broadcast_id}/state` | Standard | Publish or End a User's Broadcast | +| [`updateUserSource`](#updateusersource) | `PUT /2/users/{id}/sources/{source_id}` | Standard | Rename a User's Stream Source | + +## `addChatModerator` + +POST `/2/broadcasts/chat/moderators` + +**Add a Chat Moderator** + +Adds a moderator to the authenticated broadcaster's persistent list and returns the updated moderator user IDs. The list applies to all current and future broadcast chats. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.addChatModerator({ "user_id": "2244994945" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createBroadcast` + +POST `/2/broadcasts` + +**Go Live on a Source** + +Takes one or more of the authenticated user's sources live and returns 201 with the new broadcast. Several sources (`source_id` plus `additional_source_ids`, one per video format) go live together as one broadcast; they must all be RTMP sources in one region, and when one of them is already live its broadcast is returned only if it holds every listed source. The broadcast goes live immediately (state `RUNNING`), even before the encoder sends video, and is ended (`TIMED_OUT`) if no video arrives within 5 minutes. It is announced in a Post unless `should_not_tweet` is true. When the source already has a live broadcast, returns 200 with that broadcast unchanged and ignores the request's `title`, `locale`, `chat_option` and `should_not_tweet`. A missing `tweet_id` means the Post hasn't been created yet, was suppressed with `should_not_tweet`, or could not be created; read it later with GET /2/broadcasts/:id. A 409 `conflict` means the source can't go live right now: either it can't take video before the encoder connects (external HLS sources, or regions where this isn't available), so retry once video is flowing, or another broadcast is live on it, so END that broadcast first. The `detail` says which, and names the live broadcast when known. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.createBroadcast({ "source_id": "1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createScheduledBroadcast` + +POST `/2/broadcasts/scheduled` + +**Create a Scheduled Broadcast** + +Schedules a broadcast for the authenticated user on one of their sources: `source_id` is required. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.createScheduledBroadcast( + { "source_id": "1895000000000000000", "scheduled_start_ms": "example" } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createSource` + +POST `/2/sources` + +**Create a Stream Source** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. Push an encoder to `rtmps_url` with the returned `stream_key`. This is the only response that includes the stream key; read it later with GET /2/sources/:id/stream_key. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.createSource({ name: "My List", region: "example" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createUserBroadcast` + +POST `/2/users/{id}/broadcasts` + +**Create a Broadcast on a User's Source** + +Creates a broadcast on one of the authenticated user's sources. `id` must be the authenticated user. The broadcast is `NOT_STARTED` and posts nothing until it is published with PUT /2/users/:id/broadcasts/:broadcast_id/state; one that is never published is deleted after 7 days. When the source already has a running broadcast, that broadcast is returned. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.createUserBroadcast("2244994945", { "source_id": "1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createUserSource` + +POST `/2/users/{id}/sources` + +**Create a Stream Source for a User** + +Creates a persistent RTMP/RTMPS ingest point for the authenticated user. `id` must be the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.createUserSource("2244994945", { name: "My List" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteBroadcast` + +DELETE `/2/broadcasts/{id}` + +**Delete a Broadcast** + +Deletes one of the authenticated user's broadcasts, scheduled or ended, including its replay. A running broadcast must be ended first. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.deleteBroadcast("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `deleteBroadcastChatMessage` + +DELETE `/2/broadcasts/{id}/chat/{message_id}` + +**Remove a Chat Message from a Live Broadcast** + +Removes a specific chat message from a running broadcast where the authenticated user is the host or a moderator. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.deleteBroadcastChatMessage("1895000000000000000", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `message_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `deleteScheduledBroadcast` + +DELETE `/2/broadcasts/scheduled/{id}` + +**Delete a Scheduled Broadcast** + +Deletes a scheduled broadcast by its alphanumeric broadcast id. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.deleteScheduledBroadcast("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + Deprecated: recurring schedules are being retired and `true` will be rejected. + + + + +**Returns:** `Promise` + +--- + +## `deleteSource` + +DELETE `/2/sources/{id}` + +**Delete a Stream Source** + +Deletes one of the authenticated user's stream sources. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.deleteSource("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Promise` + +--- + +## `deleteUserBroadcast` + +DELETE `/2/users/{id}/broadcasts/{broadcast_id}` + +**Delete a User's Broadcast** + +Deletes one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use DELETE /2/broadcasts/:id. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.deleteUserBroadcast("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `deleteUserSource` + +DELETE `/2/users/{id}/sources/{source_id}` + +**Delete a User's Stream Source** + +Deletes one of the authenticated user's stream sources. `id` must be the authenticated user. Success is an empty object. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.deleteUserSource("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `getBroadcast` + +GET `/2/broadcasts/{id}` + +**Get a Broadcast** + +Returns a broadcast owned by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getBroadcast("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getBroadcastChat` + +GET `/2/broadcasts/{id}/chat` Paginated + +**Get Broadcast Chat History** + +Returns newest-first chat messages for a broadcast owned by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getBroadcastChat("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + +"}> + A comma separated list of BroadcastChatMessage fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getChatModerators` + +GET `/2/broadcasts/chat/moderators` + +**Get Chat Moderators** + +Returns the authenticated broadcaster's persistent moderators as User resources. The list applies to all of their current and future broadcast chats. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getChatModerators(); +console.log(response); +``` + +### Parameters + + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getChatMutedUsers` + +GET `/2/broadcasts/chat/mutes` Paginated + +**Get Muted Chat Users** + +Returns the users muted in the authenticated broadcaster's chat, with the expiry time of timed mutes. Mutes apply to all of their broadcasts. Expired timed mutes are omitted. Use `expansions=user_id` to include the muted users. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getChatMutedUsers(); +console.log(response); +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of BroadcastChatMute fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getRegion` + +GET `/2/region` + +**Get the Ingest Region** + +Returns the ingest region nearest the server handling the request. Pass it as `region` when creating a stream source to ingest there. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getRegion(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `getScheduledBroadcast` + +GET `/2/broadcasts/scheduled/{id}` + +**Get a Scheduled Broadcast** + +Returns a single scheduled broadcast by its alphanumeric broadcast id. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getScheduledBroadcast("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `getSource` + +GET `/2/sources/{id}` + +**Get a Stream Source** + +Returns one of the authenticated user's stream sources. Poll it after starting an encoder and wait for `is_stream_active` before going live. The stream key is not included; read it with GET /2/sources/:id/stream_key. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getSource("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Promise` + +--- + +## `getSourceStreamKey` + +GET `/2/sources/{id}/stream_key` + +**Get a Stream Source's Stream Key** + +Returns the stream key of one of the authenticated user's stream sources. The stream key is a credential: anyone with it can stream to the source, so keep it out of logs, URLs and client-side code. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getSourceStreamKey("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + +**Returns:** `Promise` + +--- + +## `getUserBroadcast` + +GET `/2/users/{id}/broadcasts/{broadcast_id}` + +**Get a User's Broadcast** + +Returns one of the authenticated user's broadcasts. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts/:id. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getUserBroadcast("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `getUserSource` + +GET `/2/users/{id}/sources/{source_id}` + +**Get a User's Stream Source** + +Returns one of the authenticated user's stream sources. `id` must be the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.getUserSource("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `goLiveScheduledBroadcast` + +POST `/2/broadcasts/scheduled/{id}/live` + +**Go Live on a Scheduled Broadcast** + +Publishes a schedule that was created or updated with `manual_publish: true`. Without that flag the coordinator auto-publishes at start and this call is rejected. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.goLiveScheduledBroadcast("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `list` + +GET `/2/broadcasts` Paginated + +**List Broadcasts** + +Returns the authenticated user's live-video broadcasts, or selected owned broadcasts when ids are provided. + +At most one of `ids`, `max_results` may be provided. At most one of `ids`, `pagination_token` may be provided. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.list(); +console.log(response); +``` + +### Parameters + + + + + Comma-separated broadcast IDs to retrieve instead of listing broadcasts. + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of Broadcast fields to display. + + + + +**Returns:** `Promise` + +--- + +## `listLiveCategories` + +GET `/2/broadcasts/categories` + +**List Live Categories** + +Returns the live categories a host can pick when going live, in display order. Pass a category's `id` as `live_category_id` on POST /2/broadcasts. Ids are permanent; names can change, so store the id and show the current name. The whole list is returned in one response, without paging. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.broadcasts.listLiveCategories(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `listScheduled` + +GET `/2/broadcasts/scheduled` Paginated + +**List Scheduled Broadcasts** + +Returns scheduled broadcasts owned by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.listScheduled(); +console.log(response); +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + `oldest_start_time` (query parameter). + + + + `newest_start_time` (query parameter). + + + + `pagination_token` (query parameter). + + + + +**Returns:** `Promise` + +--- + +## `listSources` + +GET `/2/sources` + +**List Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources. A source's `id` is the `source_id` that POST /2/broadcasts and scheduled broadcasts take. Stream keys are not included; read one with GET /2/sources/:id/stream_key. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.listSources(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `listUser` + +GET `/2/users/{id}/broadcasts` Paginated + +**List a User's Broadcasts** + +Returns the authenticated user's broadcasts, 100 per page. `id` must be the authenticated user. Deprecated: use GET /2/broadcasts. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.listUser("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `next_token.offset` from the previous page. Empty reads the first page. + + + + +**Returns:** `Promise` + +--- + +## `listUserSources` + +GET `/2/users/{id}/sources` + +**List a User's Stream Sources** + +Returns the authenticated user's RTMP/RTMPS stream sources (empty array if none). `id` must be the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.listUserSources("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `muteBroadcastChatUser` + +POST `/2/broadcasts/{id}/chat/mutes` + +**Mute or Time Out a User in a Broadcast Chat** + +Prevents a user from posting further messages in a running broadcast chat. When `end_at_ms` is provided, the mute expires at that time. The authenticated user must be the broadcast host or a moderator. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.muteBroadcastChatUser("1895000000000000000", { "user_id": "2244994945" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `muteChatUser` + +POST `/2/broadcasts/chat/mutes` + +**Mute or Time Out a User in Chat** + +Prevents a user from posting messages in all of a broadcaster's chats. Without `broadcast_id`, the user is muted in the authenticated user's own chats. Moderators pass `broadcast_id` to mute the user in that broadcast host's chats. When `end_at_ms` is provided, the mute expires at that time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.muteChatUser({ "user_id": "2244994945" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `removeChatModerator` + +DELETE `/2/broadcasts/chat/moderators/{user_id}` + +**Remove a Chat Moderator** + +Removes a moderator from the authenticated broadcaster's persistent list and returns the updated moderator user IDs. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.removeChatModerator("2244994945"); +console.log(response); +``` + +### Parameters + + + A 64-bit signed integer. + + +**Returns:** `Promise` + +--- + +## `sendBroadcastChat` + +POST `/2/broadcasts/{id}/chat` + +**Send a Chat Message to a Live Broadcast** + +Posts a chat message to a running broadcast, attributed to the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.sendBroadcastChat("1895000000000000000", { text: "Hello from XDK!" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `unmuteBroadcastChatUser` + +DELETE `/2/broadcasts/{id}/chat/mutes/{user_id}` + +**Unmute a User in a Broadcast Chat** + +Allows a muted user to post messages in a running broadcast chat again. The authenticated user must be the broadcast host or a moderator. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.unmuteBroadcastChatUser("1895000000000000000", "2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + A 64-bit signed integer. + + +**Returns:** `Promise` + +--- + +## `unmuteChatUser` + +DELETE `/2/broadcasts/chat/mutes/{user_id}` + +**Unmute a User in Chat** + +Allows a muted user to post messages in a broadcaster's chats again. Without `broadcast_id`, the user is unmuted in the authenticated user's own chats. Moderators pass `broadcast_id` to unmute the user in that broadcast host's chats. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.unmuteChatUser("2244994945"); +console.log(response); +``` + +### Parameters + + + A 64-bit signed integer. + + + + + + A broadcast whose host's chats the user is unmuted in. + + + + +**Returns:** `Promise` + +--- + +## `updateBroadcast` + +PUT `/2/broadcasts/{id}` + +**Update a Broadcast** + +Changes the title, chat option or live category of one of the authenticated user's broadcasts and returns the broadcast. Send at least one of `title`, `chat_option` and `live_category_id`; fields left out keep their values. A broadcast can be updated before it starts, while it is live and after it has ended. A 409 `conflict` means the broadcast can't be edited, for example because it was deleted or moderated. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.updateBroadcast("1895000000000000000", { "live_category_id": "1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateBroadcastState` + +PUT `/2/broadcasts/{id}/state` + +**End a Broadcast** + +Ends one of the authenticated user's broadcasts. Only `state: END` is supported. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.updateBroadcastState("1895000000000000000", { state: "example" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateScheduledBroadcast` + +PUT `/2/broadcasts/scheduled/{id}` + +**Update a Scheduled Broadcast** + +Updates a scheduled broadcast. Path `:id` is the broadcast id; the body must include `scheduled_broadcast_id`. Re-send every field that should be kept. Passing a stream key as `source_id` is deprecated and stops working when the /2/users/:id/sources and /2/users/:id/broadcasts routes reach end of life on January 1, 2027; pass the source's `id` from GET /2/sources instead. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.updateScheduledBroadcast( + "1895000000000000000", + { "scheduled_broadcast_id": "1895000000000000000", "scheduled_start_ms": "example", "scheduled_end_ms": "example" } +); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateSource` + +PUT `/2/sources/{id}` + +**Rename a Stream Source** + +Renames one of the authenticated user's stream sources. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.updateSource("1895000000000000000", { name: "My List" }); +console.log(response); +``` + +### Parameters + + + Source id (19 digits), from GET /2/sources. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateUserBroadcastState` + +PUT `/2/users/{id}/broadcasts/{broadcast_id}/state` + +**Publish or End a User's Broadcast** + +Publishes or ends one of the authenticated user's broadcasts. `id` must be the authenticated user. `PUBLISH` takes a broadcast created with POST /2/users/:id/broadcasts live once its source is receiving video, and posts it unless `should_not_tweet` is true. `END` ends the broadcast. Deprecated: use PUT /2/broadcasts/:id/state to end a broadcast. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.updateUserBroadcastState("2244994945", "1895000000000000000", { state: "example" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `broadcast_id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateUserSource` + +PUT `/2/users/{id}/sources/{source_id}` + +**Rename a User's Stream Source** + +Renames one of the authenticated user's stream sources. `id` must be the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.broadcasts.updateUserSource("2244994945", "1895000000000000000", { name: "My List" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/calls.mdx b/xdks/typescript/reference/clients/calls.mdx new file mode 100644 index 000000000..2516cfab9 --- /dev/null +++ b/xdks/typescript/reference/clients/calls.mdx @@ -0,0 +1,387 @@ +--- +title: "CallsClient (TypeScript XDK)" +sidebarTitle: "Calls" +description: "TypeScript XDK CallsClient reference — 10 methods for X API v2 Calls endpoints." +--- + +Access **Calls** endpoints via `client.calls` (`CallsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`cancelScheduledCall`](#cancelscheduledcall) | `DELETE /2/calls/scheduled/{id}` | Standard | Cancel a Scheduled Call | +| [`createCall`](#createcall) | `POST /2/calls` | Standard | Create a Call | +| [`getCall`](#getcall) | `GET /2/calls/{id}` | Standard | Get a Call | +| [`getScheduledCall`](#getscheduledcall) | `GET /2/calls/scheduled/{id}` | Standard | Get a Scheduled Call | +| [`joinCall`](#joincall) | `POST /2/calls/{id}/join` | Standard | Join a Call | +| [`leaveCall`](#leavecall) | `POST /2/calls/{id}/leave` | Standard | Leave a Call | +| [`listScheduled`](#listscheduled) | `GET /2/calls/scheduled` | Standard | List Scheduled Calls | +| [`respondToScheduledCall`](#respondtoscheduledcall) | `POST /2/calls/scheduled/{id}/rsvp` | Standard | Respond to a Scheduled Call | +| [`scheduleCall`](#schedulecall) | `POST /2/calls/scheduled` | Standard | Schedule a Call | +| [`updateScheduledCall`](#updatescheduledcall) | `PUT /2/calls/scheduled/{id}` | Standard | Update a Scheduled Call | + +## `cancelScheduledCall` + +DELETE `/2/calls/scheduled/{id}` + +**Cancel a Scheduled Call** + +Cancels a scheduled call the authenticated user organizes, and takes it off invitees' calendars. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. Cancelling what is already cancelled succeeds. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.cancelScheduledCall("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + Which occurrences: all (the default without occurrence_start_time), this (the default with it), or this_and_following. + + + + Start of the occurrence that scope this or this_and_following refers to (RFC 3339). + + + + Whether invitees get an email about it. Defaults to true. + + + + +**Returns:** `Promise` + +--- + +## `createCall` + +POST `/2/calls` + +**Create a Call** + +Starts an X call hosted by the authenticated user (typically a bot). Pass an XChat conversation_id to start the call in that conversation, or omit it for a standalone call anyone can join with the returned join_url (subject to join_policy). The call starts empty: put an agent in it with POST /2/calls/:id/join. When the host joins a conversation call, the other members are rung. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.createCall({ "conversation_id": "1500000000000000000" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `getCall` + +GET `/2/calls/{id}` + +**Get a Call** + +Returns a call's title, join policy, host and participant count, and whether the authenticated user may join it without asking the host. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.getCall("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of Call fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getScheduledCall` + +GET `/2/calls/scheduled/{id}` + +**Get a Scheduled Call** + +Returns a scheduled call the authenticated user organizes or is invited to, at its occurrence running now or its next one within a year: its time, call, recurrence and who is invited and how they answered. Changes can take a few seconds to show here. Use scheduled_call.fields to select which fields are returned. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.getScheduledCall("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of ScheduledCall fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Call fields to display. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `joinCall` + +POST `/2/calls/{id}/join` + +**Join a Call** + +Starts a media session that takes part in the call as the authenticated user. The response carries a media_url and a short-lived media_token: open a WebSocket to media_url with the token as a Bearer credential to exchange PCM16 audio and events with the call; the user enters the call when the WebSocket connects. On a closed or trusted call the session asks the host first (admission: requires_approval). + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.joinCall("1895000000000000000", { media: { type: "websocket" } }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `leaveCall` + +POST `/2/calls/{id}/leave` + +**Leave a Call** + +Ends the authenticated user's media session in the call (its WebSocket receives session.ended with reason left) and removes the user from the call. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.leaveCall("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `listScheduled` + +GET `/2/calls/scheduled` + +**List Scheduled Calls** + +Returns the X calls on the authenticated user's calendar, earliest first: events on their X Calls calendar, and events on the Microsoft Outlook calendars they linked to X whose conference is an X call. Calls still running at start_time are included. The window defaults to the next 24 hours and may span at most 7 days. Use scheduled_call.fields to select which fields are returned. + +When both are provided, `start_time` must be earlier than `end_time`. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.listScheduled(); +console.log(response); +``` + +### Parameters + + + + + Calls still running at this time or starting after it (RFC 3339). Defaults to now. + + + + Calls starting before this time (RFC 3339). Defaults to 24 hours after start_time. + + + + The most calls to return. Defaults to 20. + + +"}> + A comma separated list of ScheduledCall fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Call fields to display. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `respondToScheduledCall` + +POST `/2/calls/scheduled/{id}/rsvp` + +**Respond to a Scheduled Call** + +Accepts, declines or tentatively accepts an invitation to a scheduled call for the authenticated user. For a recurring call, scope and occurrence_start_time pick the occurrences the answer is for: all of them (the default), one, or one and every one after it. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.respondToScheduledCall("1895000000000000000", { response: "accepted" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `scheduleCall` + +POST `/2/calls/scheduled` + +**Schedule a Call** + +Puts an X call on the authenticated user's X Calls calendar, with them as its organizer, and invites people to it. The call exists right away: share its join_url, or put an agent in it at start time with POST /2/calls/:id/join. A recurrence (an RFC 5545 RRULE) repeats it. Invitees get an email unless notify_invitees is false. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.scheduleCall({ "start_time": "2026-01-01T00:00:00Z" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateScheduledCall` + +PUT `/2/calls/scheduled/{id}` + +**Update a Scheduled Call** + +Moves, renames or re-invites a scheduled call the authenticated user organizes. Only the fields sent change. For a recurring call, scope and occurrence_start_time pick the occurrences: all of them (the default), one, or one and every one after it. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.calls.updateScheduledCall("1895000000000000000", { "occurrence_start_time": "example" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + At least one of `start_time`, `duration_minutes`, `title`, `description`, `invitee_ids`, `recurrence`, `time_zone` is required. + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/chat.mdx b/xdks/typescript/reference/clients/chat.mdx new file mode 100644 index 000000000..c674fb66c --- /dev/null +++ b/xdks/typescript/reference/clients/chat.mdx @@ -0,0 +1,1611 @@ +--- +title: "ChatClient (TypeScript XDK)" +sidebarTitle: "Chat" +description: "TypeScript XDK ChatClient reference — 45 methods for X API v2 Chat endpoints." +--- + +Access **Chat** endpoints via `client.chat` (`ChatClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`acceptMessageRequest`](#acceptmessagerequest) | `POST /2/chat/message_requests/{id}/accept` | Standard | Accept a Chat Message Request | +| [`addConversationKeys`](#addconversationkeys) | `POST /2/chat/conversations/{id}/keys` | Standard | Add Conversation Keys | +| [`addGroupAdmins`](#addgroupadmins) | `POST /2/chat/conversations/{id}/admins` | Standard | Add Admins to a Chat Group Conversation | +| [`addGroupMembers`](#addgroupmembers) | `POST /2/chat/conversations/{id}/members` | Standard | Add Members to a Chat Group Conversation | +| [`addUserPublicKey`](#adduserpublickey) | `POST /2/users/{id}/public_keys` | Standard | Add Public Key | +| [`approveGroupAdminRequest`](#approvegroupadminrequest) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/approve` | Standard | Approve an Admin Request in a Chat Group Conversation | +| [`archiveConversation`](#archiveconversation) | `POST /2/chat/conversations/{id}/archive` | Standard | Archive a Chat Conversation | +| [`createConversation`](#createconversation) | `POST /2/chat/conversations/group` | Standard | Create Chat Group Conversation | +| [`createGroupAdminRequest`](#creategroupadminrequest) | `POST /2/chat/conversations/{id}/admin_requests` | Standard | Request Admin Permissions in a Chat Group Conversation | +| [`createGroupJoinRequest`](#creategroupjoinrequest) | `POST /2/chat/conversations/{id}/join_requests` | Standard | Request to Join a Chat Group | +| [`deleteConversation`](#deleteconversation) | `DELETE /2/chat/conversations/{id}` | Standard | Delete a Chat Conversation | +| [`deleteConversationMessageTtl`](#deleteconversationmessagettl) | `DELETE /2/chat/conversations/{id}/message_ttl` | Standard | Turn Off Disappearing Messages in a Chat Conversation | +| [`deleteMessages`](#deletemessages) | `POST /2/chat/conversations/{id}/messages/delete` | Standard | Delete Chat Messages | +| [`disableGroupInvite`](#disablegroupinvite) | `DELETE /2/chat/conversations/{id}/invite` | Standard | Disable a Chat Group Invite Link | +| [`enableGroupInvite`](#enablegroupinvite) | `POST /2/chat/conversations/{id}/invite` | Standard | Enable a Chat Group Invite Link | +| [`getConversation`](#getconversation) | `GET /2/chat/conversations/{id}` | Standard | Get Chat Conversation | +| [`getConversationEvents`](#getconversationevents) | `GET /2/chat/conversations/{id}/events` | Paginated | Get Chat Conversation Events | +| [`getConversationPinnedMessages`](#getconversationpinnedmessages) | `GET /2/chat/conversations/{id}/pinned_messages` | Paginated | Get Chat Conversation Pinned Messages | +| [`getConversations`](#getconversations) | `GET /2/chat/conversations` | Paginated | Get Chat Conversations | +| [`getGroupAdminRequests`](#getgroupadminrequests) | `GET /2/chat/conversations/{id}/admin_requests` | Paginated | Get Pending Admin Requests for a Chat Group Conversation | +| [`getGroupInvite`](#getgroupinvite) | `GET /2/chat/conversations/{id}/invites/{token}` | Standard | Get a Chat Group Invite Link | +| [`getMessageRequest`](#getmessagerequest) | `GET /2/chat/message_requests/{id}` | Standard | Get Chat Message Request | +| [`getMessageRequests`](#getmessagerequests) | `GET /2/chat/message_requests` | Paginated | Get Chat Message Requests | +| [`getSettings`](#getsettings) | `GET /2/chat/settings` | Standard | Get Chat Settings | +| [`initializeGroup`](#initializegroup) | `POST /2/chat/conversations/group/initialize` | Standard | Initialize Chat Group | +| [`markConversationRead`](#markconversationread) | `POST /2/chat/conversations/{id}/read` | Standard | Mark Conversation as Read | +| [`markConversationUnread`](#markconversationunread) | `POST /2/chat/conversations/{id}/unread` | Standard | Mark Conversation as Unread | +| [`mediaDownload`](#mediadownload) | `GET /2/chat/media/{id}/{media_hash_key}` | Standard | Download Chat Media | +| [`mediaUploadAppend`](#mediauploadappend) | `POST /2/chat/media/upload/{id}/append` | Standard | Append Chat Media Upload | +| [`mediaUploadFinalize`](#mediauploadfinalize) | `POST /2/chat/media/upload/{id}/finalize` | Standard | Finalize Chat Media Upload | +| [`mediaUploadInitialize`](#mediauploadinitialize) | `POST /2/chat/media/upload/initialize` | Standard | Initialize Chat Media Upload | +| [`muteConversation`](#muteconversation) | `POST /2/chat/conversations/{id}/mute` | Standard | Mute a Chat Conversation | +| [`rejectGroupAdminRequest`](#rejectgroupadminrequest) | `POST /2/chat/conversations/{id}/admin_requests/{user_id}/reject` | Standard | Reject an Admin Request in a Chat Group Conversation | +| [`rejectGroupJoinRequests`](#rejectgroupjoinrequests) | `POST /2/chat/conversations/{id}/join_requests/reject` | Standard | Reject Join Requests for a Chat Group Conversation | +| [`removeGroupAdmins`](#removegroupadmins) | `POST /2/chat/conversations/{id}/admins/remove` | Standard | Remove Admins from a Chat Group Conversation | +| [`removeGroupMembers`](#removegroupmembers) | `POST /2/chat/conversations/{id}/members/remove` | Standard | Remove Members from a Chat Group Conversation | +| [`sendMessage`](#sendmessage) | `POST /2/chat/conversations/{id}/messages` | Standard | Send Chat Message | +| [`sendTypingIndicator`](#sendtypingindicator) | `POST /2/chat/conversations/{id}/typing` | Standard | Send Typing Indicator | +| [`unarchiveConversation`](#unarchiveconversation) | `DELETE /2/chat/conversations/{id}/archive` | Standard | Unarchive a Chat Conversation | +| [`unmuteConversation`](#unmuteconversation) | `DELETE /2/chat/conversations/{id}/mute` | Standard | Unmute a Chat Conversation | +| [`updateConversationMessageTtl`](#updateconversationmessagettl) | `PUT /2/chat/conversations/{id}/message_ttl` | Standard | Turn On Disappearing Messages in a Chat Conversation | +| [`updateConversationScreenCapture`](#updateconversationscreencapture) | `PUT /2/chat/conversations/{id}/screen_capture` | Standard | Update Screen Capture Settings for a Chat Conversation | +| [`updateGroup`](#updategroup) | `PUT /2/chat/conversations/{id}` | Standard | Update a Chat Group Conversation | +| [`updateGroupAdminSettings`](#updategroupadminsettings) | `PUT /2/chat/conversations/{id}/admin_settings` | Standard | Update the Admin-Only Settings of a Chat Group Conversation | +| [`updateSettings`](#updatesettings) | `PUT /2/chat/settings` | Standard | Update Chat Settings | + +## `acceptMessageRequest` + +POST `/2/chat/message_requests/{id}/accept` + +**Accept a Chat Message Request** + +Accepts the other user's pending message request in a 1:1 Chat conversation, which moves to the authenticated user's inbox. Without a pending request, including after a successful accept, the response is 404. Replying to a request does not accept it. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.acceptMessageRequest("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + +**Returns:** `Promise` + +--- + +## `addConversationKeys` + +POST `/2/chat/conversations/{id}/keys` + +**Add Conversation Keys** + +Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation id; the server constructs the canonical conversation ID from the authenticated user and recipient. The request body must contain the conversation key version and participant keys (the conversation key encrypted for each participant using their public key). + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.addConversationKeys( + "1895000000000000000", + { "conversation_key_version": "example", "conversation_participant_keys": [{ "user_id": "2244994945", "encrypted_conversation_key": "example", "public_key_version": "example" }] } +); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `addGroupAdmins` + +POST `/2/chat/conversations/{id}/admins` + +**Add Admins to a Chat Group Conversation** + +Grants admin rights to one or more members of an existing encrypted Chat group conversation. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.addGroupAdmins("1895000000000000000", { "user_ids": ["2244994945"] }); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `addGroupMembers` + +POST `/2/chat/conversations/{id}/members` + +**Add Members to a Chat Group Conversation** + +Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key. Adding a user who has a pending join request approves that request; approval needs the same key-rotation body as adding any member. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.addGroupMembers("1895000000000000000", { "user_ids": ["2244994945"] }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `addUserPublicKey` + +POST `/2/users/{id}/public_keys` + +**Add Public Key** + +Registers a user's public key for X Chat encryption. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.addUserPublicKey("2244994945", { "public_key": { "public_key": "example" } }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `approveGroupAdminRequest` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/approve` + +**Approve an Admin Request in a Chat Group Conversation** + +Makes the user who requested admin permissions an admin of an encrypted Chat group conversation. Only a group admin can approve. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.approveGroupAdminRequest( + "1895000000000000000", + "2244994945", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `archiveConversation` + +POST `/2/chat/conversations/{id}/archive` + +**Archive a Chat Conversation** + +Archives a Chat conversation for the authenticated user only. Archiving an archived conversation changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.archiveConversation( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createConversation` + +POST `/2/chat/conversations/group` + +**Create Chat Group Conversation** + +Creates a new encrypted Chat group conversation on behalf of the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.createConversation( + { "conversation_id": "1500000000000000000", "conversation_key_version": "example", "conversation_participant_keys": [{ "user_id": "2244994945", "encrypted_conversation_key": "example", "public_key_version": "example" }], "group_members": ["example"] } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createGroupAdminRequest` + +POST `/2/chat/conversations/{id}/admin_requests` + +**Request Admin Permissions in a Chat Group Conversation** + +Asks the admins of an encrypted Chat group conversation to make the authenticated user an admin. An admin approves or rejects the request. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.createGroupAdminRequest( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createGroupJoinRequest` + +POST `/2/chat/conversations/{id}/join_requests` + +**Request to Join a Chat Group** + +Asks to join an encrypted Chat group conversation through its invite link. The request stays pending until a group admin adds the user to the group. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.createGroupJoinRequest("1895000000000000000", { token: "example" }); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteConversation` + +DELETE `/2/chat/conversations/{id}` + +**Delete a Chat Conversation** + +Deletes a Chat conversation for the authenticated user only; other participants keep it. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Deleting a pending message request's conversation deletes the request, like Delete in the X app. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.deleteConversation( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteConversationMessageTtl` + +DELETE `/2/chat/conversations/{id}/message_ttl` + +**Turn Off Disappearing Messages in a Chat Conversation** + +Stops new messages in a 1:1 or group Chat conversation from disappearing, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.deleteConversationMessageTtl( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteMessages` + +POST `/2/chat/conversations/{id}/messages/delete` + +**Delete Chat Messages** + +Deletes one or more messages from a Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Delete for all removes a message you sent (or, in groups you administer, any message) for every participant; delete for self removes any message only from your own view. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.deleteMessages( + "1895000000000000000", + { "sequence_ids": ["1895000000000000000"], "delete_message_action": "delete_for_all", "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `disableGroupInvite` + +DELETE `/2/chat/conversations/{id}/invite` + +**Disable a Chat Group Invite Link** + +Turns off the invite link for an encrypted Chat group conversation. The existing link stops working. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.disableGroupInvite( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `enableGroupInvite` + +POST `/2/chat/conversations/{id}/invite` + +**Enable a Chat Group Invite Link** + +Turns on the invite link for an encrypted Chat group conversation and returns the link details. The client builds the link and sends it as invite_url, in the form https://x.com/i/chat/group_join/<conversation_id>/<token>, where the token is exactly 10 letters, digits, '-' or '_'. invite_url is required when action_signatures is sent. To make the link expire, send validity_duration_msec or validity_expiry_timestamp_msec. With action_signatures, send validity_expiry_timestamp_msec, because the signed payload carries the expiry. The group name and avatar sent here are stored unencrypted and shown to anyone who opens the link. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.enableGroupInvite( + "1895000000000000000", + { "affiliate_user_id": "1895000000000000000" } +); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `getConversation` + +GET `/2/chat/conversations/{id}` + +**Get Chat Conversation** + +Returns metadata for a Chat conversation including type, muted status, group details, and your unread state. For the unread state, request chat_conversation.fields=unread,last_read_event_id,newest_event_id: those fields give your read state, computed from your latest read receipt and the conversation's latest notifying message. Use chat_conversation.fields to select which fields are returned. Use expansions to hydrate member, admin, or participant user objects. Use user.fields to control which profile fields are returned for expanded users; in a 1:1 chat, user.fields=receives_your_chat on the participant says how you can message them: encrypted, unencrypted, or none. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getConversation("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of ChatConversation fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getConversationEvents` + +GET `/2/chat/conversations/{id}/events` Paginated + +**Get Chat Conversation Events** + +Retrieves the events of a specific Chat conversation, newest first, with pagination support: messages, key changes, group changes, and read receipts. Events with an id above the conversation's last_read_event_id are unread: they come after the point you read up to. To collect them, page until an event's id is at or below it. Only `id` and `encoded_event` are always present. Events are either end-to-end encrypted or unencrypted, such as messages sent before the conversation was encrypted. Encrypted events carry `conversation_key_version`, and usually `conversation_token` and `message_event_signature`; treat an encrypted event without `message_event_signature` as unverified. An event without `conversation_key_version` is unencrypted. Decode each `encoded_event` client-side, and decrypt it with the conversation key named by `conversation_key_version` when that is present. A page holds up to `max_results` events and can hold fewer while `has_more` is true. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getConversationEvents("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of events to return. + + + + The next_token from a previous response, to fetch the next page. + + +"}> + A comma separated list of ChatMessageEvent fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getConversationPinnedMessages` + +GET `/2/chat/conversations/{id}/pinned_messages` Paginated + +**Get Chat Conversation Pinned Messages** + +Retrieves the pinned message events of a Chat conversation with pagination support. Each event is a Base64-encoded Thrift pin event whose contents are end-to-end encrypted; decode and decrypt it client-side. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getConversationPinnedMessages("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + + + The next_token from a previous response, to fetch the next page. + + +"}> + A comma separated list of ChatPinnedMessage fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getConversations` + +GET `/2/chat/conversations` Paginated + +**Get Chat Conversations** + +Retrieves a list of Chat conversations for the authenticated user's inbox, newest first: the most recently active conversation comes first. To find the chat with a particular person, start with participant_query set to their @username or name; with expansions=participant_ids, user.fields=receives_your_chat says how you can message each match. The unread, last_read_event_id and newest_event_id fields give your read state, computed from your latest read receipt and each conversation's latest notifying message. Request them with chat_conversation.fields=unread,last_read_event_id,newest_event_id. + +The filters unread_only, type, is_archived, is_muted, participant_ids, participant_query, start_time and end_time are optional, and all filters must match (AND). participant_query keeps conversations where another participant's username, or a word of their display name, starts with the query, ignoring case and accents; with a leading @ it matches usernames only. It considers the 100 people who best match the query, uses only public profile information, and never matches group names, nicknames or messages. start_time and end_time apply to the time of each conversation's latest message. + +Each page covers max_results conversations and returns those that match, so a page can hold fewer than max_results, or none, while meta.next_token is set and has_more is true: keep paging, passing meta.next_token as pagination_token. Once a page reaches a conversation whose latest message is older than start_time, has_more is false. A pagination_token only works with the same filters as the request that returned it; with other filters, the request fails with a 400. + +When both are provided, `start_time` must be earlier than `end_time`. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getConversations(); +console.log(response); +``` + +### Parameters + + + + + Conversations covered per page (1-1000, default 200). Filtered pages can return fewer. + + + + meta.next_token from the previous page. Send the same filters with it, or the request fails. + + + + Return only unread conversations. A page can be short; keep paging while has_more. + + + + Only direct (1:1) or only group conversations. Omit for both. + + + + true: only archived; false: only not archived. Omit for both. + + + + true: only muted; false: only not muted. Omit for both. + + + + Comma-separated numeric user IDs (1-10), all in the chat. Names or @handles: use participant_query. + + + + Start here to find someone's chat: their @username or a word of their name (1-50 chars). + + + + ISO 8601, e.g. 2026-10-16T00:00:00Z. Chats whose latest message is at or after this time. + + + + ISO 8601, e.g. 2026-10-17T00:00:00Z. Chats whose latest message is before this time. + + +"}> + A comma separated list of ChatConversation fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getGroupAdminRequests` + +GET `/2/chat/conversations/{id}/admin_requests` Paginated + +**Get Pending Admin Requests for a Chat Group Conversation** + +Returns the users who have asked to become admins of an encrypted Chat group conversation. Only a group admin can list admin requests. Use user.fields to select which profile fields are returned. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getGroupAdminRequests("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + + + The next_token from a previous response, to fetch the next page. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getGroupInvite` + +GET `/2/chat/conversations/{id}/invites/{token}` + +**Get a Chat Group Invite Link** + +Returns the preview of an encrypted Chat group conversation from its invite link: group name, avatar, member count, and the authenticated user's join state. The conversation ID and the token both come from the invite link. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getGroupInvite("1895000000000000000", "example"); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The 10-character invite token from the group's invite link. + + + + +"}> + A comma separated list of ChatGroupInvite fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMessageRequest` + +GET `/2/chat/message_requests/{id}` + +**Get Chat Message Request** + +Retrieves the message request state of a 1:1 Chat conversation and its newest message events. Like opening the request in an X app, reading it marks the returned messages as delivered and updates the unread badge. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getMessageRequest("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The other user's ID, or both user IDs joined by a hyphen. + + + + +"}> + A comma separated list of ChatMessageRequestDetail fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMessageRequests` + +GET `/2/chat/message_requests` Paginated + +**Get Chat Message Requests** + +Retrieves the authenticated user's pending Chat message requests from one inbox. Message contents are end-to-end encrypted unless the conversation is unencrypted. Accepting or deleting requests between pages can skip or repeat requests, and a page can be empty while `next_token` is set. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getMessageRequests(); +console.log(response); +``` + +### Parameters + + + + + Which message request inbox to list: `you_may_know` (the apps' Priority tab) or `low_quality` (the apps' Hidden tab). + + + + The maximum number of message requests to return. + + + + The next_token from a previous response, to fetch the next page. + + +"}> + A comma separated list of ChatMessageRequest fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getSettings` + +GET `/2/chat/settings` + +**Get Chat Settings** + +Returns the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.getSettings(); +console.log(response); +``` + +### Parameters + + + +"}> + A comma separated list of ChatSettings fields to display. + + + + +**Returns:** `Promise` + +--- + +## `initializeGroup` + +POST `/2/chat/conversations/group/initialize` + +**Initialize Chat Group** + +Initializes a new Chat group conversation and returns a unique conversation ID. Use the returned conversation_id in a subsequent POST /chat/conversations/group call to fully create and configure the group. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.initializeGroup(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `markConversationRead` + +POST `/2/chat/conversations/{id}/read` + +**Mark Conversation as Read** + +Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. Without action_signatures the conversation is marked read up to its newest event and the read receipt is unsigned. With one action signature over a MarkConversationReadEvent, the server sends that signed read receipt, marking the conversation read up to the event it names. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.markConversationRead( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `markConversationUnread` + +POST `/2/chat/conversations/{id}/unread` + +**Mark Conversation as Unread** + +Marks a specific Chat conversation as unread on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.markConversationUnread("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `mediaDownload` + +GET `/2/chat/media/{id}/{media_hash_key}` + +**Download Chat Media** + +Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. A media item too large to return in one response fails with a 413 problem of type `https://api.x.com/2/problems/response-too-large`, and a retry fails the same way. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.mediaDownload("1895000000000000000", "example"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `media_hash_key` (path parameter). + + +**Returns:** `Promise` + +--- + +## `mediaUploadAppend` + +POST `/2/chat/media/upload/{id}/append` + +**Append Chat Media Upload** + +Appends media data to an XChat upload session. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.mediaUploadAppend( + "1895000000000000000", + { media: "example", "segment_index": 1, "conversation_id": "1500000000000000000", "media_hash_key": "example" } +); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `mediaUploadFinalize` + +POST `/2/chat/media/upload/{id}/finalize` + +**Finalize Chat Media Upload** + +Finalizes an XChat media upload session. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.mediaUploadFinalize( + "1895000000000000000", + { "conversation_id": "1500000000000000000", "media_hash_key": "example", "num_parts": "example" } +); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `mediaUploadInitialize` + +POST `/2/chat/media/upload/initialize` + +**Initialize Chat Media Upload** + +Initializes an XChat media upload session. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.mediaUploadInitialize({ "conversation_id": "1500000000000000000", "total_bytes": 1 }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `muteConversation` + +POST `/2/chat/conversations/{id}/mute` + +**Mute a Chat Conversation** + +Mutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.muteConversation( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `rejectGroupAdminRequest` + +POST `/2/chat/conversations/{id}/admin_requests/{user_id}/reject` + +**Reject an Admin Request in a Chat Group Conversation** + +Declines a user's pending request for admin permissions in an encrypted Chat group conversation. Only a group admin can reject. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.rejectGroupAdminRequest( + "1895000000000000000", + "2244994945", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + The ID of the user who requested admin permissions. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `rejectGroupJoinRequests` + +POST `/2/chat/conversations/{id}/join_requests/reject` + +**Reject Join Requests for a Chat Group Conversation** + +Rejects pending requests to join an encrypted Chat group conversation. Only group admins can reject requests. To approve a request instead, add the requesting users with addChatGroupMembers; adding a user clears their pending request. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.rejectGroupJoinRequests("1895000000000000000", { "user_ids": ["2244994945"] }); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `removeGroupAdmins` + +POST `/2/chat/conversations/{id}/admins/remove` + +**Remove Admins from a Chat Group Conversation** + +Revokes admin rights from one or more admins of an existing encrypted Chat group conversation. They stay members of the group. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.removeGroupAdmins("1895000000000000000", { "user_ids": ["2244994945"] }); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `removeGroupMembers` + +POST `/2/chat/conversations/{id}/members/remove` + +**Remove Members from a Chat Group Conversation** + +Removes one or more members from an existing encrypted Chat group conversation. To leave a group, pass your own user ID. Leaving does not delete the conversation for the caller. When the removal rotates the conversation key, send group_key_rotation_data and the action signatures for the removal and the key change, in that order. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.removeGroupMembers("1895000000000000000", { "user_ids": ["2244994945"] }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `sendMessage` + +POST `/2/chat/conversations/{id}/messages` + +**Send Chat Message** + +Sends a message or reaction to a Chat conversation, which you can find with `participant_query` on Get Chat Conversations. Send it end-to-end encrypted by default: `encoded_message_create_event`, built with the Chat XDK. Plaintext `content` is only a fallback for a 1:1 chat that X Chat can't encrypt: use it only when the recipient's `receives_your_chat` user field (`user.fields=receives_your_chat`) is `unencrypted`. When `content` is refused, nothing is sent and the problem's `detail` says why; HTTP 400 https://api.x.com/2/problems/encryption-required means the chat can be encrypted or is a group, so send it encrypted instead. A recipient you can't message (closed inbox, system account, or a block) returns HTTP 403 https://api.x.com/2/problems/recipient-not-messageable. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.sendMessage("1895000000000000000", { "message_id": "1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + A conversation's id from Get Chat Conversations, or the recipient's user ID for a 1:1 chat. + + + + At least one of `encoded_message_create_event`, `content` is required. + + +**Returns:** `Promise` + +--- + +## `sendTypingIndicator` + +POST `/2/chat/conversations/{id}/typing` + +**Send Typing Indicator** + +Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.sendTypingIndicator("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `unarchiveConversation` + +DELETE `/2/chat/conversations/{id}/archive` + +**Unarchive a Chat Conversation** + +Unarchives a Chat conversation for the authenticated user only. Unarchiving a conversation that is not archived changes nothing. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.unarchiveConversation( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `unmuteConversation` + +DELETE `/2/chat/conversations/{id}/mute` + +**Unmute a Chat Conversation** + +Unmutes notifications for a Chat conversation for the authenticated user only. Works for group and 1:1 conversations. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.unmuteConversation( + "1895000000000000000", + { "action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateConversationMessageTtl` + +PUT `/2/chat/conversations/{id}/message_ttl` + +**Turn On Disappearing Messages in a Chat Conversation** + +Sets how long new messages in a 1:1 or group Chat conversation last before they disappear, for every participant. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.updateConversationMessageTtl("1895000000000000000", { "message_ttl_ms": "example" }); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateConversationScreenCapture` + +PUT `/2/chat/conversations/{id}/screen_capture` + +**Update Screen Capture Settings for a Chat Conversation** + +Turns screenshot blocking or screenshot detection on or off in a Chat conversation, for every participant. In a group conversation, only admins can change these settings. Each request changes one setting: send either blocking or detection. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.updateConversationScreenCapture( + "1895000000000000000", + { "blocking_action_signatures": [{ "message_id": "1895000000000000000", "encoded_message_event_detail": "example", "message_event_signature": {} }] } +); +console.log(response); +``` + +### Parameters + + + The ID of the conversation: a group ID starting with `g`, the other user's ID for a 1:1 conversation, or both user IDs of a 1:1 conversation joined by a hyphen. + + + + At least one of `blocking`, `detection` is required. + + +**Returns:** `Promise` + +--- + +## `updateGroup` + +PUT `/2/chat/conversations/{id}` + +**Update a Chat Group Conversation** + +Renames an encrypted Chat group conversation, changes its avatar, or sets its description. The client encrypts each value with the conversation key and lists the values it changed in modified_fields. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.updateGroup( + "1895000000000000000", + { "modified_fields": ["group_name"], "conversation_key_version": "example" } +); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateGroupAdminSettings` + +PUT `/2/chat/conversations/{id}/admin_settings` + +**Update the Admin-Only Settings of a Chat Group Conversation** + +Sets which actions only admins can perform in an existing encrypted Chat group conversation. A setting set to true restricts that action to admins, and false opens it to all members. Setting `send_message` to true makes the group announcement-only. Omitted settings keep their stored value. When sending `action_signatures`, sign over the full merged settings: the stored values with this request's changes applied, not only the settings in the request. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.updateGroupAdminSettings("1895000000000000000", { "block_screen_capture": true }); +console.log(response); +``` + +### Parameters + + + The ID of the group conversation, starting with `g`. + + + + At least one of `add_member`, `edit_group_info`, `send_message`, `start_call`, `edit_message_ttl`, `block_screen_capture` is required. + + +**Returns:** `Promise` + +--- + +## `updateSettings` + +PUT `/2/chat/settings` + +**Update Chat Settings** + +Updates the authenticated user's Chat privacy settings: who can message them, read receipts, the message quality filter, and audio/video call permissions. allow_dms_from, dm_receipt_settings, and dm_quality_filter accept only their listed values, matched exactly and case-sensitively; anything else is a 400. av_settings must set at least one of its settings. Whether settings omitted from a partial av_settings keep their values or are reset is not yet confirmed; send every av_settings field you want to keep. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.chat.updateSettings({ "always_allow_dms_from_subscribers": true }); +console.log(response); +``` + +### Parameters + + + At least one of `allow_dms_from`, `always_allow_dms_from_subscribers`, `dm_quality_filter`, `dm_receipt_settings`, `av_settings` is required. + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/communities.mdx b/xdks/typescript/reference/clients/communities.mdx new file mode 100644 index 000000000..ae4639204 --- /dev/null +++ b/xdks/typescript/reference/clients/communities.mdx @@ -0,0 +1,97 @@ +--- +title: "CommunitiesClient (TypeScript XDK)" +sidebarTitle: "Communities" +description: "TypeScript XDK CommunitiesClient reference — 2 methods for X API v2 Communities endpoints." +--- + +Access **Communities** endpoints via `client.communities` (`CommunitiesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getById`](#getbyid) | `GET /2/communities/{id}` | Standard | Get Community by ID | +| [`search`](#search) | `GET /2/communities/search` | Paginated | Search Communities | + +## `getById` + +GET `/2/communities/{id}` + +**Get Community by ID** + +Retrieves details of a specific Community by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.communities.getById("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of Community fields to display. + + + + +**Returns:** `Promise` + +--- + +## `search` + +GET `/2/communities/search` Paginated + +**Search Communities** + +Retrieves a list of Communities matching the specified search query. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.communities.search("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of Community fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/community-notes.mdx b/xdks/typescript/reference/clients/community-notes.mdx new file mode 100644 index 000000000..756f65b29 --- /dev/null +++ b/xdks/typescript/reference/clients/community-notes.mdx @@ -0,0 +1,211 @@ +--- +title: "CommunityNotesClient (TypeScript XDK)" +sidebarTitle: "Community Notes" +description: "TypeScript XDK CommunityNotesClient reference — 5 methods for X API v2 Community Notes endpoints." +--- + +Access **Community Notes** endpoints via `client.communityNotes` (`CommunityNotesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/notes` | Standard | Create a Community Note | +| [`delete`](#delete) | `DELETE /2/notes/{id}` | Standard | Delete a Community Note | +| [`evaluate`](#evaluate) | `POST /2/notes/evaluate` | Standard | Evaluate a Community Note | +| [`searchEligiblePosts`](#searcheligibleposts) | `GET /2/notes/search/posts_eligible_for_notes` | Paginated | Search for Posts Eligible for Community Notes | +| [`searchWritten`](#searchwritten) | `GET /2/notes/search/notes_written` | Paginated | Search for Community Notes Written | + +## `create` + +POST `/2/notes` + +**Create a Community Note** + +Creates a Community Note on a Post. With test_mode set to true, the note is only for testing and is not publicly visible. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.communityNotes.create( + { "test_mode": true, "post_id": "1895000000000000000", info: { text: "Hello from XDK!", classification: "misinformed_or_potentially_misleading", "misleading_tags": ["disputed_claim_as_fact"], "trustworthy_sources": true } } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `delete` + +DELETE `/2/notes/{id}` + +**Delete a Community Note** + +Deletes a community note. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.communityNotes.delete("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `evaluate` + +POST `/2/notes/evaluate` + +**Evaluate a Community Note** + +Evaluates the text of a proposed Community Note on a Post and returns its claim-opinion score. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.communityNotes.evaluate({ "post_id": "1895000000000000000", "note_text": "example" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `searchEligiblePosts` + +GET `/2/notes/search/posts_eligible_for_notes` Paginated + +**Search for Posts Eligible for Community Notes** + +Retrieves Posts that are eligible for Community Notes. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.communityNotes.searchEligiblePosts(true); +console.log(response); +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + + + `post_selection` (query parameter). + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `searchWritten` + +GET `/2/notes/search/notes_written` Paginated + +**Search for Community Notes Written** + +Retrieves the Community Notes written by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.communityNotes.searchWritten(true); +console.log(response); +``` + +### Parameters + + + `test_mode` (query parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of Note fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/compliance.mdx b/xdks/typescript/reference/clients/compliance.mdx new file mode 100644 index 000000000..b0b338626 --- /dev/null +++ b/xdks/typescript/reference/clients/compliance.mdx @@ -0,0 +1,245 @@ +--- +title: "ComplianceClient (TypeScript XDK)" +sidebarTitle: "Compliance" +description: "TypeScript XDK ComplianceClient reference — 6 methods for X API v2 Compliance endpoints." +--- + +Access **Compliance** endpoints via `client.compliance` (`ComplianceClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createJobs`](#createjobs) | `POST /2/compliance/jobs` | Standard | Create Compliance Job | +| [`deleteJobsById`](#deletejobsbyid) | `DELETE /2/compliance/jobs/{id}` | Standard | Cancel Compliance Job | +| [`downloadJobResults`](#downloadjobresults) | `GET /2/compliance/jobs/{id}/download` | Standard | Download Compliance Job Results | +| [`getJobs`](#getjobs) | `GET /2/compliance/jobs` | Standard | Get Compliance Jobs | +| [`getJobsById`](#getjobsbyid) | `GET /2/compliance/jobs/{id}` | Standard | Get Compliance Job by ID | +| [`uploadJobSubmission`](#uploadjobsubmission) | `PUT /2/compliance/jobs/{id}/upload` | Standard | Upload Compliance Job Submission | + +## `createJobs` + +POST `/2/compliance/jobs` + +**Create Compliance Job** + +Creates a new Compliance Job for the specified job type. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.compliance.createJobs({ type: "tweets" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + + + +"}> + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Promise` + +--- + +## `deleteJobsById` + +DELETE `/2/compliance/jobs/{id}` + +**Cancel Compliance Job** + +Cancels a Compliance Job that has not finished processing; its status becomes failed and a new job of the same type can be created. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.compliance.deleteJobsById("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Promise` + +--- + +## `downloadJobResults` + +GET `/2/compliance/jobs/{id}/download` + +**Download Compliance Job Results** + +Downloads the results file of a completed Compliance Job using the signed URL returned at job creation. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.compliance.downloadJobResults("1895000000000000000", "example"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Signed download token from the job's download_url. + + + + +"}> + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getJobs` + +GET `/2/compliance/jobs` + +**Get Compliance Jobs** + +Retrieves a list of Compliance Jobs filtered by job type and optional status. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.compliance.getJobs("tweets"); +console.log(response); +``` + +### Parameters + + + `type` (query parameter). + + + + + + `status` (query parameter). + + +"}> + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getJobsById` + +GET `/2/compliance/jobs/{id}` + +**Get Compliance Job by ID** + +Retrieves details of a specific Compliance Job by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.compliance.getJobsById("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Promise` + +--- + +## `uploadJobSubmission` + +PUT `/2/compliance/jobs/{id}/upload` + +**Upload Compliance Job Submission** + +Uploads the newline-delimited ID file for a Compliance Job using the signed URL returned at job creation. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.compliance.uploadJobSubmission("1895000000000000000", "example", new Uint8Array()); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Signed upload token from the job's upload_url. + + + + Request payload. + + + + +"}> + A comma separated list of ComplianceJob fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/connections.mdx b/xdks/typescript/reference/clients/connections.mdx new file mode 100644 index 000000000..0adc3edf5 --- /dev/null +++ b/xdks/typescript/reference/clients/connections.mdx @@ -0,0 +1,139 @@ +--- +title: "ConnectionsClient (TypeScript XDK)" +sidebarTitle: "Connections" +description: "TypeScript XDK ConnectionsClient reference — 4 methods for X API v2 Connections endpoints." +--- + +Access **Connections** endpoints via `client.connections` (`ConnectionsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`deleteAll`](#deleteall) | `DELETE /2/connections/all` | Standard | Terminate All Connections | +| [`deleteByEndpoint`](#deletebyendpoint) | `DELETE /2/connections/{endpoint_id}` | Standard | Terminate Connections by Endpoint | +| [`deleteByUuids`](#deletebyuuids) | `DELETE /2/connections` | Standard | Terminate Multiple Connections | +| [`getConnectionHistory`](#getconnectionhistory) | `GET /2/connections` | Paginated | Get Connection History | + +## `deleteAll` + +DELETE `/2/connections/all` + +**Terminate All Connections** + +Terminates all active streaming connections for the authenticated application. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.connections.deleteAll(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `deleteByEndpoint` + +DELETE `/2/connections/{endpoint_id}` + +**Terminate Connections by Endpoint** + +Terminates all streaming connections for a specific endpoint ID for the authenticated application. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.connections.deleteByEndpoint("filtered_stream"); +console.log(response); +``` + +### Parameters + + + `endpoint_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `deleteByUuids` + +DELETE `/2/connections` + +**Terminate Multiple Connections** + +Terminates multiple streaming connections by their UUIDs for the authenticated application. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.connections.deleteByUuids({ uuids: ["example"] }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `getConnectionHistory` + +GET `/2/connections` Paginated + +**Get Connection History** + +Returns active and historical streaming connections with disconnect reasons for the authenticated application. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.connections.getConnectionHistory(); +console.log(response); +``` + +### Parameters + + + + + `status` (query parameter). + + +"}> + `endpoints` (query parameter). + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of Connection fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/direct-messages.mdx b/xdks/typescript/reference/clients/direct-messages.mdx new file mode 100644 index 000000000..e2e7256e2 --- /dev/null +++ b/xdks/typescript/reference/clients/direct-messages.mdx @@ -0,0 +1,415 @@ +--- +title: "DirectMessagesClient (TypeScript XDK)" +sidebarTitle: "Direct Messages" +description: "TypeScript XDK DirectMessagesClient reference — 9 methods for X API v2 Direct Messages endpoints." +--- + +Access **Direct Messages** endpoints via `client.directMessages` (`DirectMessagesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`createByConversationId`](#createbyconversationid) | `POST /2/dm_conversations/{dm_conversation_id}/messages` | Standard | Create DM Message by Conversation ID | +| [`createByParticipantId`](#createbyparticipantid) | `POST /2/dm_conversations/with/{participant_id}/messages` | Standard | Create DM Message by Participant ID | +| [`createConversation`](#createconversation) | `POST /2/dm_conversations` | Standard | Create DM Conversation | +| [`deleteEvents`](#deleteevents) | `DELETE /2/dm_events/{event_id}` | Standard | Delete DM Event | +| [`dmConversationsMediaDownload`](#dmconversationsmediadownload) | `GET /2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` | Standard | Download DM Media | +| [`getEvents`](#getevents) | `GET /2/dm_events` | Paginated | Get DM Events | +| [`getEventsByConversationId`](#geteventsbyconversationid) | `GET /2/dm_conversations/{id}/dm_events` | Paginated | Get DM Events by Conversation ID | +| [`getEventsById`](#geteventsbyid) | `GET /2/dm_events/{event_id}` | Standard | Get DM Event by ID | +| [`getEventsByParticipantId`](#geteventsbyparticipantid) | `GET /2/dm_conversations/with/{participant_id}/dm_events` | Paginated | Get DM Events by Participant ID | + +## `createByConversationId` + +POST `/2/dm_conversations/{dm_conversation_id}/messages` + +**Create DM Message by Conversation ID** + +Sends a new direct message to a specific conversation by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.createByConversationId("1500000000000000000", { text: "Hello from XDK!" }); +console.log(response); +``` + +### Parameters + + + `dm_conversation_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `Promise` + +--- + +## `createByParticipantId` + +POST `/2/dm_conversations/with/{participant_id}/messages` + +**Create DM Message by Participant ID** + +Sends a new direct message to a specific participant by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.createByParticipantId("2244994945", { text: "Hello from XDK!" }); +console.log(response); +``` + +### Parameters + + + `participant_id` (path parameter). + + + + At least one of `text`, `attachments` is required. + + +**Returns:** `Promise` + +--- + +## `createConversation` + +POST `/2/dm_conversations` + +**Create DM Conversation** + +Initiates a new direct message conversation with specified participants. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.createConversation( + { "conversation_type": "Group", "participant_ids": ["2244994945"], message: { text: "Hello from XDK!" } } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteEvents` + +DELETE `/2/dm_events/{event_id}` + +**Delete DM Event** + +Deletes a specific direct message event by its ID, if owned by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.deleteEvents("1600000000000000000"); +console.log(response); +``` + +### Parameters + + + `event_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `dmConversationsMediaDownload` + +GET `/2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}` + +**Download DM Media** + +Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.dmConversationsMediaDownload( + "1895000000000000000", + "3_1895000000000000000", + "1895000000000000000" +); +console.log(response); +``` + +### Parameters + + + `dm_id` (path parameter). + + + + `media_id` (path parameter). + + + + `resource_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `getEvents` + +GET `/2/dm_events` Paginated + +**Get DM Events** + +Retrieves a list of recent direct message events across all conversations. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.getEvents(); +console.log(response); +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + `event_types` (query parameter). + + +"}> + A comma separated list of DmEvent fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of Media fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getEventsByConversationId` + +GET `/2/dm_conversations/{id}/dm_events` Paginated + +**Get DM Events by Conversation ID** + +Retrieves direct message events for a specific conversation by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.getEventsByConversationId("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + `event_types` (query parameter). + + +"}> + A comma separated list of DmEvent fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of Media fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getEventsById` + +GET `/2/dm_events/{event_id}` + +**Get DM Event by ID** + +Retrieves details of a specific direct message event by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.getEventsById("1600000000000000000"); +console.log(response); +``` + +### Parameters + + + `event_id` (path parameter). + + + + +"}> + A comma separated list of DmEvent fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of Media fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getEventsByParticipantId` + +GET `/2/dm_conversations/with/{participant_id}/dm_events` Paginated + +**Get DM Events by Participant ID** + +Retrieves direct message events for the one-to-one conversation between the authenticated user and a specific participant. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.directMessages.getEventsByParticipantId("2244994945"); +console.log(response); +``` + +### Parameters + + + `participant_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + `event_types` (query parameter). + + +"}> + A comma separated list of DmEvent fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of Media fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/general.mdx b/xdks/typescript/reference/clients/general.mdx new file mode 100644 index 000000000..a0f40dc34 --- /dev/null +++ b/xdks/typescript/reference/clients/general.mdx @@ -0,0 +1,35 @@ +--- +title: "GeneralClient (TypeScript XDK)" +sidebarTitle: "General" +description: "TypeScript XDK GeneralClient reference — 1 methods for X API v2 General endpoints." +--- + +Access **General** endpoints via `client.general` (`GeneralClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getOpenApiSpec`](#getopenapispec) | `GET /2/openapi.json` | Standard | Get OpenAPI Spec | + +## `getOpenApiSpec` + +GET `/2/openapi.json` + +**Get OpenAPI Spec** + +Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md) + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.general.getOpenApiSpec(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/lists.mdx b/xdks/typescript/reference/clients/lists.mdx new file mode 100644 index 000000000..1ce556440 --- /dev/null +++ b/xdks/typescript/reference/clients/lists.mdx @@ -0,0 +1,377 @@ +--- +title: "ListsClient (TypeScript XDK)" +sidebarTitle: "Lists" +description: "TypeScript XDK ListsClient reference — 9 methods for X API v2 Lists endpoints." +--- + +Access **Lists** endpoints via `client.lists` (`ListsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`addMember`](#addmember) | `POST /2/lists/{id}/members` | Standard | Add List Member | +| [`create`](#create) | `POST /2/lists` | Standard | Create List | +| [`delete`](#delete) | `DELETE /2/lists/{id}` | Standard | Delete List | +| [`getById`](#getbyid) | `GET /2/lists/{id}` | Standard | Get List by ID | +| [`getFollowers`](#getfollowers) | `GET /2/lists/{id}/followers` | Paginated | Get List Followers | +| [`getMembers`](#getmembers) | `GET /2/lists/{id}/members` | Paginated | Get List Members | +| [`getPosts`](#getposts) | `GET /2/lists/{id}/tweets` | Paginated | Get List Posts | +| [`removeMemberByUserId`](#removememberbyuserid) | `DELETE /2/lists/{id}/members/{user_id}` | Standard | Remove List Member | +| [`update`](#update) | `PUT /2/lists/{id}` | Standard | Update List | + +## `addMember` + +POST `/2/lists/{id}/members` + +**Add List Member** + +Adds a User to a specific List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.lists.addMember("1450000000000000000", { "user_id": "2244994945" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `create` + +POST `/2/lists` + +**Create List** + +Creates a new List for the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.lists.create({ name: "My List" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `delete` + +DELETE `/2/lists/{id}` + +**Delete List** + +Deletes a specific List owned by the authenticated user by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.lists.delete("1450000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `getById` + +GET `/2/lists/{id}` + +**Get List by ID** + +Retrieves details of a specific List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.lists.getById("1450000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of List fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getFollowers` + +GET `/2/lists/{id}/followers` Paginated + +**Get List Followers** + +Retrieves a list of Users who follow a specific List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.lists.getFollowers("1450000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMembers` + +GET `/2/lists/{id}/members` Paginated + +**Get List Members** + +Retrieves a list of Users who are members of a specific List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.lists.getMembers("1450000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPosts` + +GET `/2/lists/{id}/tweets` Paginated + +**Get List Posts** + +Retrieves a list of Posts associated with a specific List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.lists.getPosts("1450000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `removeMemberByUserId` + +DELETE `/2/lists/{id}/members/{user_id}` + +**Remove List Member** + +Removes a User from a List by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.lists.removeMemberByUserId("1450000000000000000", "2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `user_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `update` + +PUT `/2/lists/{id}` + +**Update List** + +Updates the details of a specific List owned by the authenticated user by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.lists.update("1450000000000000000", { name: "My List" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/media.mdx b/xdks/typescript/reference/clients/media.mdx new file mode 100644 index 000000000..18607895f --- /dev/null +++ b/xdks/typescript/reference/clients/media.mdx @@ -0,0 +1,611 @@ +--- +title: "MediaClient (TypeScript XDK)" +sidebarTitle: "Media" +description: "TypeScript XDK MediaClient reference — 19 methods for X API v2 Media endpoints." +--- + +Access **Media** endpoints via `client.media` (`MediaClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`addPostToAmplifyPrograms`](#addposttoamplifyprograms) | `POST /2/media/amplify/posts` | Standard | Add Post to Amplify Programs | +| [`addToLibrary`](#addtolibrary) | `POST /2/media/library` | Standard | Add Media to Library | +| [`appendUpload`](#appendupload) | `POST /2/media/upload/{id}/append` | Standard | Append Media Upload | +| [`createMetadata`](#createmetadata) | `POST /2/media/metadata` | Standard | Create Media Metadata | +| [`createSubtitles`](#createsubtitles) | `POST /2/media/subtitles` | Standard | Create Media Subtitles | +| [`deleteSubtitles`](#deletesubtitles) | `DELETE /2/media/subtitles` | Standard | Delete Media Subtitles | +| [`finalizeUpload`](#finalizeupload) | `POST /2/media/upload/{id}/finalize` | Standard | Finalize Media Upload | +| [`getAmplifyProgram`](#getamplifyprogram) | `GET /2/media/amplify/programs/{program_id}` | Standard | Get Amplify Program | +| [`getAmplifyProgramPosts`](#getamplifyprogramposts) | `GET /2/media/amplify/programs/{program_id}/posts` | Standard | Get Amplify Program Posts | +| [`getAmplifyPrograms`](#getamplifyprograms) | `GET /2/media/amplify/programs` | Standard | Get Amplify Programs | +| [`getAnalytics`](#getanalytics) | `GET /2/media/analytics` | Standard | Get Media Analytics | +| [`getByKey`](#getbykey) | `GET /2/media/{media_key}` | Standard | Get Media by Media Key | +| [`getByKeys`](#getbykeys) | `GET /2/media` | Standard | Get Media by Media Keys | +| [`getLibraryCategories`](#getlibrarycategories) | `GET /2/media/library/categories` | Standard | Get Media Library Categories | +| [`getUploadStatus`](#getuploadstatus) | `GET /2/media/upload` | Standard | Get Media Upload Status | +| [`initializeUpload`](#initializeupload) | `POST /2/media/upload/initialize` | Standard | Initialize Media Upload | +| [`removeFromLibrary`](#removefromlibrary) | `DELETE /2/media/library/{media_key}` | Standard | Remove Media Library Item | +| [`updateInLibrary`](#updateinlibrary) | `PUT /2/media/library/{media_key}` | Standard | Update Media Library Item | +| [`upload`](#upload) | `POST /2/media/upload` | Standard | Upload Media | + +## `addPostToAmplifyPrograms` + +POST `/2/media/amplify/posts` + +**Add Post to Amplify Programs** + +Publishes one of the authenticated user's video posts into one or more active Amplify pre-roll programs the user is enrolled in as a publisher. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.addPostToAmplifyPrograms( + { "post_id": "1895000000000000000", "program_ids": ["1895000000000000000"] } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `addToLibrary` + +POST `/2/media/library` + +**Add Media to Library** + +Adds previously uploaded media to the authenticated user's Media Library with its library metadata. The user must own the media. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.addToLibrary({ "media_key": "3_1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `appendUpload` + +POST `/2/media/upload/{id}/append` + +**Append Media Upload** + +Appends one segment of the file to a chunked upload. Send the segment base64-encoded in media (raw bytes in multipart bodies) and its position in the file in segment_index, counting from 0. A segment can be up to 8 MB; in a JSON body keep it to 4 MB or less, because base64 adds a third. After the last segment, call Finalize Media Upload. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.appendUpload("1895000000000000000", { media: "example", "segment_index": 1 }); +console.log(response); +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createMetadata` + +POST `/2/media/metadata` + +**Create Media Metadata** + +Creates metadata for a Media file. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.createMetadata( + { id: "1895000000000000000", metadata: { "shared_info": { shared: "example" } } } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createSubtitles` + +POST `/2/media/subtitles` + +**Create Media Subtitles** + +Creates subtitles for a specific Media file. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.createSubtitles( + { id: "1895000000000000000", "media_category": "AmplifyVideo", subtitles: { "language_code": "example" } } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteSubtitles` + +DELETE `/2/media/subtitles` + +**Delete Media Subtitles** + +Deletes subtitles for a specific Media file. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.deleteSubtitles( + { id: "1895000000000000000", "media_category": "example", "language_code": "example" } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `finalizeUpload` + +POST `/2/media/upload/{id}/finalize` + +**Finalize Media Upload** + +Completes a chunked upload once every segment is appended. For video the result carries processing_info: the media can go on a Post only when its state is succeeded, so call Get Media Upload Status until it is. A result without processing_info is ready to use. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.finalizeUpload("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The upload id from Initialize Media Upload. + + +**Returns:** `Promise` + +--- + +## `getAmplifyProgram` + +GET `/2/media/amplify/programs/{program_id}` + +**Get Amplify Program** + +Returns one Amplify pre-roll program the authenticated user is enrolled in as a publisher. A program the user is not enrolled in is reported as not found. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.getAmplifyProgram("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `Promise` + +--- + +## `getAmplifyProgramPosts` + +GET `/2/media/amplify/programs/{program_id}/posts` + +**Get Amplify Program Posts** + +Returns the posts published into an Amplify pre-roll program the authenticated user is enrolled in as a publisher. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.getAmplifyProgramPosts("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + Identifier of the program. + + +**Returns:** `Promise` + +--- + +## `getAmplifyPrograms` + +GET `/2/media/amplify/programs` + +**Get Amplify Programs** + +Returns the Amplify pre-roll programs the authenticated user is enrolled in as a publisher. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.getAmplifyPrograms(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `getAnalytics` + +GET `/2/media/analytics` + +**Get Media Analytics** + +Retrieves analytics data for media. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.getAnalytics( + ["3_1895000000000000000"], + "2026-01-01T00:00:00Z", + "2026-01-02T00:00:00Z" +); +console.log(response); +``` + +### Parameters + + + `media_keys` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + +"}> + A comma separated list of MediaAnalytics fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByKey` + +GET `/2/media/{media_key}` + +**Get Media by Media Key** + +Retrieves details of a specific Media file by its media key. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.media.getByKey("3_1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `media_key` (path parameter). + + + + +"}> + A comma separated list of Media fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByKeys` + +GET `/2/media` + +**Get Media by Media Keys** + +Retrieves details of Media files by their media keys. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.media.getByKeys(["3_1895000000000000000"]); +console.log(response); +``` + +### Parameters + + + `media_keys` (query parameter). + + + + +"}> + A comma separated list of Media fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getLibraryCategories` + +GET `/2/media/library/categories` + +**Get Media Library Categories** + +Returns the video categories a publisher can assign to a media library item and the advertiser categories whose ads can be blocked from running against it. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.getLibraryCategories(); +console.log(response); +``` + +### Parameters + + + + + Language tag for category descriptions, e.g. `en` or `pt-BR`. + + + + +**Returns:** `Promise` + +--- + +## `getUploadStatus` + +GET `/2/media/upload` + +**Get Media Upload Status** + +Returns how far X has processed an uploaded media file, in processing_info.state: pending, in_progress, succeeded or failed. Call it after Finalize Media Upload returns processing_info, waiting check_after_secs between calls, until the state is succeeded. A failed state means the media can't be used. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.getUploadStatus("3_1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The media id from Initialize Media Upload. + + + + + + Always STATUS; can be left out. + + + + +**Returns:** `Promise` + +--- + +## `initializeUpload` + +POST `/2/media/upload/initialize` + +**Initialize Media Upload** + +Starts a chunked media upload and returns its id. Use it for video and for other files too large for one request. For a video on a Post, set media_category to tweet_video, media_type to the file's type (for example video/mp4) and total_bytes to the file's size. Send the file with Append Media Upload, call Finalize Media Upload, then pass the id in media.media_ids on Create or Edit Post. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.initializeUpload({ "media_category": "amplify_video" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `removeFromLibrary` + +DELETE `/2/media/library/{media_key}` + +**Remove Media Library Item** + +Removes an item from the authenticated user's Media Library. Posts scheduled through the API that have not yet been published and still use the media are cancelled. Published posts and the underlying media are not affected. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.removeFromLibrary("3_1895000000000000000", {}); +console.log(response); +``` + +### Parameters + + + The media key of the library item to remove. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `updateInLibrary` + +PUT `/2/media/library/{media_key}` + +**Update Media Library Item** + +Updates the library metadata of an item in the authenticated user's Media Library. Only the fields sent are changed; the others keep their values. Geo restrictions, content expiry, the preview image and the audience policy are set with the Media metadata endpoint. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.updateInLibrary("3_1895000000000000000", { name: "My List" }); +console.log(response); +``` + +### Parameters + + + The media key of the library item to update. + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `upload` + +POST `/2/media/upload` + +**Upload Media** + +Uploads a media file in one request and returns its id. Send the file base64-encoded in media (raw bytes in multipart bodies). For a Post, set media_category to tweet_image (JPG, PNG, GIF or WEBP, up to 5 MB) or tweet_gif, then pass the returned id in media.media_ids on Create or Edit Post. DM media uses dm_image or dm_gif. For video, use Initialize Media Upload. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.media.upload({ media: "example", "media_category": "tweet_image" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/news.mdx b/xdks/typescript/reference/clients/news.mdx new file mode 100644 index 000000000..5fb4fd331 --- /dev/null +++ b/xdks/typescript/reference/clients/news.mdx @@ -0,0 +1,93 @@ +--- +title: "NewsClient (TypeScript XDK)" +sidebarTitle: "News" +description: "TypeScript XDK NewsClient reference — 2 methods for X API v2 News endpoints." +--- + +Access **News** endpoints via `client.news` (`NewsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get`](#get) | `GET /2/news/{id}` | Standard | Get News Stories by ID | +| [`search`](#search) | `GET /2/news/search` | Standard | Search News | + +## `get` + +GET `/2/news/{id}` + +**Get News Stories by ID** + +Retrieves news story by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.news.get("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of News fields to display. + + + + +**Returns:** `Promise` + +--- + +## `search` + +GET `/2/news/search` + +**Search News** + +Retrieves a list of News stories matching the specified search query. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.news.search("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + `max_age_hours` (query parameter). + + +"}> + A comma separated list of News fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/posts.mdx b/xdks/typescript/reference/clients/posts.mdx new file mode 100644 index 000000000..c7f52e702 --- /dev/null +++ b/xdks/typescript/reference/clients/posts.mdx @@ -0,0 +1,905 @@ +--- +title: "PostsClient (TypeScript XDK)" +sidebarTitle: "Posts" +description: "TypeScript XDK PostsClient reference — 17 methods for X API v2 Posts endpoints." +--- + +Access **Posts** endpoints via `client.posts` (`PostsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/tweets` | Standard | Create or Edit Post | +| [`createPostDraft`](#createpostdraft) | `POST /2/posts/drafts` | Standard | Create Post Draft | +| [`delete`](#delete) | `DELETE /2/tweets/{id}` | Standard | Delete Post | +| [`deletePostDraft`](#deletepostdraft) | `DELETE /2/posts/drafts/{id}` | Standard | Delete Post Draft | +| [`getAnalytics`](#getanalytics) | `GET /2/tweets/analytics` | Standard | Get Post Analytics | +| [`getById`](#getbyid) | `GET /2/tweets/{id}` | Standard | Get Post by ID | +| [`getByIds`](#getbyids) | `GET /2/tweets` | Standard | Get Posts by IDs | +| [`getCountsAll`](#getcountsall) | `GET /2/tweets/counts/all` | Paginated | Get Count of All Posts | +| [`getCountsRecent`](#getcountsrecent) | `GET /2/tweets/counts/recent` | Paginated | Get Count of Recent Posts | +| [`getLikingUsers`](#getlikingusers) | `GET /2/tweets/{id}/liking_users` | Paginated | Get Liking Users | +| [`getPostDrafts`](#getpostdrafts) | `GET /2/posts/drafts` | Paginated | Get Post Drafts | +| [`getQuoted`](#getquoted) | `GET /2/tweets/{id}/quote_tweets` | Paginated | Get Quoted Posts | +| [`getRepostedBy`](#getrepostedby) | `GET /2/tweets/{id}/retweeted_by` | Paginated | Get Reposted By | +| [`getReposts`](#getreposts) | `GET /2/tweets/{id}/retweets` | Paginated | Get Reposts | +| [`hideReply`](#hidereply) | `PUT /2/tweets/{tweet_id}/hidden` | Standard | Hide Reply | +| [`searchAll`](#searchall) | `GET /2/tweets/search/all` | Paginated | Search All Posts | +| [`searchRecent`](#searchrecent) | `GET /2/tweets/search/recent` | Paginated | Search Recent Posts | + +## `create` + +POST `/2/tweets` + +**Create or Edit Post** + +Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Media in media.media_ids is attached in the order given; get the ids by uploading each image with Upload Media, or a video with Initialize Media Upload. Supports paid partnership disclosure via the paid_partnership field. To share a clip of another Post's video, set clip to that Post's id and a range of 5 to 60 seconds. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.create({ text: "Hello from XDK!" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createPostDraft` + +POST `/2/posts/drafts` + +**Create Post Draft** + +Saves a Post draft to the authenticated user's X account without publishing it. Takes the body of Create or Edit Post, of which a draft stores text, media with tagged users, a reply and the AI and paid partnership disclosures. Any other field that is set is a 400 that names it. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.createPostDraft({ text: "Hello from XDK!" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `delete` + +DELETE `/2/tweets/{id}` + +**Delete Post** + +Deletes a specific Post by its ID, if owned by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.delete("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `deletePostDraft` + +DELETE `/2/posts/drafts/{id}` + +**Delete Post Draft** + +Deletes one of the authenticated user's Post drafts by its ID. The whole draft is deleted, including any part Get Post Drafts does not list, and cannot be restored. An ID that is not one of the user's drafts also returns deleted: true. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.deletePostDraft("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The ID of the draft to delete. + + +**Returns:** `Promise` + +--- + +## `getAnalytics` + +GET `/2/tweets/analytics` + +**Get Post Analytics** + +Retrieves analytics data for specified Posts within a defined time range. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.getAnalytics( + ["1895000000000000000"], + "2026-01-01T00:00:00Z", + "2026-01-02T00:00:00Z" +); +console.log(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + + + `granularity` (query parameter). + + +"}> + A comma separated list of Analytics fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getById` + +GET `/2/tweets/{id}` + +**Get Post by ID** + +Retrieves details of a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.getById("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByIds` + +GET `/2/tweets` + +**Get Posts by IDs** + +Retrieves details of multiple Posts by their IDs. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.getByIds(["1895000000000000000"]); +console.log(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getCountsAll` + +GET `/2/tweets/counts/all` Paginated + +**Get Count of All Posts** + +Retrieves the count of Posts matching a search query from the full archive. + +At most one of `pagination_token`, `next_token` may be provided. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.getCountsAll("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Promise` + +--- + +## `getCountsRecent` + +GET `/2/tweets/counts/recent` Paginated + +**Get Count of Recent Posts** + +Retrieves the count of Posts from the last 7 days matching a search query. + +At most one of `pagination_token`, `next_token` may be provided. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.getCountsRecent("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `granularity` (query parameter). + + + + `search_count.fields` (query parameter). + + + + +**Returns:** `Promise` + +--- + +## `getLikingUsers` + +GET `/2/tweets/{id}/liking_users` Paginated + +**Get Liking Users** + +Retrieves a list of Users who liked a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.getLikingUsers("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPostDrafts` + +GET `/2/posts/drafts` Paginated + +**Get Post Drafts** + +Returns the authenticated user's Post drafts, newest first, in the fields of the Create or Edit Post body. thread holds the Posts after the first. A draft with unsupported_content is not listed in full: do not publish it from this list or delete it unless the user asks. Needs the tweet.write scope. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.getPostDrafts(); +console.log(response); +``` + +### Parameters + + + + + The maximum number of drafts to return. + + + + The meta.next_token of the previous page. + + + + +**Returns:** `Promise` + +--- + +## `getQuoted` + +GET `/2/tweets/{id}/quote_tweets` Paginated + +**Get Quoted Posts** + +Retrieves a list of Posts that quote a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.getQuoted("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + `exclude` (query parameter). + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getRepostedBy` + +GET `/2/tweets/{id}/retweeted_by` Paginated + +**Get Reposted By** + +Retrieves a list of Users who reposted a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.getRepostedBy("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getReposts` + +GET `/2/tweets/{id}/retweets` Paginated + +**Get Reposts** + +Retrieves a list of Posts that repost a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.getReposts("1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `hideReply` + +PUT `/2/tweets/{tweet_id}/hidden` + +**Hide Reply** + +Hides or unhides a reply to a conversation owned by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.posts.hideReply("1895000000000000000", { hidden: true }); +console.log(response); +``` + +### Parameters + + + `tweet_id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `searchAll` + +GET `/2/tweets/search/all` Paginated + +**Search All Posts** + +Retrieves Posts from the full archive matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.searchAll("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `start_time` (query parameter). + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + `sort_order` (query parameter). + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `searchRecent` + +GET `/2/tweets/search/recent` Paginated + +**Search Recent Posts** + +Retrieves Posts from the last 7 days matching a search query. + +At most one of `start_time`, `since_id` may be provided. At most one of `end_time`, `until_id` may be provided. At most one of `pagination_token`, `next_token` may be provided. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.posts.searchRecent("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + A base32hex-encoded pagination token. + + + + Must be within the last 7 days. + + + + `end_time` (query parameter). + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + + + `sort_order` (query parameter). + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/spaces.mdx b/xdks/typescript/reference/clients/spaces.mdx new file mode 100644 index 000000000..e5db57ce3 --- /dev/null +++ b/xdks/typescript/reference/clients/spaces.mdx @@ -0,0 +1,329 @@ +--- +title: "SpacesClient (TypeScript XDK)" +sidebarTitle: "Spaces" +description: "TypeScript XDK SpacesClient reference — 6 methods for X API v2 Spaces endpoints." +--- + +Access **Spaces** endpoints via `client.spaces` (`SpacesClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getBuyers`](#getbuyers) | `GET /2/spaces/{id}/buyers` | Paginated | Get Space Ticket Buyers | +| [`getByCreatorIds`](#getbycreatorids) | `GET /2/spaces/by/creator_ids` | Standard | Get Spaces by Creator IDs | +| [`getById`](#getbyid) | `GET /2/spaces/{id}` | Standard | Get Space by ID | +| [`getByIds`](#getbyids) | `GET /2/spaces` | Standard | Get Spaces by IDs | +| [`getPosts`](#getposts) | `GET /2/spaces/{id}/tweets` | Paginated | Get Space Posts | +| [`search`](#search) | `GET /2/spaces/search` | Standard | Search Spaces | + +## `getBuyers` + +GET `/2/spaces/{id}/buyers` Paginated + +**Get Space Ticket Buyers** + +Retrieves a list of Users who purchased tickets to a specific Space by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.spaces.getBuyers("1YqKDqWLPPlGV"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByCreatorIds` + +GET `/2/spaces/by/creator_ids` + +**Get Spaces by Creator IDs** + +Retrieves details of Spaces created by specified User IDs. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.spaces.getByCreatorIds(["2244994945"]); +console.log(response); +``` + +### Parameters + + + `user_ids` (query parameter). + + + + +"}> + A comma separated list of Space fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Topic fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getById` + +GET `/2/spaces/{id}` + +**Get Space by ID** + +Retrieves details of a specific Space by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.spaces.getById("1YqKDqWLPPlGV"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of Space fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Topic fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByIds` + +GET `/2/spaces` + +**Get Spaces by IDs** + +Retrieves details of multiple Spaces by their IDs. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.spaces.getByIds(["1YqKDqWLPPlGV"]); +console.log(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + +"}> + A comma separated list of Space fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Topic fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPosts` + +GET `/2/spaces/{id}/tweets` Paginated + +**Get Space Posts** + +Retrieves a list of Posts shared in a specific Space by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.spaces.getPosts("1YqKDqWLPPlGV"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `search` + +GET `/2/spaces/search` + +**Search Spaces** + +Retrieves a list of Spaces matching the specified search query. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.spaces.search("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + `query` (query parameter). + + + + + + `state` (query parameter). + + + + `max_results` (query parameter). + + +"}> + A comma separated list of Space fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Topic fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/stream.mdx b/xdks/typescript/reference/clients/stream.mdx new file mode 100644 index 000000000..9f6dee0b0 --- /dev/null +++ b/xdks/typescript/reference/clients/stream.mdx @@ -0,0 +1,1019 @@ +--- +title: "StreamClient (TypeScript XDK)" +sidebarTitle: "Stream" +description: "TypeScript XDK StreamClient reference — 18 methods for X API v2 Stream endpoints." +--- + +Access **Stream** endpoints via `client.stream` (`StreamClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`activity`](#activity) | `GET /2/activity/stream` | Streaming | Activity Stream | +| [`getRuleCounts`](#getrulecounts) | `GET /2/tweets/search/stream/rules/counts` | Standard | Get Stream Rule Counts | +| [`getRules`](#getrules) | `GET /2/tweets/search/stream/rules` | Paginated | Get Stream Rules | +| [`labelsCompliance`](#labelscompliance) | `GET /2/tweets/label/stream` | Streaming | Stream Post Labels | +| [`likesCompliance`](#likescompliance) | `GET /2/likes/compliance/stream` | Streaming | Stream Likes Compliance Data | +| [`likesFirehose`](#likesfirehose) | `GET /2/likes/firehose/stream` | Streaming | Stream All Likes | +| [`likesSample10`](#likessample10) | `GET /2/likes/sample10/stream` | Streaming | Stream Sampled Likes | +| [`posts`](#posts) | `GET /2/tweets/search/stream` | Streaming | Stream Filtered Posts | +| [`postsCompliance`](#postscompliance) | `GET /2/tweets/compliance/stream` | Streaming | Stream Posts Compliance Data | +| [`postsFirehose`](#postsfirehose) | `GET /2/tweets/firehose/stream` | Streaming | Stream All Posts | +| [`postsFirehoseEn`](#postsfirehoseen) | `GET /2/tweets/firehose/stream/lang/en` | Streaming | Stream English Posts | +| [`postsFirehoseJa`](#postsfirehoseja) | `GET /2/tweets/firehose/stream/lang/ja` | Streaming | Stream Japanese Posts | +| [`postsFirehoseKo`](#postsfirehoseko) | `GET /2/tweets/firehose/stream/lang/ko` | Streaming | Stream Korean Posts | +| [`postsFirehosePt`](#postsfirehosept) | `GET /2/tweets/firehose/stream/lang/pt` | Streaming | Stream Portuguese Posts | +| [`postsSample`](#postssample) | `GET /2/tweets/sample/stream` | Streaming | Stream Sampled Posts | +| [`postsSample10`](#postssample10) | `GET /2/tweets/sample10/stream` | Streaming | Stream 10% Sampled Posts | +| [`updateRules`](#updaterules) | `POST /2/tweets/search/stream/rules` | Standard | Update Stream Rules | +| [`usersCompliance`](#userscompliance) | `GET /2/users/compliance/stream` | Streaming | Stream Users Compliance Data | + +## `activity` + +GET `/2/activity/stream` Streaming + +**Activity Stream** + +Stream of X Activities + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.activity(); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the activities will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the activities will be provided. + + + + +**Returns:** `Promise` + +--- + +## `getRuleCounts` + +GET `/2/tweets/search/stream/rules/counts` + +**Get Stream Rule Counts** + +Retrieves the count of rules in the active rule set for the filtered stream. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.stream.getRuleCounts(); +console.log(response); +``` + +### Parameters + + + + + `rules_count.fields` (query parameter). + + + + +**Returns:** `Promise` + +--- + +## `getRules` + +GET `/2/tweets/search/stream/rules` Paginated + +**Get Stream Rules** + +Returns the active filtered-stream rules for the authenticated app. Provide `ids` to fetch specific rules; omit it to list all rules. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.stream.getRules(); +console.log(response); +``` + +### Parameters + + + + + `ids` (query parameter). + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token that decodes to 8 bytes. + + + + +**Returns:** `Promise` + +--- + +## `labelsCompliance` + +GET `/2/tweets/label/stream` Streaming + +**Stream Post Labels** + +Streams all labeling events applied to Posts. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.labelsCompliance(); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. + + + + +**Returns:** `Promise` + +--- + +## `likesCompliance` + +GET `/2/likes/compliance/stream` Streaming + +**Stream Likes Compliance Data** + +Streams all compliance data related to Likes for Users. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.likesCompliance(); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided. + + + + +**Returns:** `Promise` + +--- + +## `likesFirehose` + +GET `/2/likes/firehose/stream` Streaming + +**Stream All Likes** + +Streams all public Likes in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.likesFirehose(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + +"}> + A comma separated list of LikeWithTweetAuthor fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Tweet fields to display. + + + + +**Returns:** `Promise` + +--- + +## `likesSample10` + +GET `/2/likes/sample10/stream` Streaming + +**Stream Sampled Likes** + +Streams a 10% sample of public Likes in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.likesSample10(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + +"}> + A comma separated list of LikeWithTweetAuthor fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Tweet fields to display. + + + + +**Returns:** `Promise` + +--- + +## `posts` + +GET `/2/tweets/search/stream` Streaming + +**Stream Filtered Posts** + +Streams Posts in real-time matching the active rule set. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.posts(); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `postsCompliance` + +GET `/2/tweets/compliance/stream` Streaming + +**Stream Posts Compliance Data** + +Streams all compliance data related to Posts. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsCompliance(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post Compliance events will be provided. + + + + +**Returns:** `Promise` + +--- + +## `postsFirehose` + +GET `/2/tweets/firehose/stream` Streaming + +**Stream All Posts** + +Streams all public Posts in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsFirehose(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Promise` + +--- + +## `postsFirehoseEn` + +GET `/2/tweets/firehose/stream/lang/en` Streaming + +**Stream English Posts** + +Streams all public English-language Posts in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsFirehoseEn(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Promise` + +--- + +## `postsFirehoseJa` + +GET `/2/tweets/firehose/stream/lang/ja` Streaming + +**Stream Japanese Posts** + +Streams all public Japanese-language Posts in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsFirehoseJa(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Promise` + +--- + +## `postsFirehoseKo` + +GET `/2/tweets/firehose/stream/lang/ko` Streaming + +**Stream Korean Posts** + +Streams all public Korean-language Posts in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsFirehoseKo(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Promise` + +--- + +## `postsFirehosePt` + +GET `/2/tweets/firehose/stream/lang/pt` Streaming + +**Stream Portuguese Posts** + +Streams all public Portuguese-language Posts in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsFirehosePt(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Promise` + +--- + +## `postsSample` + +GET `/2/tweets/sample/stream` Streaming + +**Stream Sampled Posts** + +Streams a 1% sample of public Posts in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsSample(); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + + + The number of minutes of backfill requested. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `postsSample10` + +GET `/2/tweets/sample10/stream` Streaming + +**Stream 10% Sampled Posts** + +Streams a 10% sample of public Posts in real-time. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.postsSample10(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + +"}> + A comma separated list of Tweet fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. + + + + +**Returns:** `Promise` + +--- + +## `updateRules` + +POST `/2/tweets/search/stream/rules` + +**Update Stream Rules** + +Adds or deletes rules from the active rule set for the filtered stream. Exactly one of `add`, `delete`, or `?delete_all=true` must be specified. Use `?dry_run=true` to validate without committing. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.stream.updateRules({ add: [{ value: "from:XDevelopers" }] }); +console.log(response); +``` + +### Parameters + + + Request payload. + + + + + + `dry_run` (query parameter). + + + + `delete_all` (query parameter). + + + + +**Returns:** `Promise` + +--- + +## `usersCompliance` + +GET `/2/users/compliance/stream` Streaming + +**Stream Users Compliance Data** + +Streams all compliance data related to Users. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const stream = await client.stream.usersCompliance(1); +for await (const event of stream) { + console.log(event); +} +``` + +### Parameters + + + The partition number. + + + + + + The number of minutes of backfill requested. + + + + YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided. + + + + YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/trends.mdx b/xdks/typescript/reference/clients/trends.mdx new file mode 100644 index 000000000..7191f3b3c --- /dev/null +++ b/xdks/typescript/reference/clients/trends.mdx @@ -0,0 +1,117 @@ +--- +title: "TrendsClient (TypeScript XDK)" +sidebarTitle: "Trends" +description: "TypeScript XDK TrendsClient reference — 3 methods for X API v2 Trends endpoints." +--- + +Access **Trends** endpoints via `client.trends` (`TrendsClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`getByWoeid`](#getbywoeid) | `GET /2/trends/by/woeid/{woeid}` | Standard | Get Trends by WOEID | +| [`getLocations`](#getlocations) | `GET /2/trends/locations` | Standard | Get Trend Locations | +| [`getPersonalized`](#getpersonalized) | `GET /2/users/personalized_trends` | Standard | Get Personalized Trends | + +## `getByWoeid` + +GET `/2/trends/by/woeid/{woeid}` + +**Get Trends by WOEID** + +Retrieves trending topics for a specific location identified by its WOEID. `meta.location` describes that location: its `woeid` and `name`, and when they are known its `country`, `country_code`, `place_type` (`town`, `country` or `supername`) and `parent_id`, the WOEID of the place that contains it. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.trends.getByWoeid(1); +console.log(response); +``` + +### Parameters + + + `woeid` (path parameter). + + + + + + `max_trends` (query parameter). + + +"}> + A comma separated list of Trend fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getLocations` + +GET `/2/trends/locations` + +**Get Trend Locations** + +Retrieves every location that has trends. Each location has a WOEID to pass to `GET /2/trends/by/woeid/{woeid}`. The list is short and is returned whole, so the route takes no paging parameters. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.trends.getLocations(); +console.log(response); +``` + +### Parameters + + + +"}> + A comma separated list of TrendLocation fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPersonalized` + +GET `/2/users/personalized_trends` + +**Get Personalized Trends** + +Retrieves personalized trending topics for the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.trends.getPersonalized(); +console.log(response); +``` + +### Parameters + + + +"}> + A comma separated list of PersonalizedTrend fields to display. + + + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/usage.mdx b/xdks/typescript/reference/clients/usage.mdx new file mode 100644 index 000000000..b6972494a --- /dev/null +++ b/xdks/typescript/reference/clients/usage.mdx @@ -0,0 +1,71 @@ +--- +title: "UsageClient (TypeScript XDK)" +sidebarTitle: "Usage" +description: "TypeScript XDK UsageClient reference — 2 methods for X API v2 Usage endpoints." +--- + +Access **Usage** endpoints via `client.usage` (`UsageClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`get`](#get) | `GET /2/usage/tweets` | Standard | Get Usage | +| [`getCredits`](#getcredits) | `GET /2/usage/credits` | Standard | Get Usage Credits | + +## `get` + +GET `/2/usage/tweets` + +**Get Usage** + +Retrieves usage statistics for Posts over a specified number of days. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.usage.get(); +console.log(response); +``` + +### Parameters + + + + + `days` (query parameter). + + +"}> + A comma separated list of Usage fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getCredits` + +GET `/2/usage/credits` + +**Get Usage Credits** + +Returns the payer's developer-platform credit balance in USD. total_balance is max(0, prepaid_balance + free_balance); prepaid_balance may be negative. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.usage.getCredits(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/users.mdx b/xdks/typescript/reference/clients/users.mdx new file mode 100644 index 000000000..07990f381 --- /dev/null +++ b/xdks/typescript/reference/clients/users.mdx @@ -0,0 +1,2039 @@ +--- +title: "UsersClient (TypeScript XDK)" +sidebarTitle: "Users" +description: "TypeScript XDK UsersClient reference — 46 methods for X API v2 Users endpoints." +--- + +Access **Users** endpoints via `client.users` (`UsersClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`blockDms`](#blockdms) | `POST /2/users/{id}/dm/block` | Standard | Block DMs | +| [`createBookmark`](#createbookmark) | `POST /2/users/{id}/bookmarks` | Standard | Create Bookmark | +| [`createBookmarkFolder`](#createbookmarkfolder) | `POST /2/users/{id}/bookmarks/folders` | Standard | Create Bookmark Folder | +| [`deleteBookmark`](#deletebookmark) | `DELETE /2/users/{id}/bookmarks/{tweet_id}` | Standard | Delete Bookmark | +| [`followList`](#followlist) | `POST /2/users/{id}/followed_lists` | Standard | Follow List | +| [`followUser`](#followuser) | `POST /2/users/{id}/following` | Standard | Follow User | +| [`getAffiliates`](#getaffiliates) | `GET /2/users/{id}/affiliates` | Paginated | Get Affiliates | +| [`getBlocking`](#getblocking) | `GET /2/users/{id}/blocking` | Paginated | Get Blocked Users | +| [`getBookmarkFolders`](#getbookmarkfolders) | `GET /2/users/{id}/bookmarks/folders` | Paginated | Get Bookmark Folders | +| [`getBookmarks`](#getbookmarks) | `GET /2/users/{id}/bookmarks` | Paginated | Get Bookmarks | +| [`getBookmarksByFolderId`](#getbookmarksbyfolderid) | `GET /2/users/{id}/bookmarks/folders/{folder_id}` | Paginated | Get Bookmarks by Folder ID | +| [`getById`](#getbyid) | `GET /2/users/{id}` | Standard | Get User by ID | +| [`getByIds`](#getbyids) | `GET /2/users` | Standard | Get Users by IDs | +| [`getByUsername`](#getbyusername) | `GET /2/users/by/username/{username}` | Standard | Get User by Username | +| [`getByUsernames`](#getbyusernames) | `GET /2/users/by` | Standard | Get Users by Usernames | +| [`getFollowedLists`](#getfollowedlists) | `GET /2/users/{id}/followed_lists` | Paginated | Get Followed Lists | +| [`getFollowers`](#getfollowers) | `GET /2/users/{id}/followers` | Paginated | Get Followers | +| [`getFollowing`](#getfollowing) | `GET /2/users/{id}/following` | Paginated | Get Following | +| [`getLikedPosts`](#getlikedposts) | `GET /2/users/{id}/liked_tweets` | Paginated | Get Liked Posts | +| [`getListMemberships`](#getlistmemberships) | `GET /2/users/{id}/list_memberships` | Paginated | Get List Memberships | +| [`getMe`](#getme) | `GET /2/users/me` | Standard | Get My User | +| [`getMeFollowers`](#getmefollowers) | `GET /2/users/me/followers` | Paginated | Get the Authenticated User's Followers | +| [`getMeFollowing`](#getmefollowing) | `GET /2/users/me/following` | Paginated | Get the Users the Authenticated User Follows | +| [`getMentions`](#getmentions) | `GET /2/users/{id}/mentions` | Paginated | Get Mentions | +| [`getMuting`](#getmuting) | `GET /2/users/{id}/muting` | Paginated | Get Muting | +| [`getOwnedLists`](#getownedlists) | `GET /2/users/{id}/owned_lists` | Paginated | Get Owned Lists | +| [`getPinnedLists`](#getpinnedlists) | `GET /2/users/{id}/pinned_lists` | Standard | Get Pinned Lists | +| [`getPosts`](#getposts) | `GET /2/users/{id}/tweets` | Paginated | Get Posts | +| [`getPublicKey`](#getpublickey) | `GET /2/users/{id}/public_keys` | Standard | Get User Public Keys | +| [`getPublicKeys`](#getpublickeys) | `GET /2/users/public_keys` | Standard | Get Public Keys for Multiple Users | +| [`getRepostsOfMe`](#getrepostsofme) | `GET /2/users/reposts_of_me` | Paginated | Get Reposts of Me | +| [`getTimeline`](#gettimeline) | `GET /2/users/{id}/timelines/reverse_chronological` | Paginated | Get Timeline | +| [`idBlock`](#idblock) | `POST /2/users/{id}/blocking` | Standard | Block User | +| [`idUnblock`](#idunblock) | `DELETE /2/users/{source_user_id}/blocking/{target_user_id}` | Standard | Unblock User | +| [`likePost`](#likepost) | `POST /2/users/{id}/likes` | Standard | Like Post | +| [`muteUser`](#muteuser) | `POST /2/users/{id}/muting` | Standard | Mute User | +| [`pinList`](#pinlist) | `POST /2/users/{id}/pinned_lists` | Standard | Pin List | +| [`repostPost`](#repostpost) | `POST /2/users/{id}/retweets` | Standard | Repost Post | +| [`search`](#search) | `GET /2/users/search` | Paginated | Search Users | +| [`unblockDms`](#unblockdms) | `POST /2/users/{id}/dm/unblock` | Standard | Unblock DMs | +| [`unfollowList`](#unfollowlist) | `DELETE /2/users/{id}/followed_lists/{list_id}` | Standard | Unfollow List | +| [`unfollowUser`](#unfollowuser) | `DELETE /2/users/{source_user_id}/following/{target_user_id}` | Standard | Unfollow User | +| [`unlikePost`](#unlikepost) | `DELETE /2/users/{id}/likes/{tweet_id}` | Standard | Unlike Post | +| [`unmuteUser`](#unmuteuser) | `DELETE /2/users/{source_user_id}/muting/{target_user_id}` | Standard | Unmute User | +| [`unpinList`](#unpinlist) | `DELETE /2/users/{id}/pinned_lists/{list_id}` | Standard | Unpin List | +| [`unrepostPost`](#unrepostpost) | `DELETE /2/users/{id}/retweets/{source_tweet_id}` | Standard | Unrepost Post | + +## `blockDms` + +POST `/2/users/{id}/dm/block` + +**Block DMs** + +Blocks direct messages to or from a specific User by their ID for the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.blockDms("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `createBookmark` + +POST `/2/users/{id}/bookmarks` + +**Create Bookmark** + +Adds one or more Posts to the authenticated user's Bookmarks. Supply `tweet_id` for a single Post, or `tweet_ids` (at most 25) to bookmark several in one request. Optional `folder_id` applies to every Post in the request. Billing and rate limits still apply per HTTP request. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.createBookmark("2244994945", { "tweet_id": "1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + At least one of `tweet_id`, `tweet_ids` is required. + + +**Returns:** `Promise` + +--- + +## `createBookmarkFolder` + +POST `/2/users/{id}/bookmarks/folders` + +**Create Bookmark Folder** + +Creates a new Bookmark folder for the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.createBookmarkFolder("2244994945", { name: "My List" }); +console.log(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `deleteBookmark` + +DELETE `/2/users/{id}/bookmarks/{tweet_id}` + +**Delete Bookmark** + +Removes a Post from the authenticated user's Bookmarks by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.deleteBookmark("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `tweet_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `followList` + +POST `/2/users/{id}/followed_lists` + +**Follow List** + +Causes the authenticated user to follow a specific List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.followList("2244994945", { "list_id": "1450000000000000000" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `followUser` + +POST `/2/users/{id}/following` + +**Follow User** + +Causes the authenticated user to follow a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.followUser("2244994945", { "target_user_id": "2244994945" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `getAffiliates` + +GET `/2/users/{id}/affiliates` Paginated + +**Get Affiliates** + +Retrieves a list of Users who are affiliated with a specific organization User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getAffiliates("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getBlocking` + +GET `/2/users/{id}/blocking` Paginated + +**Get Blocked Users** + +Returns the Users that the given User is blocking. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getBlocking("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getBookmarkFolders` + +GET `/2/users/{id}/bookmarks/folders` Paginated + +**Get Bookmark Folders** + +Retrieves a list of Bookmark folders created by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getBookmarkFolders("2244994945"); +console.log(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Promise` + +--- + +## `getBookmarks` + +GET `/2/users/{id}/bookmarks` Paginated + +**Get Bookmarks** + +Retrieves a list of Posts bookmarked by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getBookmarks("2244994945"); +console.log(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getBookmarksByFolderId` + +GET `/2/users/{id}/bookmarks/folders/{folder_id}` Paginated + +**Get Bookmarks by Folder ID** + +Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getBookmarksByFolderId("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + The authenticated user's numeric ID, not `me`: the `id` from Get My User (`GET /2/users/me`). + + + + `folder_id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + +**Returns:** `Promise` + +--- + +## `getById` + +GET `/2/users/{id}` + +**Get User by ID** + +Retrieves details of a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getById("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByIds` + +GET `/2/users` + +**Get Users by IDs** + +Retrieves details of multiple Users by their IDs. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getByIds(["2244994945"]); +console.log(response); +``` + +### Parameters + + + `ids` (query parameter). + + + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByUsername` + +GET `/2/users/by/username/{username}` + +**Get User by Username** + +Retrieves details of a specific User by their username. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getByUsername("XDevelopers"); +console.log(response); +``` + +### Parameters + + + `username` (path parameter). + + + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getByUsernames` + +GET `/2/users/by` + +**Get Users by Usernames** + +Retrieves details of multiple Users by their usernames. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getByUsernames(["XDevelopers"]); +console.log(response); +``` + +### Parameters + + + `usernames` (query parameter). + + + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getFollowedLists` + +GET `/2/users/{id}/followed_lists` Paginated + +**Get Followed Lists** + +Retrieves a list of Lists followed by a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getFollowedLists("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + +"}> + A comma separated list of List fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getFollowers` + +GET `/2/users/{id}/followers` Paginated + +**Get Followers** + +Retrieves a list of Users who follow a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getFollowers("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getFollowing` + +GET `/2/users/{id}/following` Paginated + +**Get Following** + +Retrieves a list of Users followed by a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getFollowing("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getLikedPosts` + +GET `/2/users/{id}/liked_tweets` Paginated + +**Get Liked Posts** + +Retrieves a list of Posts liked by a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getLikedPosts("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getListMemberships` + +GET `/2/users/{id}/list_memberships` Paginated + +**Get List Memberships** + +Retrieves a list of Lists that a specific User is a member of by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getListMemberships("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of List fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMe` + +GET `/2/users/me` + +**Get My User** + +Retrieves details of the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getMe(); +console.log(response); +``` + +### Parameters + + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMeFollowers` + +GET `/2/users/me/followers` Paginated + +**Get the Authenticated User's Followers** + +Returns the Users who follow the authenticated user. Same results as `GET /2/users/{id}/followers` with your own user ID, without looking it up. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getMeFollowers(); +console.log(response); +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMeFollowing` + +GET `/2/users/me/following` Paginated + +**Get the Users the Authenticated User Follows** + +Returns the Users the authenticated user follows. Same results as `GET /2/users/{id}/following` with your own user ID, without looking it up. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getMeFollowing(); +console.log(response); +``` + +### Parameters + + + + + The maximum number of users to return. + + + + The next_token or previous_token from a previous response, to fetch that page. A base32hex-encoded pagination token. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMentions` + +GET `/2/users/{id}/mentions` Paginated + +**Get Mentions** + +Retrieves a list of Posts that mention a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getMentions("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getMuting` + +GET `/2/users/{id}/muting` Paginated + +**Get Muting** + +Retrieves a list of Users muted by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getMuting("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + `pagination_token` (query parameter). + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getOwnedLists` + +GET `/2/users/{id}/owned_lists` Paginated + +**Get Owned Lists** + +Retrieves a list of Lists owned by a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getOwnedLists("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A 64-bit signed integer. + + +"}> + A comma separated list of List fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPinnedLists` + +GET `/2/users/{id}/pinned_lists` + +**Get Pinned Lists** + +Retrieves a list of Lists pinned by the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getPinnedLists("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + +"}> + A comma separated list of List fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPosts` + +GET `/2/users/{id}/tweets` Paginated + +**Get Posts** + +Retrieves a list of Posts authored by a specific User by their ID. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.getPosts("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + +"}> + `exclude` (query parameter). + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPublicKey` + +GET `/2/users/{id}/public_keys` + +**Get User Public Keys** + +Returns a user's registered public keys for X Chat encryption. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version and juicebox_config. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getPublicKey("2244994945"); +console.log(response); +``` + +### Parameters + + + Numeric user ID, not `me`. For your own keys, use the `id` from Get My User (`GET /2/users/me`). + + + + +"}> + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getPublicKeys` + +GET `/2/users/public_keys` + +**Get Public Keys for Multiple Users** + +Returns the public keys that up to 100 users registered for X Chat encryption, looked up by numeric user ID. Each key carries the user_id of the user it belongs to. + +Every key field is returned by default, so public_key.fields can be left out. It takes public_key, signing_public_key, identity_public_key_signature, public_key_version, juicebox_config and user_id. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getPublicKeys(["2244994945"]); +console.log(response); +``` + +### Parameters + + + Comma-separated numeric user IDs (1-100), not @usernames. + + + + +"}> + A comma separated list of PublicKey fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getRepostsOfMe` + +GET `/2/users/reposts_of_me` Paginated + +**Get Reposts of Me** + +Retrieves a list of Posts that repost content from the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getRepostsOfMe(); +console.log(response); +``` + +### Parameters + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getTimeline` + +GET `/2/users/{id}/timelines/reverse_chronological` Paginated + +**Get Timeline** + +Retrieves a reverse chronological list of Posts in the authenticated user's Timeline. + +When both are provided, `start_time` must be earlier than `end_time`. When both are provided, `since_id` must be less than `until_id`. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.getTimeline("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + + + `max_results` (query parameter). + + + + A base32hex-encoded pagination token. + + + + Must be on or after 2010-11-06. + + + + Must be on or after 2010-11-06. + + + + `since_id` (query parameter). + + + + `until_id` (query parameter). + + +"}> + `exclude` (query parameter). + + +"}> + A comma separated list of Post fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of Media fields to display. + + +"}> + A comma separated list of Poll fields to display. + + +"}> + A comma separated list of Place fields to display. + + + + +**Returns:** `Promise` + +--- + +## `idBlock` + +POST `/2/users/{id}/blocking` + +**Block User** + +Causes the source User to block the target User. A block also removes any follow between the two Users, in both directions, and unblocking does not restore it. Each call blocks one account: block only accounts the authenticated User named or approved, because finding or reviewing accounts is not approval to block them. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.idBlock("2244994945", { "target_user_id": "2244994945" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `idUnblock` + +DELETE `/2/users/{source_user_id}/blocking/{target_user_id}` + +**Unblock User** + +Causes the source User to unblock the target User. Unblocking does not restore any follow the block removed, so blocking and then unblocking a follower removes them as a follower: do that only for followers the authenticated User approved removing. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.idUnblock("2244994945", "2244994945"); +console.log(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `likePost` + +POST `/2/users/{id}/likes` + +**Like Post** + +Causes the authenticated user to like a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.likePost("2244994945", { "tweet_id": "1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `muteUser` + +POST `/2/users/{id}/muting` + +**Mute User** + +Causes the authenticated user to mute a specific User by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.muteUser("2244994945", { "target_user_id": "2244994945" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `pinList` + +POST `/2/users/{id}/pinned_lists` + +**Pin List** + +Causes the authenticated user to pin a specific List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.pinList("2244994945", { "list_id": "1450000000000000000" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `repostPost` + +POST `/2/users/{id}/retweets` + +**Repost Post** + +Causes the authenticated user to repost a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.repostPost("2244994945", { "tweet_id": "1895000000000000000" }); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `search` + +GET `/2/users/search` Paginated + +**Search Users** + +Retrieves a list of Users matching a search query. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.users.search("from:XDevelopers"); +console.log(response); +``` + +### Parameters + + + A name or @username (1-50 chars): letters and digits in any language, spaces, and _ ' . - @ & " + + + + + + `max_results` (query parameter). + + + + `next_token` (query parameter). + + +"}> + A comma separated list of User fields to display. + + +"}> + A comma separated list of fields to expand. + + +"}> + A comma separated list of Post fields to display. + + + + +**Returns:** `Promise` + +--- + +## `unblockDms` + +POST `/2/users/{id}/dm/unblock` + +**Unblock DMs** + +Unblocks direct messages to or from a specific User by their ID for the authenticated user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.unblockDms("2244994945"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `unfollowList` + +DELETE `/2/users/{id}/followed_lists/{list_id}` + +**Unfollow List** + +Causes the authenticated user to unfollow a List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.unfollowList("2244994945", "1450000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `unfollowUser` + +DELETE `/2/users/{source_user_id}/following/{target_user_id}` + +**Unfollow User** + +Causes the authenticated user to unfollow a specific user by their ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.unfollowUser("2244994945", "2244994945"); +console.log(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `unlikePost` + +DELETE `/2/users/{id}/likes/{tweet_id}` + +**Unlike Post** + +Causes the authenticated user to unlike a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.unlikePost("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `tweet_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `unmuteUser` + +DELETE `/2/users/{source_user_id}/muting/{target_user_id}` + +**Unmute User** + +Causes the authenticated user to unmute the target user. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.unmuteUser("2244994945", "2244994945"); +console.log(response); +``` + +### Parameters + + + `source_user_id` (path parameter). + + + + `target_user_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `unpinList` + +DELETE `/2/users/{id}/pinned_lists/{list_id}` + +**Unpin List** + +Causes the authenticated user to unpin a List by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.unpinList("2244994945", "1450000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `list_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `unrepostPost` + +DELETE `/2/users/{id}/retweets/{source_tweet_id}` + +**Unrepost Post** + +Causes the authenticated user to unrepost a specific Post by its ID. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ accessToken: process.env.X_ACCESS_TOKEN }); + +const response = await client.users.unrepostPost("2244994945", "1895000000000000000"); +console.log(response); +``` + +### Parameters + + + `id` (path parameter). + + + + `source_tweet_id` (path parameter). + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/clients/webhooks.mdx b/xdks/typescript/reference/clients/webhooks.mdx new file mode 100644 index 000000000..163ec0579 --- /dev/null +++ b/xdks/typescript/reference/clients/webhooks.mdx @@ -0,0 +1,237 @@ +--- +title: "WebhooksClient (TypeScript XDK)" +sidebarTitle: "Webhooks" +description: "TypeScript XDK WebhooksClient reference — 8 methods for X API v2 Webhooks endpoints." +--- + +Access **Webhooks** endpoints via `client.webhooks` (`WebhooksClient`). + +## Methods + +| Method | Endpoint | Behavior | Summary | +| :--- | :--- | :--- | :--- | +| [`create`](#create) | `POST /2/webhooks` | Standard | Create Webhook | +| [`createStreamLink`](#createstreamlink) | `POST /2/tweets/search/webhooks/{webhook_id}` | Standard | Create Stream Link | +| [`createWebhookReplayJob`](#createwebhookreplayjob) | `POST /2/webhooks/replay` | Standard | Create Replay Job for Webhook | +| [`delete`](#delete) | `DELETE /2/webhooks/{webhook_id}` | Standard | Delete Webhook | +| [`deleteStreamLink`](#deletestreamlink) | `DELETE /2/tweets/search/webhooks/{webhook_id}` | Standard | Delete Stream Link | +| [`get`](#get) | `GET /2/webhooks` | Standard | Get Webhook | +| [`getStreamLinks`](#getstreamlinks) | `GET /2/tweets/search/webhooks` | Standard | Get Stream Links | +| [`validate`](#validate) | `PUT /2/webhooks/{webhook_id}` | Standard | Validate Webhook | + +## `create` + +POST `/2/webhooks` + +**Create Webhook** + +Creates a new webhook configuration. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.create({ url: "https://example.com/webhook" }); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `createStreamLink` + +POST `/2/tweets/search/webhooks/{webhook_id}` + +**Create Stream Link** + +Creates a link to deliver FilteredStream events to the given webhook. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.createStreamLink("1234567890"); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `createWebhookReplayJob` + +POST `/2/webhooks/replay` + +**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. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.createWebhookReplayJob( + { "webhook_id": "1234567890", "from_date": "example", "to_date": "example" } +); +console.log(response); +``` + +### Parameters + + + Request payload. + + +**Returns:** `Promise` + +--- + +## `delete` + +DELETE `/2/webhooks/{webhook_id}` + +**Delete Webhook** + +Deletes an existing webhook configuration. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.delete("1234567890"); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `deleteStreamLink` + +DELETE `/2/tweets/search/webhooks/{webhook_id}` + +**Delete Stream Link** + +Deletes the link delivering FilteredStream events to the given webhook. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.deleteStreamLink("1234567890"); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Promise` + +--- + +## `get` + +GET `/2/webhooks` + +**Get Webhook** + +Get a list of webhook configs associated with a client app. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.get(); +console.log(response); +``` + +### Parameters + + + +"}> + A comma separated list of WebhookConfig fields to display. + + + + +**Returns:** `Promise` + +--- + +## `getStreamLinks` + +GET `/2/tweets/search/webhooks` + +**Get Stream Links** + +Get a list of webhook links associated with a filtered stream ruleset. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.getStreamLinks(); +console.log(response); +``` + +**Returns:** `Promise` + +--- + +## `validate` + +PUT `/2/webhooks/{webhook_id}` + +**Validate Webhook** + +Triggers a CRC check for a given webhook. + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); + +const response = await client.webhooks.validate("1234567890"); +console.log(response); +``` + +### Parameters + + + `webhook_id` (path parameter). + + +**Returns:** `Promise` + +--- + diff --git a/xdks/typescript/reference/interfaces/ApiResponse.mdx b/xdks/typescript/reference/interfaces/ApiResponse.mdx deleted file mode 100644 index f0b362e6b..000000000 --- a/xdks/typescript/reference/interfaces/ApiResponse.mdx +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: "ApiResponse" -sidebarTitle: "ApiResponse" -description: "Reference for the ApiResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -Response wrapper with metadata - -## Type parameters - -| Name | Type | -| :------ | :------ | -| `T` | `any` | - -## Properties - - -Response body - - - - -Response headers - - - - -HTTP status code - - - - -HTTP status text - - - - -Response URL - - diff --git a/xdks/typescript/reference/interfaces/ClientConfig.mdx b/xdks/typescript/reference/interfaces/ClientConfig.mdx deleted file mode 100644 index a8661d23e..000000000 --- a/xdks/typescript/reference/interfaces/ClientConfig.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "ClientConfig" -sidebarTitle: "ClientConfig" -description: "Reference for the ClientConfig TypeScript interface in the X API SDK. Configuration options for the X API client Bearer token for authentication OAuth1." ---- - -Configuration options for the X API client - -## Properties - - -Base URL for API requests - - - - -Bearer token for authentication - - - - -OAuth2 access token - - - - -OAuth1 instance for authentication - - - - -Custom headers to include in requests - - - - -Request timeout in milliseconds - - - - -Whether to automatically retry failed requests - - - - -Maximum number of retry attempts - - diff --git a/xdks/typescript/reference/interfaces/HttpClientRequestOptions.mdx b/xdks/typescript/reference/interfaces/HttpClientRequestOptions.mdx deleted file mode 100644 index b0028cc35..000000000 --- a/xdks/typescript/reference/interfaces/HttpClientRequestOptions.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "HttpClientRequestOptions" -sidebarTitle: "HttpClientRequestOptions" -description: "Reference for the HttpClientRequestOptions TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/HttpResponse.mdx b/xdks/typescript/reference/interfaces/HttpResponse.mdx deleted file mode 100644 index 9dd4f5f86..000000000 --- a/xdks/typescript/reference/interfaces/HttpResponse.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "HttpResponse" -sidebarTitle: "HttpResponse" -description: "Reference for the HttpResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/PaginatedResponse.mdx b/xdks/typescript/reference/interfaces/PaginatedResponse.mdx deleted file mode 100644 index 6ab8e3a93..000000000 --- a/xdks/typescript/reference/interfaces/PaginatedResponse.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "PaginatedResponse" -sidebarTitle: "PaginatedResponse" -description: "Reference for the PaginatedResponse TypeScript interface in the X API SDK. Represents the structure of a paginated API response from the X API." ---- - -Paginated response interface - -Represents the structure of a paginated API response from the X API. - -## Type parameters - -| Name | Description | -| :------ | :------ | -| `T` | The type of items in the response | - -## Properties - - -Array of items in the current page - - - - -Pagination metadata - - - - - - - - - - - - - - - - - -Additional included objects (users, tweets, etc.) - - - - -Any errors in the response - - diff --git a/xdks/typescript/reference/interfaces/PaginationMeta.mdx b/xdks/typescript/reference/interfaces/PaginationMeta.mdx deleted file mode 100644 index 19346ac52..000000000 --- a/xdks/typescript/reference/interfaces/PaginationMeta.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "PaginationMeta" -sidebarTitle: "PaginationMeta" -description: "Reference for the PaginationMeta TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -Pagination metadata - -## Properties - - -Next page token - - - - -Previous page token - - - - -Total count - - - - -Result count - - diff --git a/xdks/typescript/reference/interfaces/RequestOptions.mdx b/xdks/typescript/reference/interfaces/RequestOptions.mdx deleted file mode 100644 index 1d5d09938..000000000 --- a/xdks/typescript/reference/interfaces/RequestOptions.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "RequestOptions" -sidebarTitle: "RequestOptions" -description: "Reference for the RequestOptions TypeScript interface in the X API SDK. Request timeout in milliseconds Request signal for cancellation Return raw HTTP." ---- - -Request options for API calls - -## Properties - - -Request timeout in milliseconds - - - - -Additional headers - - - - -Request signal for cancellation - - - - -Request body - - - - -Return raw HTTP wrapper instead of parsed body - - - - -Security requirements for the endpoint (from OpenAPI spec) - used for smart auth selection - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse.mdx deleted file mode 100644 index 2a96c2156..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ActivityStreamingResponse" -sidebarTitle: "ActivityStreamingResponse" -description: "Schemas.ActivityStreamingResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivityStreamingResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscription.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscription.mdx deleted file mode 100644 index 5c129521e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscription.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "ActivitySubscription" -sidebarTitle: "ActivitySubscription" -description: "Reference for the Schemas.ActivitySubscription TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscription - -## Properties - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest.mdx deleted file mode 100644 index b891e1ab4..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "ActivitySubscriptionCreateRequest" -sidebarTitle: "ActivitySubscriptionCreateRequest" -description: "TypeScript XDK `ActivitySubscriptionCreateRequest` interface reference — request schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscriptionCreateRequest - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse.mdx deleted file mode 100644 index db8ee87f7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ActivitySubscriptionCreateResponse" -sidebarTitle: "ActivitySubscriptionCreateResponse" -description: "TypeScript XDK `ActivitySubscriptionCreateResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscriptionCreateResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse.mdx deleted file mode 100644 index 9e47f7f0c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ActivitySubscriptionDeleteResponse" -sidebarTitle: "ActivitySubscriptionDeleteResponse" -description: "TypeScript XDK `ActivitySubscriptionDeleteResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscriptionDeleteResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionFilter.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionFilter.mdx deleted file mode 100644 index 7e4f796ae..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionFilter.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ActivitySubscriptionFilter" -sidebarTitle: "ActivitySubscriptionFilter" -description: "Schemas.ActivitySubscriptionFilter TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscriptionFilter - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse.mdx deleted file mode 100644 index af5b9b243..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ActivitySubscriptionGetResponse" -sidebarTitle: "ActivitySubscriptionGetResponse" -description: "TypeScript XDK `ActivitySubscriptionGetResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscriptionGetResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest.mdx deleted file mode 100644 index dd40fc7bc..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ActivitySubscriptionUpdateRequest" -sidebarTitle: "ActivitySubscriptionUpdateRequest" -description: "TypeScript XDK `ActivitySubscriptionUpdateRequest` interface reference — request schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscriptionUpdateRequest - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse.mdx deleted file mode 100644 index b84eba0f2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "ActivitySubscriptionUpdateResponse" -sidebarTitle: "ActivitySubscriptionUpdateResponse" -description: "TypeScript XDK `ActivitySubscriptionUpdateResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ActivitySubscriptionUpdateResponse - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse.mdx deleted file mode 100644 index c7dd25ab4..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "AddOrDeleteRulesResponse" -sidebarTitle: "AddOrDeleteRulesResponse" -description: "Schemas.AddOrDeleteRulesResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).AddOrDeleteRulesResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.AddRulesRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.AddRulesRequest.mdx deleted file mode 100644 index 9a3c0ce36..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.AddRulesRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "AddRulesRequest" -sidebarTitle: "AddRulesRequest" -description: "Reference for the Schemas.AddRulesRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).AddRulesRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.AllowDownloadStatus.mdx b/xdks/typescript/reference/interfaces/Schemas.AllowDownloadStatus.mdx deleted file mode 100644 index 3d0f21db8..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.AllowDownloadStatus.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "AllowDownloadStatus" -sidebarTitle: "AllowDownloadStatus" -description: "Reference for the Schemas.AllowDownloadStatus TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).AllowDownloadStatus - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.AltText.mdx b/xdks/typescript/reference/interfaces/Schemas.AltText.mdx deleted file mode 100644 index d0f041c09..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.AltText.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "AltText" -sidebarTitle: "AltText" -description: "Reference for the Schemas.AltText TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).AltText - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Analytics.mdx b/xdks/typescript/reference/interfaces/Schemas.Analytics.mdx deleted file mode 100644 index d7dec447b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Analytics.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Analytics" -sidebarTitle: "Analytics" -description: "Reference for the Schemas.Analytics TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Analytics - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.AppRulesCount.mdx b/xdks/typescript/reference/interfaces/Schemas.AppRulesCount.mdx deleted file mode 100644 index 68bc51f9f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.AppRulesCount.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "AppRulesCount" -sidebarTitle: "AppRulesCount" -description: "Reference for the Schemas.AppRulesCount TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).AppRulesCount - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.AudiencePolicy.mdx b/xdks/typescript/reference/interfaces/Schemas.AudiencePolicy.mdx deleted file mode 100644 index 579ef8f25..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.AudiencePolicy.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "AudiencePolicy" -sidebarTitle: "AudiencePolicy" -description: "Reference for the Schemas.AudiencePolicy TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).AudiencePolicy - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest.mdx deleted file mode 100644 index f5a77d331..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "BookmarkAddRequest" -sidebarTitle: "BookmarkAddRequest" -description: "Reference for the Schemas.BookmarkAddRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).BookmarkAddRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse.mdx deleted file mode 100644 index a694158d2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "BookmarkFolderPostsResponse" -sidebarTitle: "BookmarkFolderPostsResponse" -description: "Schemas.BookmarkFolderPostsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).BookmarkFolderPostsResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse.mdx deleted file mode 100644 index a791b69d9..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "BookmarkFoldersResponse" -sidebarTitle: "BookmarkFoldersResponse" -description: "Schemas.BookmarkFoldersResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).BookmarkFoldersResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse.mdx deleted file mode 100644 index a1ff1f722..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "BookmarkMutationResponse" -sidebarTitle: "BookmarkMutationResponse" -description: "Schemas.BookmarkMutationResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).BookmarkMutationResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CashtagFields.mdx b/xdks/typescript/reference/interfaces/Schemas.CashtagFields.mdx deleted file mode 100644 index 91150da32..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CashtagFields.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "CashtagFields" -sidebarTitle: "CashtagFields" -description: "Reference for the Schemas.CashtagFields TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CashtagFields - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ClientAppUsage.mdx b/xdks/typescript/reference/interfaces/Schemas.ClientAppUsage.mdx deleted file mode 100644 index ac93d1b73..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ClientAppUsage.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ClientAppUsage" -sidebarTitle: "ClientAppUsage" -description: "Reference for the Schemas.ClientAppUsage TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ClientAppUsage - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Community.mdx b/xdks/typescript/reference/interfaces/Schemas.Community.mdx deleted file mode 100644 index ff8dff758..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Community.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Community" -sidebarTitle: "Community" -description: "Reference for the Schemas.Community TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Community - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ComplianceJob.mdx b/xdks/typescript/reference/interfaces/Schemas.ComplianceJob.mdx deleted file mode 100644 index e991f3b14..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ComplianceJob.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "ComplianceJob" -sidebarTitle: "ComplianceJob" -description: "Reference for the Schemas.ComplianceJob TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ComplianceJob - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Connection.mdx b/xdks/typescript/reference/interfaces/Schemas.Connection.mdx deleted file mode 100644 index c911e2e58..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Connection.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Connection" -sidebarTitle: "Connection" -description: "Reference for the Schemas.Connection TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Connection - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ContentExpiration.mdx b/xdks/typescript/reference/interfaces/Schemas.ContentExpiration.mdx deleted file mode 100644 index 3daa65746..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ContentExpiration.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "ContentExpiration" -sidebarTitle: "ContentExpiration" -description: "Reference for the Schemas.ContentExpiration TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ContentExpiration - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ContextAnnotation.mdx b/xdks/typescript/reference/interfaces/Schemas.ContextAnnotation.mdx deleted file mode 100644 index 7d9cc43a6..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ContextAnnotation.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ContextAnnotation" -sidebarTitle: "ContextAnnotation" -description: "Reference for the Schemas.ContextAnnotation TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ContextAnnotation - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationDomainFields.mdx b/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationDomainFields.mdx deleted file mode 100644 index a7e654caa..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationDomainFields.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ContextAnnotationDomainFields" -sidebarTitle: "ContextAnnotationDomainFields" -description: "Schemas.ContextAnnotationDomainFields TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ContextAnnotationDomainFields - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationEntityFields.mdx b/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationEntityFields.mdx deleted file mode 100644 index 7c3692d35..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationEntityFields.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ContextAnnotationEntityFields" -sidebarTitle: "ContextAnnotationEntityFields" -description: "Schemas.ContextAnnotationEntityFields TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ContextAnnotationEntityFields - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateAttachmentsMessageRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateAttachmentsMessageRequest.mdx deleted file mode 100644 index 010120d44..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateAttachmentsMessageRequest.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "CreateAttachmentsMessageRequest" -sidebarTitle: "CreateAttachmentsMessageRequest" -description: "TypeScript XDK `CreateAttachmentsMessageRequest` interface reference — request schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateAttachmentsMessageRequest - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest.mdx deleted file mode 100644 index d5bad4378..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "CreateComplianceJobRequest" -sidebarTitle: "CreateComplianceJobRequest" -description: "Schemas.CreateComplianceJobRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateComplianceJobRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse.mdx deleted file mode 100644 index ae1fa59e9..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "CreateComplianceJobResponse" -sidebarTitle: "CreateComplianceJobResponse" -description: "Schemas.CreateComplianceJobResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateComplianceJobResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest.mdx deleted file mode 100644 index 40c5b577b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "CreateDmConversationRequest" -sidebarTitle: "CreateDmConversationRequest" -description: "Schemas.CreateDmConversationRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateDmConversationRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse.mdx deleted file mode 100644 index 728f3b69a..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "CreateDmEventResponse" -sidebarTitle: "CreateDmEventResponse" -description: "Reference for the Schemas.CreateDmEventResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateDmEventResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest.mdx deleted file mode 100644 index dc5fa3569..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "CreateNoteRequest" -sidebarTitle: "CreateNoteRequest" -description: "Reference for the Schemas.CreateNoteRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateNoteRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse.mdx deleted file mode 100644 index c29523ada..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "CreateNoteResponse" -sidebarTitle: "CreateNoteResponse" -description: "Reference for the Schemas.CreateNoteResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateNoteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.CreateTextMessageRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.CreateTextMessageRequest.mdx deleted file mode 100644 index 37785ef4b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.CreateTextMessageRequest.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "CreateTextMessageRequest" -sidebarTitle: "CreateTextMessageRequest" -description: "Schemas.CreateTextMessageRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).CreateTextMessageRequest - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse.mdx deleted file mode 100644 index 5111f9a0c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "DeleteDmResponse" -sidebarTitle: "DeleteDmResponse" -description: "Reference for the Schemas.DeleteDmResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).DeleteDmResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse.mdx deleted file mode 100644 index 0a3d493a9..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "DeleteNoteResponse" -sidebarTitle: "DeleteNoteResponse" -description: "Reference for the Schemas.DeleteNoteResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).DeleteNoteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.DeleteRulesRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.DeleteRulesRequest.mdx deleted file mode 100644 index 705720c80..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.DeleteRulesRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "DeleteRulesRequest" -sidebarTitle: "DeleteRulesRequest" -description: "Reference for the Schemas.DeleteRulesRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).DeleteRulesRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.DmEvent.mdx b/xdks/typescript/reference/interfaces/Schemas.DmEvent.mdx deleted file mode 100644 index d04b393c0..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.DmEvent.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "DmEvent" -sidebarTitle: "DmEvent" -description: "Reference for the Schemas.DmEvent TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).DmEvent - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment.mdx b/xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment.mdx deleted file mode 100644 index d37409de9..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "DmMediaAttachment" -sidebarTitle: "DmMediaAttachment" -description: "Reference for the Schemas.DmMediaAttachment TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).DmMediaAttachment - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.DomainRestrictions.mdx b/xdks/typescript/reference/interfaces/Schemas.DomainRestrictions.mdx deleted file mode 100644 index d396e08e8..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.DomainRestrictions.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "DomainRestrictions" -sidebarTitle: "DomainRestrictions" -description: "Reference for the Schemas.DomainRestrictions TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).DomainRestrictions - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Engagement.mdx b/xdks/typescript/reference/interfaces/Schemas.Engagement.mdx deleted file mode 100644 index 08cc0dd4b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Engagement.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Engagement" -sidebarTitle: "Engagement" -description: "Reference for the Schemas.Engagement TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Engagement - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveExclusive.mdx b/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveExclusive.mdx deleted file mode 100644 index e054ded3e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveExclusive.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "EntityIndicesInclusiveExclusive" -sidebarTitle: "EntityIndicesInclusiveExclusive" -description: "TypeScript XDK `EntityIndicesInclusiveExclusive` interface reference — schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).EntityIndicesInclusiveExclusive - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveInclusive.mdx b/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveInclusive.mdx deleted file mode 100644 index eb31b2241..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveInclusive.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "EntityIndicesInclusiveInclusive" -sidebarTitle: "EntityIndicesInclusiveInclusive" -description: "TypeScript XDK `EntityIndicesInclusiveInclusive` interface reference — schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).EntityIndicesInclusiveInclusive - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Error.mdx b/xdks/typescript/reference/interfaces/Schemas.Error.mdx deleted file mode 100644 index f7cb78854..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Error.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Error" -sidebarTitle: "Error" -description: "Reference for the Schemas.Error TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Error - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest.mdx deleted file mode 100644 index 8d459d448..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "EvaluateNoteRequest" -sidebarTitle: "EvaluateNoteRequest" -description: "Reference for the Schemas.EvaluateNoteRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).EvaluateNoteRequest - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse.mdx deleted file mode 100644 index aa50867cc..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "EvaluateNoteResponse" -sidebarTitle: "EvaluateNoteResponse" -description: "Reference for the Schemas.EvaluateNoteResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).EvaluateNoteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Expansions.mdx b/xdks/typescript/reference/interfaces/Schemas.Expansions.mdx deleted file mode 100644 index 2077a2035..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Expansions.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Expansions" -sidebarTitle: "Expansions" -description: "Reference for the Schemas.Expansions TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Expansions - -## Properties - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.FilteredStreamingTweetResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.FilteredStreamingTweetResponse.mdx deleted file mode 100644 index 1b25f8871..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.FilteredStreamingTweetResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "FilteredStreamingTweetResponse" -sidebarTitle: "FilteredStreamingTweetResponse" -description: "TypeScript XDK `FilteredStreamingTweetResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).FilteredStreamingTweetResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.FollowActivityResponsePayload.mdx b/xdks/typescript/reference/interfaces/Schemas.FollowActivityResponsePayload.mdx deleted file mode 100644 index 2bb665142..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.FollowActivityResponsePayload.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "FollowActivityResponsePayload" -sidebarTitle: "FollowActivityResponsePayload" -description: "Schemas.FollowActivityResponsePayload TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).FollowActivityResponsePayload - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.FoundMediaOrigin.mdx b/xdks/typescript/reference/interfaces/Schemas.FoundMediaOrigin.mdx deleted file mode 100644 index 9d78989a3..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.FoundMediaOrigin.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "FoundMediaOrigin" -sidebarTitle: "FoundMediaOrigin" -description: "Reference for the Schemas.FoundMediaOrigin TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).FoundMediaOrigin - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.FullTextEntities.mdx b/xdks/typescript/reference/interfaces/Schemas.FullTextEntities.mdx deleted file mode 100644 index 8c3c3bacf..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.FullTextEntities.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "FullTextEntities" -sidebarTitle: "FullTextEntities" -description: "Reference for the Schemas.FullTextEntities TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).FullTextEntities - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Geo.mdx b/xdks/typescript/reference/interfaces/Schemas.Geo.mdx deleted file mode 100644 index 005ac31c2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Geo.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Geo" -sidebarTitle: "Geo" -description: "Reference for the Schemas.Geo TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Geo - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse.mdx deleted file mode 100644 index 4149a532a..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2CommunitiesIdResponse" -sidebarTitle: "Get2CommunitiesIdResponse" -description: "Schemas.Get2CommunitiesIdResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2CommunitiesIdResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse.mdx deleted file mode 100644 index bf24f611a..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2CommunitiesSearchResponse" -sidebarTitle: "Get2CommunitiesSearchResponse" -description: "Schemas.Get2CommunitiesSearchResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2CommunitiesSearchResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse.mdx deleted file mode 100644 index c9691cbc2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2ComplianceJobsIdResponse" -sidebarTitle: "Get2ComplianceJobsIdResponse" -description: "Schemas.Get2ComplianceJobsIdResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2ComplianceJobsIdResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse.mdx deleted file mode 100644 index ab29d5f07..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2ComplianceJobsResponse" -sidebarTitle: "Get2ComplianceJobsResponse" -description: "Schemas.Get2ComplianceJobsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2ComplianceJobsResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse.mdx deleted file mode 100644 index f3df5d197..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2ConnectionsResponse" -sidebarTitle: "Get2ConnectionsResponse" -description: "Schemas.Get2ConnectionsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2ConnectionsResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse.mdx deleted file mode 100644 index eeee979f1..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2DmConversationsIdDmEventsResponse" -sidebarTitle: "Get2DmConversationsIdDmEventsResponse" -description: "TypeScript XDK `Get2DmConversationsIdDmEventsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2DmConversationsIdDmEventsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse.mdx deleted file mode 100644 index ef2e9d44f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2DmConversationsWithParticipantIdDmEventsResponse" -sidebarTitle: "Get2DmConversationsWithParticipantIdDmEventsResponse" -description: "Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2DmConversationsWithParticipantIdDmEventsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse.mdx deleted file mode 100644 index 4243cb215..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2DmEventsEventIdResponse" -sidebarTitle: "Get2DmEventsEventIdResponse" -description: "Schemas.Get2DmEventsEventIdResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2DmEventsEventIdResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse.mdx deleted file mode 100644 index ef9ff6b7b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2DmEventsResponse" -sidebarTitle: "Get2DmEventsResponse" -description: "Reference for the Schemas.Get2DmEventsResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2DmEventsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidContactResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidContactResponse.mdx deleted file mode 100644 index 21dd0ec07..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidContactResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2FdxAccountsAccountidContactResponse" -sidebarTitle: "Get2FdxAccountsAccountidContactResponse" -description: "TypeScript XDK `Get2FdxAccountsAccountidContactResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2FdxAccountsAccountidContactResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidPayment_networksResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidPayment_networksResponse.mdx deleted file mode 100644 index c6d7d1770..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidPayment_networksResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2FdxAccountsAccountidPayment_networksResponse" -sidebarTitle: "Get2FdxAccountsAccountidPayment_networksResponse" -description: "`Get2FdxAccountsAccountidPayment_networksResponse` TypeScript XDK interface reference: fields, types, and required flags exposed by the X API v2 SDK client." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2FdxAccountsAccountidPayment_networksResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidResponse.mdx deleted file mode 100644 index 715e1099c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2FdxAccountsAccountidResponse" -sidebarTitle: "Get2FdxAccountsAccountidResponse" -description: "TypeScript XDK `Get2FdxAccountsAccountidResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2FdxAccountsAccountidResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidTransactionsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidTransactionsResponse.mdx deleted file mode 100644 index 2cb883077..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidTransactionsResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2FdxAccountsAccountidTransactionsResponse" -sidebarTitle: "Get2FdxAccountsAccountidTransactionsResponse" -description: "TypeScript XDK `Get2FdxAccountsAccountidTransactionsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2FdxAccountsAccountidTransactionsResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2FdxCustomersCurrentResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2FdxCustomersCurrentResponse.mdx deleted file mode 100644 index 664dbf863..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2FdxCustomersCurrentResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2FdxCustomersCurrentResponse" -sidebarTitle: "Get2FdxCustomersCurrentResponse" -description: "TypeScript XDK `Get2FdxCustomersCurrentResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2FdxCustomersCurrentResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse.mdx deleted file mode 100644 index de50245e1..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2Insights28hrResponse" -sidebarTitle: "Get2Insights28hrResponse" -description: "Schemas.Get2Insights28hrResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2Insights28hrResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse.mdx deleted file mode 100644 index 3a4deb14b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2InsightsHistoricalResponse" -sidebarTitle: "Get2InsightsHistoricalResponse" -description: "TypeScript XDK `Get2InsightsHistoricalResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2InsightsHistoricalResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2LikesFirehoseStreamResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2LikesFirehoseStreamResponse.mdx deleted file mode 100644 index cf0b00e99..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2LikesFirehoseStreamResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2LikesFirehoseStreamResponse" -sidebarTitle: "Get2LikesFirehoseStreamResponse" -description: "TypeScript XDK `Get2LikesFirehoseStreamResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2LikesFirehoseStreamResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2LikesSample10StreamResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2LikesSample10StreamResponse.mdx deleted file mode 100644 index 940fccf8b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2LikesSample10StreamResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2LikesSample10StreamResponse" -sidebarTitle: "Get2LikesSample10StreamResponse" -description: "TypeScript XDK `Get2LikesSample10StreamResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2LikesSample10StreamResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse.mdx deleted file mode 100644 index 715612abe..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2ListsIdFollowersResponse" -sidebarTitle: "Get2ListsIdFollowersResponse" -description: "Schemas.Get2ListsIdFollowersResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2ListsIdFollowersResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse.mdx deleted file mode 100644 index 03e562fb6..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2ListsIdMembersResponse" -sidebarTitle: "Get2ListsIdMembersResponse" -description: "Schemas.Get2ListsIdMembersResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2ListsIdMembersResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse.mdx deleted file mode 100644 index 53b272dac..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2ListsIdResponse" -sidebarTitle: "Get2ListsIdResponse" -description: "Reference for the Schemas.Get2ListsIdResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2ListsIdResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse.mdx deleted file mode 100644 index 9c5dd846c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2ListsIdTweetsResponse" -sidebarTitle: "Get2ListsIdTweetsResponse" -description: "Schemas.Get2ListsIdTweetsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2ListsIdTweetsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2MediaAnalyticsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2MediaAnalyticsResponse.mdx deleted file mode 100644 index a41ae8a1c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2MediaAnalyticsResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2MediaAnalyticsResponse" -sidebarTitle: "Get2MediaAnalyticsResponse" -description: "Schemas.Get2MediaAnalyticsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2MediaAnalyticsResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse.mdx deleted file mode 100644 index c68e03faa..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2MediaMediaKeyResponse" -sidebarTitle: "Get2MediaMediaKeyResponse" -description: "Schemas.Get2MediaMediaKeyResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2MediaMediaKeyResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse.mdx deleted file mode 100644 index 4707699f1..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2MediaResponse" -sidebarTitle: "Get2MediaResponse" -description: "Reference for the Schemas.Get2MediaResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2MediaResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse.mdx deleted file mode 100644 index 750c1af15..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2NewsIdResponse" -sidebarTitle: "Get2NewsIdResponse" -description: "Reference for the Schemas.Get2NewsIdResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2NewsIdResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse.mdx deleted file mode 100644 index 3eb654ef2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2NewsSearchResponse" -sidebarTitle: "Get2NewsSearchResponse" -description: "TypeScript XDK `Get2NewsSearchResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2NewsSearchResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse.mdx deleted file mode 100644 index 7bbe61512..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2NotesSearchNotesWrittenResponse" -sidebarTitle: "Get2NotesSearchNotesWrittenResponse" -description: "TypeScript XDK `Get2NotesSearchNotesWrittenResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2NotesSearchNotesWrittenResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse.mdx deleted file mode 100644 index 2b3feac62..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2NotesSearchPostsEligibleForNotesResponse" -sidebarTitle: "Get2NotesSearchPostsEligibleForNotesResponse" -description: "TypeScript XDK `Get2NotesSearchPostsEligibleForNotesResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2NotesSearchPostsEligibleForNotesResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse.mdx deleted file mode 100644 index 465fb6ace..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2SpacesByCreatorIdsResponse" -sidebarTitle: "Get2SpacesByCreatorIdsResponse" -description: "TypeScript XDK `Get2SpacesByCreatorIdsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2SpacesByCreatorIdsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse.mdx deleted file mode 100644 index 92237c82f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2SpacesIdBuyersResponse" -sidebarTitle: "Get2SpacesIdBuyersResponse" -description: "Schemas.Get2SpacesIdBuyersResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2SpacesIdBuyersResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse.mdx deleted file mode 100644 index 934644a50..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2SpacesIdResponse" -sidebarTitle: "Get2SpacesIdResponse" -description: "Reference for the Schemas.Get2SpacesIdResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2SpacesIdResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse.mdx deleted file mode 100644 index 8d0b131f7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2SpacesIdTweetsResponse" -sidebarTitle: "Get2SpacesIdTweetsResponse" -description: "Schemas.Get2SpacesIdTweetsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2SpacesIdTweetsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse.mdx deleted file mode 100644 index a3ef754f6..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2SpacesResponse" -sidebarTitle: "Get2SpacesResponse" -description: "Reference for the Schemas.Get2SpacesResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2SpacesResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse.mdx deleted file mode 100644 index a6d02b6d9..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2SpacesSearchResponse" -sidebarTitle: "Get2SpacesSearchResponse" -description: "Schemas.Get2SpacesSearchResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2SpacesSearchResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse.mdx deleted file mode 100644 index ff02fbc4b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2TrendsByWoeidWoeidResponse" -sidebarTitle: "Get2TrendsByWoeidWoeidResponse" -description: "TypeScript XDK `Get2TrendsByWoeidWoeidResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TrendsByWoeidWoeidResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsAnalyticsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsAnalyticsResponse.mdx deleted file mode 100644 index 11e0a12ae..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsAnalyticsResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2TweetsAnalyticsResponse" -sidebarTitle: "Get2TweetsAnalyticsResponse" -description: "Schemas.Get2TweetsAnalyticsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsAnalyticsResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse.mdx deleted file mode 100644 index 8ec4c8bf2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsCountsAllResponse" -sidebarTitle: "Get2TweetsCountsAllResponse" -description: "Schemas.Get2TweetsCountsAllResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsCountsAllResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse.mdx deleted file mode 100644 index 4050f8dc2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsCountsRecentResponse" -sidebarTitle: "Get2TweetsCountsRecentResponse" -description: "TypeScript XDK `Get2TweetsCountsRecentResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsCountsRecentResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangEnResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangEnResponse.mdx deleted file mode 100644 index 023c5de61..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangEnResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsFirehoseStreamLangEnResponse" -sidebarTitle: "Get2TweetsFirehoseStreamLangEnResponse" -description: "TypeScript XDK `Get2TweetsFirehoseStreamLangEnResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsFirehoseStreamLangEnResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangJaResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangJaResponse.mdx deleted file mode 100644 index 0ae7542e0..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangJaResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsFirehoseStreamLangJaResponse" -sidebarTitle: "Get2TweetsFirehoseStreamLangJaResponse" -description: "TypeScript XDK `Get2TweetsFirehoseStreamLangJaResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsFirehoseStreamLangJaResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangKoResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangKoResponse.mdx deleted file mode 100644 index 2b07c7b55..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangKoResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsFirehoseStreamLangKoResponse" -sidebarTitle: "Get2TweetsFirehoseStreamLangKoResponse" -description: "TypeScript XDK `Get2TweetsFirehoseStreamLangKoResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsFirehoseStreamLangKoResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangPtResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangPtResponse.mdx deleted file mode 100644 index 657145486..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangPtResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsFirehoseStreamLangPtResponse" -sidebarTitle: "Get2TweetsFirehoseStreamLangPtResponse" -description: "TypeScript XDK `Get2TweetsFirehoseStreamLangPtResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsFirehoseStreamLangPtResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamResponse.mdx deleted file mode 100644 index 3dfa96fab..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsFirehoseStreamResponse" -sidebarTitle: "Get2TweetsFirehoseStreamResponse" -description: "TypeScript XDK `Get2TweetsFirehoseStreamResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsFirehoseStreamResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse.mdx deleted file mode 100644 index 76b6cfde3..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2TweetsIdLikingUsersResponse" -sidebarTitle: "Get2TweetsIdLikingUsersResponse" -description: "TypeScript XDK `Get2TweetsIdLikingUsersResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsIdLikingUsersResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse.mdx deleted file mode 100644 index 1e0cb7614..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2TweetsIdQuoteTweetsResponse" -sidebarTitle: "Get2TweetsIdQuoteTweetsResponse" -description: "TypeScript XDK `Get2TweetsIdQuoteTweetsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsIdQuoteTweetsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse.mdx deleted file mode 100644 index 85543d42c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsIdResponse" -sidebarTitle: "Get2TweetsIdResponse" -description: "Reference for the Schemas.Get2TweetsIdResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsIdResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse.mdx deleted file mode 100644 index dcbeda784..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2TweetsIdRetweetedByResponse" -sidebarTitle: "Get2TweetsIdRetweetedByResponse" -description: "TypeScript XDK `Get2TweetsIdRetweetedByResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsIdRetweetedByResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse.mdx deleted file mode 100644 index b1b9f7a2b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2TweetsIdRetweetsResponse" -sidebarTitle: "Get2TweetsIdRetweetsResponse" -description: "Schemas.Get2TweetsIdRetweetsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsIdRetweetsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse.mdx deleted file mode 100644 index 89e667f68..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsResponse" -sidebarTitle: "Get2TweetsResponse" -description: "Reference for the Schemas.Get2TweetsResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSample10StreamResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSample10StreamResponse.mdx deleted file mode 100644 index 6532d1c94..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSample10StreamResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsSample10StreamResponse" -sidebarTitle: "Get2TweetsSample10StreamResponse" -description: "TypeScript XDK `Get2TweetsSample10StreamResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsSample10StreamResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSampleStreamResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSampleStreamResponse.mdx deleted file mode 100644 index 355f6715e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSampleStreamResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsSampleStreamResponse" -sidebarTitle: "Get2TweetsSampleStreamResponse" -description: "TypeScript XDK `Get2TweetsSampleStreamResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsSampleStreamResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse.mdx deleted file mode 100644 index 398aae2aa..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2TweetsSearchAllResponse" -sidebarTitle: "Get2TweetsSearchAllResponse" -description: "Schemas.Get2TweetsSearchAllResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsSearchAllResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse.mdx deleted file mode 100644 index 0e5035e83..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2TweetsSearchRecentResponse" -sidebarTitle: "Get2TweetsSearchRecentResponse" -description: "TypeScript XDK `Get2TweetsSearchRecentResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsSearchRecentResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamResponse.mdx deleted file mode 100644 index 7749d68b0..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2TweetsSearchStreamResponse" -sidebarTitle: "Get2TweetsSearchStreamResponse" -description: "TypeScript XDK `Get2TweetsSearchStreamResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsSearchStreamResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse.mdx deleted file mode 100644 index 610cddbc9..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2TweetsSearchStreamRulesCountsResponse" -sidebarTitle: "Get2TweetsSearchStreamRulesCountsResponse" -description: "TypeScript XDK `Get2TweetsSearchStreamRulesCountsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2TweetsSearchStreamRulesCountsResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse.mdx deleted file mode 100644 index 5d6b935fe..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Get2UsageTweetsResponse" -sidebarTitle: "Get2UsageTweetsResponse" -description: "Schemas.Get2UsageTweetsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsageTweetsResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse.mdx deleted file mode 100644 index a125e46c1..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2UsersByResponse" -sidebarTitle: "Get2UsersByResponse" -description: "Reference for the Schemas.Get2UsersByResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersByResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse.mdx deleted file mode 100644 index 591482f3b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2UsersByUsernameUsernameResponse" -sidebarTitle: "Get2UsersByUsernameUsernameResponse" -description: "TypeScript XDK `Get2UsersByUsernameUsernameResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersByUsernameUsernameResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse.mdx deleted file mode 100644 index fc9a85eef..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdBlockingResponse" -sidebarTitle: "Get2UsersIdBlockingResponse" -description: "Schemas.Get2UsersIdBlockingResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdBlockingResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse.mdx deleted file mode 100644 index 9ac016cae..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdBookmarksResponse" -sidebarTitle: "Get2UsersIdBookmarksResponse" -description: "Schemas.Get2UsersIdBookmarksResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdBookmarksResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse.mdx deleted file mode 100644 index 909e1b749..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdFollowedListsResponse" -sidebarTitle: "Get2UsersIdFollowedListsResponse" -description: "TypeScript XDK `Get2UsersIdFollowedListsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdFollowedListsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse.mdx deleted file mode 100644 index 08625c066..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdFollowersResponse" -sidebarTitle: "Get2UsersIdFollowersResponse" -description: "Schemas.Get2UsersIdFollowersResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdFollowersResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse.mdx deleted file mode 100644 index 349916ce1..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdFollowingResponse" -sidebarTitle: "Get2UsersIdFollowingResponse" -description: "Schemas.Get2UsersIdFollowingResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdFollowingResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse.mdx deleted file mode 100644 index 99bbf44f5..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdLikedTweetsResponse" -sidebarTitle: "Get2UsersIdLikedTweetsResponse" -description: "TypeScript XDK `Get2UsersIdLikedTweetsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdLikedTweetsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse.mdx deleted file mode 100644 index 15f106878..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdListMembershipsResponse" -sidebarTitle: "Get2UsersIdListMembershipsResponse" -description: "TypeScript XDK `Get2UsersIdListMembershipsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdListMembershipsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse.mdx deleted file mode 100644 index ccf1915e2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdMentionsResponse" -sidebarTitle: "Get2UsersIdMentionsResponse" -description: "Schemas.Get2UsersIdMentionsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdMentionsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse.mdx deleted file mode 100644 index bd809f1ae..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdMutingResponse" -sidebarTitle: "Get2UsersIdMutingResponse" -description: "Schemas.Get2UsersIdMutingResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdMutingResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse.mdx deleted file mode 100644 index 1665ead21..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdOwnedListsResponse" -sidebarTitle: "Get2UsersIdOwnedListsResponse" -description: "Schemas.Get2UsersIdOwnedListsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdOwnedListsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse.mdx deleted file mode 100644 index b9163cb46..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdPinnedListsResponse" -sidebarTitle: "Get2UsersIdPinnedListsResponse" -description: "TypeScript XDK `Get2UsersIdPinnedListsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdPinnedListsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse.mdx deleted file mode 100644 index b340e3a7f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2UsersIdResponse" -sidebarTitle: "Get2UsersIdResponse" -description: "Reference for the Schemas.Get2UsersIdResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse.mdx deleted file mode 100644 index db1da26dd..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdTimelinesReverseChronologicalResponse" -sidebarTitle: "Get2UsersIdTimelinesReverseChronologicalResponse" -description: "`Get2UsersIdTimelinesReverseChronologicalResponse` TypeScript XDK interface reference: fields, types, and required flags exposed by the X API v2 SDK client." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdTimelinesReverseChronologicalResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse.mdx deleted file mode 100644 index 8d53fb04e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersIdTweetsResponse" -sidebarTitle: "Get2UsersIdTweetsResponse" -description: "Schemas.Get2UsersIdTweetsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersIdTweetsResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse.mdx deleted file mode 100644 index 6e1d11bd7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2UsersMeResponse" -sidebarTitle: "Get2UsersMeResponse" -description: "Reference for the Schemas.Get2UsersMeResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersMeResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse.mdx deleted file mode 100644 index f2d4f604b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2UsersPersonalizedTrendsResponse" -sidebarTitle: "Get2UsersPersonalizedTrendsResponse" -description: "TypeScript XDK `Get2UsersPersonalizedTrendsResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersPersonalizedTrendsResponse - -zedTrendsResponse#data) -- [errors](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse#errors) - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse.mdx deleted file mode 100644 index 541bafcba..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersRepostsOfMeResponse" -sidebarTitle: "Get2UsersRepostsOfMeResponse" -description: "Schemas.Get2UsersRepostsOfMeResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersRepostsOfMeResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse.mdx deleted file mode 100644 index 05eec684c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2UsersResponse" -sidebarTitle: "Get2UsersResponse" -description: "Reference for the Schemas.Get2UsersResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse.mdx deleted file mode 100644 index acb025d4f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Get2UsersSearchResponse" -sidebarTitle: "Get2UsersSearchResponse" -description: "Schemas.Get2UsersSearchResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2UsersSearchResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse.mdx deleted file mode 100644 index bda2657ce..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Get2WebhooksResponse" -sidebarTitle: "Get2WebhooksResponse" -description: "Reference for the Schemas.Get2WebhooksResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Get2WebhooksResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.HashtagFields.mdx b/xdks/typescript/reference/interfaces/Schemas.HashtagFields.mdx deleted file mode 100644 index 51d816a29..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.HashtagFields.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "HashtagFields" -sidebarTitle: "HashtagFields" -description: "Reference for the Schemas.HashtagFields TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).HashtagFields - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse.mdx deleted file mode 100644 index fc14c2dcc..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "KillAllConnectionsResponse" -sidebarTitle: "KillAllConnectionsResponse" -description: "Schemas.KillAllConnectionsResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).KillAllConnectionsResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.LikeComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.LikeComplianceSchema.mdx deleted file mode 100644 index d4af4c39e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.LikeComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "LikeComplianceSchema" -sidebarTitle: "LikeComplianceSchema" -description: "Reference for the Schemas.LikeComplianceSchema TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).LikeComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.LikeWithTweetAuthor.mdx b/xdks/typescript/reference/interfaces/Schemas.LikeWithTweetAuthor.mdx deleted file mode 100644 index 6331b1589..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.LikeWithTweetAuthor.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "LikeWithTweetAuthor" -sidebarTitle: "LikeWithTweetAuthor" -description: "Reference for the Schemas.LikeWithTweetAuthor TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).LikeWithTweetAuthor - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.List.mdx b/xdks/typescript/reference/interfaces/Schemas.List.mdx deleted file mode 100644 index 0e07e4c8f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.List.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "List" -sidebarTitle: "List" -description: "Reference for the Schemas.List TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).List - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest.mdx deleted file mode 100644 index 282b0d490..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "ListAddUserRequest" -sidebarTitle: "ListAddUserRequest" -description: "Reference for the Schemas.ListAddUserRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListAddUserRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.ListCreateRequest.mdx deleted file mode 100644 index a03bb69a3..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListCreateRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ListCreateRequest" -sidebarTitle: "ListCreateRequest" -description: "Reference for the Schemas.ListCreateRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListCreateRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse.mdx deleted file mode 100644 index 4b50000a1..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ListCreateResponse" -sidebarTitle: "ListCreateResponse" -description: "Reference for the Schemas.ListCreateResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse.mdx deleted file mode 100644 index cb378889c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ListDeleteResponse" -sidebarTitle: "ListDeleteResponse" -description: "Reference for the Schemas.ListDeleteResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest.mdx deleted file mode 100644 index 72cae6542..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "ListFollowedRequest" -sidebarTitle: "ListFollowedRequest" -description: "Reference for the Schemas.ListFollowedRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListFollowedRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse.mdx deleted file mode 100644 index cc68f26f2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ListFollowedResponse" -sidebarTitle: "ListFollowedResponse" -description: "Reference for the Schemas.ListFollowedResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListFollowedResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse.mdx deleted file mode 100644 index a1cde7c37..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ListMutateResponse" -sidebarTitle: "ListMutateResponse" -description: "Reference for the Schemas.ListMutateResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListMutateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest.mdx deleted file mode 100644 index f62fe9651..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "ListPinnedRequest" -sidebarTitle: "ListPinnedRequest" -description: "Reference for the Schemas.ListPinnedRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListPinnedRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse.mdx deleted file mode 100644 index 5ec112301..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ListPinnedResponse" -sidebarTitle: "ListPinnedResponse" -description: "Reference for the Schemas.ListPinnedResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListPinnedResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse.mdx deleted file mode 100644 index 6fde3b3cb..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ListUnpinResponse" -sidebarTitle: "ListUnpinResponse" -description: "Reference for the Schemas.ListUnpinResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListUnpinResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest.mdx deleted file mode 100644 index 40e28c342..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ListUpdateRequest" -sidebarTitle: "ListUpdateRequest" -description: "Reference for the Schemas.ListUpdateRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListUpdateRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse.mdx deleted file mode 100644 index 92196bb33..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ListUpdateResponse" -sidebarTitle: "ListUpdateResponse" -description: "Reference for the Schemas.ListUpdateResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ListUpdateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ManagementInfo.mdx b/xdks/typescript/reference/interfaces/Schemas.ManagementInfo.mdx deleted file mode 100644 index 3d86064c2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ManagementInfo.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "ManagementInfo" -sidebarTitle: "ManagementInfo" -description: "Reference for the Schemas.ManagementInfo TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ManagementInfo - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Media.mdx b/xdks/typescript/reference/interfaces/Schemas.Media.mdx deleted file mode 100644 index 8e7d7d47c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Media.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Media" -sidebarTitle: "Media" -description: "Reference for the Schemas.Media TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Media - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics.mdx b/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics.mdx deleted file mode 100644 index 15a7316ca..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MediaAnalytics" -sidebarTitle: "MediaAnalytics" -description: "Reference for the Schemas.MediaAnalytics TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MediaAnalytics - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MediaMetrics.mdx b/xdks/typescript/reference/interfaces/Schemas.MediaMetrics.mdx deleted file mode 100644 index e7c583804..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MediaMetrics.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "MediaMetrics" -sidebarTitle: "MediaMetrics" -description: "Reference for the Schemas.MediaMetrics TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MediaMetrics - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MediaTimestampedMetrics.mdx b/xdks/typescript/reference/interfaces/Schemas.MediaTimestampedMetrics.mdx deleted file mode 100644 index fe6300c7b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MediaTimestampedMetrics.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MediaTimestampedMetrics" -sidebarTitle: "MediaTimestampedMetrics" -description: "Schemas.MediaTimestampedMetrics TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MediaTimestampedMetrics - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse.mdx deleted file mode 100644 index 2abbfe554..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MediaUploadAppendResponse" -sidebarTitle: "MediaUploadAppendResponse" -description: "Schemas.MediaUploadAppendResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MediaUploadAppendResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest.mdx deleted file mode 100644 index 32d13c1a7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "MediaUploadConfigRequest" -sidebarTitle: "MediaUploadConfigRequest" -description: "Schemas.MediaUploadConfigRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MediaUploadConfigRequest - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot.mdx b/xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot.mdx deleted file mode 100644 index 8570f6102..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "MediaUploadRequestOneShot" -sidebarTitle: "MediaUploadRequestOneShot" -description: "Schemas.MediaUploadRequestOneShot TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MediaUploadRequestOneShot - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse.mdx deleted file mode 100644 index 69bb23118..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MediaUploadResponse" -sidebarTitle: "MediaUploadResponse" -description: "Reference for the Schemas.MediaUploadResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MediaUploadResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MentionFields.mdx b/xdks/typescript/reference/interfaces/Schemas.MentionFields.mdx deleted file mode 100644 index 6a4eedb45..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MentionFields.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MentionFields" -sidebarTitle: "MentionFields" -description: "Reference for the Schemas.MentionFields TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MentionFields - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest.mdx deleted file mode 100644 index a5f1dd814..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MetadataCreateRequest" -sidebarTitle: "MetadataCreateRequest" -description: "Reference for the Schemas.MetadataCreateRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MetadataCreateRequest - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse.mdx deleted file mode 100644 index 9b24f9155..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MetadataCreateResponse" -sidebarTitle: "MetadataCreateResponse" -description: "TypeScript XDK `MetadataCreateResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MetadataCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Metrics.mdx b/xdks/typescript/reference/interfaces/Schemas.Metrics.mdx deleted file mode 100644 index d7711ad7e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Metrics.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "Metrics" -sidebarTitle: "Metrics" -description: "Reference for the Schemas.Metrics TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Metrics - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse.mdx deleted file mode 100644 index c155df186..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "MuteUserMutationResponse" -sidebarTitle: "MuteUserMutationResponse" -description: "Schemas.MuteUserMutationResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MuteUserMutationResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.MuteUserRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.MuteUserRequest.mdx deleted file mode 100644 index 615cf226c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.MuteUserRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "MuteUserRequest" -sidebarTitle: "MuteUserRequest" -description: "Reference for the Schemas.MuteUserRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).MuteUserRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.News.mdx b/xdks/typescript/reference/interfaces/Schemas.News.mdx deleted file mode 100644 index 9ac29a418..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.News.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "News" -sidebarTitle: "News" -description: "Reference for the Schemas.News TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).News - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.NewsActivityResponsePayload.mdx b/xdks/typescript/reference/interfaces/Schemas.NewsActivityResponsePayload.mdx deleted file mode 100644 index 39bbde538..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.NewsActivityResponsePayload.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "NewsActivityResponsePayload" -sidebarTitle: "NewsActivityResponsePayload" -description: "Schemas.NewsActivityResponsePayload TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).NewsActivityResponsePayload - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Note.mdx b/xdks/typescript/reference/interfaces/Schemas.Note.mdx deleted file mode 100644 index 09296ffe6..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Note.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Note" -sidebarTitle: "Note" -description: "Reference for the Schemas.Note TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Note - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.NoteInfo.mdx b/xdks/typescript/reference/interfaces/Schemas.NoteInfo.mdx deleted file mode 100644 index a6cfa60dc..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.NoteInfo.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "NoteInfo" -sidebarTitle: "NoteInfo" -description: "Reference for the Schemas.NoteInfo TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).NoteInfo - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.NoteTestResult.mdx b/xdks/typescript/reference/interfaces/Schemas.NoteTestResult.mdx deleted file mode 100644 index 6649608bd..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.NoteTestResult.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "NoteTestResult" -sidebarTitle: "NoteTestResult" -description: "Reference for the Schemas.NoteTestResult TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).NoteTestResult - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend.mdx b/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend.mdx deleted file mode 100644 index cc04e42c8..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "PersonalizedTrend" -sidebarTitle: "PersonalizedTrend" -description: "TypeScript XDK reference for the `PersonalizedTrend` interface, listing each field, its type, and whether it's required in the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PersonalizedTrend - -zedTrend#category) -- [postCount](/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend#postcount) -- [trendName](/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend#trendname) -- [trendingSince](/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend#trendingsince) - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Place.mdx b/xdks/typescript/reference/interfaces/Schemas.Place.mdx deleted file mode 100644 index 8dcf35a54..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Place.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "Place" -sidebarTitle: "Place" -description: "Reference for the Schemas.Place TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Place - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidAccount.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidAccount.mdx deleted file mode 100644 index 1f7fef22c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidAccount.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "PlaidAccount" -sidebarTitle: "PlaidAccount" -description: "Reference for the Schemas.PlaidAccount TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidAccount - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidAccountContact.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidAccountContact.mdx deleted file mode 100644 index c8eb68824..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidAccountContact.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "PlaidAccountContact" -sidebarTitle: "PlaidAccountContact" -description: "Reference for the Schemas.PlaidAccountContact TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidAccountContact - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidAccountPaymentNetwork.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidAccountPaymentNetwork.mdx deleted file mode 100644 index d263868f1..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidAccountPaymentNetwork.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "PlaidAccountPaymentNetwork" -sidebarTitle: "PlaidAccountPaymentNetwork" -description: "Schemas.PlaidAccountPaymentNetwork TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidAccountPaymentNetwork - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidAccountTransaction.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidAccountTransaction.mdx deleted file mode 100644 index cdabd52cf..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidAccountTransaction.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "PlaidAccountTransaction" -sidebarTitle: "PlaidAccountTransaction" -description: "Schemas.PlaidAccountTransaction TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidAccountTransaction - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidAddress.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidAddress.mdx deleted file mode 100644 index 0bb297d47..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidAddress.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "PlaidAddress" -sidebarTitle: "PlaidAddress" -description: "Reference for the Schemas.PlaidAddress TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidAddress - -## Properties - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidCurrency.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidCurrency.mdx deleted file mode 100644 index 81d10798f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidCurrency.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "PlaidCurrency" -sidebarTitle: "PlaidCurrency" -description: "Reference for the Schemas.PlaidCurrency TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidCurrency - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidCustomer.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidCustomer.mdx deleted file mode 100644 index 703df3388..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidCustomer.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "PlaidCustomer" -sidebarTitle: "PlaidCustomer" -description: "Reference for the Schemas.PlaidCustomer TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidCustomer - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidName.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidName.mdx deleted file mode 100644 index b72ee8b89..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidName.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "PlaidName" -sidebarTitle: "PlaidName" -description: "Reference for the Schemas.PlaidName TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidName - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PlaidTelephone.mdx b/xdks/typescript/reference/interfaces/Schemas.PlaidTelephone.mdx deleted file mode 100644 index addf82588..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PlaidTelephone.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "PlaidTelephone" -sidebarTitle: "PlaidTelephone" -description: "Reference for the Schemas.PlaidTelephone TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PlaidTelephone - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Point.mdx b/xdks/typescript/reference/interfaces/Schemas.Point.mdx deleted file mode 100644 index 96debbdab..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Point.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Point" -sidebarTitle: "Point" -description: "Reference for the Schemas.Point TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Point - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Poll.mdx b/xdks/typescript/reference/interfaces/Schemas.Poll.mdx deleted file mode 100644 index 2d59dab52..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Poll.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Poll" -sidebarTitle: "Poll" -description: "Reference for the Schemas.Poll TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Poll - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PollOption.mdx b/xdks/typescript/reference/interfaces/Schemas.PollOption.mdx deleted file mode 100644 index de7ae0faa..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PollOption.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "PollOption" -sidebarTitle: "PollOption" -description: "Reference for the Schemas.PollOption TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PollOption - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.PreviewImage.mdx b/xdks/typescript/reference/interfaces/Schemas.PreviewImage.mdx deleted file mode 100644 index 34ec2f94d..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.PreviewImage.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "PreviewImage" -sidebarTitle: "PreviewImage" -description: "Reference for the Schemas.PreviewImage TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).PreviewImage - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Problem.mdx b/xdks/typescript/reference/interfaces/Schemas.Problem.mdx deleted file mode 100644 index e8a90fcc2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Problem.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "Problem" -sidebarTitle: "Problem" -description: "Reference for the Schemas.Problem TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Problem - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ProcessingInfo.mdx b/xdks/typescript/reference/interfaces/Schemas.ProcessingInfo.mdx deleted file mode 100644 index 86bbcffab..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ProcessingInfo.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "ProcessingInfo" -sidebarTitle: "ProcessingInfo" -description: "Reference for the Schemas.ProcessingInfo TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ProcessingInfo - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ProfileUpdateActivityResponsePayload.mdx b/xdks/typescript/reference/interfaces/Schemas.ProfileUpdateActivityResponsePayload.mdx deleted file mode 100644 index a7cf8a0fb..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ProfileUpdateActivityResponsePayload.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ProfileUpdateActivityResponsePayload" -sidebarTitle: "ProfileUpdateActivityResponsePayload" -description: "TypeScript XDK `ProfileUpdateActivityResponsePayload` interface reference — webhook payload schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ProfileUpdateActivityResponsePayload - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse.mdx deleted file mode 100644 index c2941fd52..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "ReplayJobCreateResponse" -sidebarTitle: "ReplayJobCreateResponse" -description: "Schemas.ReplayJobCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).ReplayJobCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Rule.mdx b/xdks/typescript/reference/interfaces/Schemas.Rule.mdx deleted file mode 100644 index 654b31d0f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Rule.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Rule" -sidebarTitle: "Rule" -description: "Reference for the Schemas.Rule TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Rule - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.RuleNoId.mdx b/xdks/typescript/reference/interfaces/Schemas.RuleNoId.mdx deleted file mode 100644 index 69ec58bc2..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.RuleNoId.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "RuleNoId" -sidebarTitle: "RuleNoId" -description: "Reference for the Schemas.RuleNoId TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).RuleNoId - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.RulesCount.mdx b/xdks/typescript/reference/interfaces/Schemas.RulesCount.mdx deleted file mode 100644 index 370d3ba6c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.RulesCount.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "RulesCount" -sidebarTitle: "RulesCount" -description: "Reference for the Schemas.RulesCount TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).RulesCount - -## Properties - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse.mdx deleted file mode 100644 index eec9ed043..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "RulesLookupResponse" -sidebarTitle: "RulesLookupResponse" -description: "Reference for the Schemas.RulesLookupResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).RulesLookupResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.RulesResponseMetadata.mdx b/xdks/typescript/reference/interfaces/Schemas.RulesResponseMetadata.mdx deleted file mode 100644 index f675d7a43..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.RulesResponseMetadata.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "RulesResponseMetadata" -sidebarTitle: "RulesResponseMetadata" -description: "Reference for the Schemas.RulesResponseMetadata TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).RulesResponseMetadata - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SearchCount.mdx b/xdks/typescript/reference/interfaces/Schemas.SearchCount.mdx deleted file mode 100644 index ad7932a74..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SearchCount.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "SearchCount" -sidebarTitle: "SearchCount" -description: "Reference for the Schemas.SearchCount TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SearchCount - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SensitiveMediaWarning.mdx b/xdks/typescript/reference/interfaces/Schemas.SensitiveMediaWarning.mdx deleted file mode 100644 index 76dd35064..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SensitiveMediaWarning.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "SensitiveMediaWarning" -sidebarTitle: "SensitiveMediaWarning" -description: "Reference for the Schemas.SensitiveMediaWarning TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SensitiveMediaWarning - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SharedInfo.mdx b/xdks/typescript/reference/interfaces/Schemas.SharedInfo.mdx deleted file mode 100644 index 7d1f0f583..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SharedInfo.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "SharedInfo" -sidebarTitle: "SharedInfo" -description: "Reference for the Schemas.SharedInfo TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SharedInfo - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Space.mdx b/xdks/typescript/reference/interfaces/Schemas.Space.mdx deleted file mode 100644 index 4770b8021..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Space.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "Space" -sidebarTitle: "Space" -description: "Reference for the Schemas.Space TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Space - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Sticker.mdx b/xdks/typescript/reference/interfaces/Schemas.Sticker.mdx deleted file mode 100644 index f6dd35092..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Sticker.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: "Sticker" -sidebarTitle: "Sticker" -description: "Reference for the Schemas.Sticker TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Sticker - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.StickerInfo.mdx b/xdks/typescript/reference/interfaces/Schemas.StickerInfo.mdx deleted file mode 100644 index ab27085dc..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.StickerInfo.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "StickerInfo" -sidebarTitle: "StickerInfo" -description: "Reference for the Schemas.StickerInfo TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).StickerInfo - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2.mdx b/xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2.mdx deleted file mode 100644 index 1e5751802..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "StreamingLikeResponseV2" -sidebarTitle: "StreamingLikeResponseV2" -description: "Schemas.StreamingLikeResponseV2 TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).StreamingLikeResponseV2 - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse.mdx deleted file mode 100644 index 25264bb85..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "StreamingTweetResponse" -sidebarTitle: "StreamingTweetResponse" -description: "TypeScript XDK `StreamingTweetResponse` interface reference — response schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).StreamingTweetResponse - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse.mdx deleted file mode 100644 index c23f4926e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "SubscriptionsCountGetResponse" -sidebarTitle: "SubscriptionsCountGetResponse" -description: "Schemas.SubscriptionsCountGetResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubscriptionsCountGetResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse.mdx deleted file mode 100644 index d209182e7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "SubscriptionsCreateResponse" -sidebarTitle: "SubscriptionsCreateResponse" -description: "Schemas.SubscriptionsCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubscriptionsCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse.mdx deleted file mode 100644 index dde0453a3..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "SubscriptionsDeleteResponse" -sidebarTitle: "SubscriptionsDeleteResponse" -description: "Schemas.SubscriptionsDeleteResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubscriptionsDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse.mdx deleted file mode 100644 index cadb20f11..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "SubscriptionsGetResponse" -sidebarTitle: "SubscriptionsGetResponse" -description: "Schemas.SubscriptionsGetResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubscriptionsGetResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse.mdx deleted file mode 100644 index e06e8b5ab..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "SubscriptionsListGetResponse" -sidebarTitle: "SubscriptionsListGetResponse" -description: "Schemas.SubscriptionsListGetResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubscriptionsListGetResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Subtitles.mdx b/xdks/typescript/reference/interfaces/Schemas.Subtitles.mdx deleted file mode 100644 index 2d586fe9b..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Subtitles.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Subtitles" -sidebarTitle: "Subtitles" -description: "Reference for the Schemas.Subtitles TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Subtitles - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest.mdx deleted file mode 100644 index 5342c0f90..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "SubtitlesCreateRequest" -sidebarTitle: "SubtitlesCreateRequest" -description: "TypeScript XDK `SubtitlesCreateRequest` interface reference — request schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubtitlesCreateRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse.mdx deleted file mode 100644 index 680e5fce8..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "SubtitlesCreateResponse" -sidebarTitle: "SubtitlesCreateResponse" -description: "Schemas.SubtitlesCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubtitlesCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest.mdx deleted file mode 100644 index 3fc5b5671..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "SubtitlesDeleteRequest" -sidebarTitle: "SubtitlesDeleteRequest" -description: "TypeScript XDK `SubtitlesDeleteRequest` interface reference — request schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubtitlesDeleteRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse.mdx deleted file mode 100644 index 2c2dcf766..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "SubtitlesDeleteResponse" -sidebarTitle: "SubtitlesDeleteResponse" -description: "Schemas.SubtitlesDeleteResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).SubtitlesDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TimestampedMetrics.mdx b/xdks/typescript/reference/interfaces/Schemas.TimestampedMetrics.mdx deleted file mode 100644 index dc4230084..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TimestampedMetrics.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "TimestampedMetrics" -sidebarTitle: "TimestampedMetrics" -description: "Reference for the Schemas.TimestampedMetrics TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TimestampedMetrics - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Topic.mdx b/xdks/typescript/reference/interfaces/Schemas.Topic.mdx deleted file mode 100644 index ea05d7761..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Topic.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Topic" -sidebarTitle: "Topic" -description: "Reference for the Schemas.Topic TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Topic - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Trend.mdx b/xdks/typescript/reference/interfaces/Schemas.Trend.mdx deleted file mode 100644 index 7cb8ebc04..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Trend.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Trend" -sidebarTitle: "Trend" -description: "Reference for the Schemas.Trend TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Trend - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Tweet.mdx b/xdks/typescript/reference/interfaces/Schemas.Tweet.mdx deleted file mode 100644 index 5330ef709..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Tweet.mdx +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: "Tweet" -sidebarTitle: "Tweet" -description: "Reference for the Schemas.Tweet TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Tweet - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetComplianceSchema.mdx deleted file mode 100644 index c8264f462..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetComplianceSchema.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "TweetComplianceSchema" -sidebarTitle: "TweetComplianceSchema" -description: "Reference for the Schemas.TweetComplianceSchema TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetComplianceSchema - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest.mdx deleted file mode 100644 index 0acafdec9..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "TweetCreateRequest" -sidebarTitle: "TweetCreateRequest" -description: "Reference for the Schemas.TweetCreateRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetCreateRequest - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - -Whether this Post is a paid partnership. When true, the Post will be labeled as a paid promotion. - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse.mdx deleted file mode 100644 index 2dc0468ee..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "TweetCreateResponse" -sidebarTitle: "TweetCreateResponse" -description: "Reference for the Schemas.TweetCreateResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetDeleteComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetDeleteComplianceSchema.mdx deleted file mode 100644 index 0870eacf3..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetDeleteComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetDeleteComplianceSchema" -sidebarTitle: "TweetDeleteComplianceSchema" -description: "Schemas.TweetDeleteComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetDeleteComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse.mdx deleted file mode 100644 index 86d8c5dd3..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "TweetDeleteResponse" -sidebarTitle: "TweetDeleteResponse" -description: "Reference for the Schemas.TweetDeleteResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetDropComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetDropComplianceSchema.mdx deleted file mode 100644 index d4b4a77eb..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetDropComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetDropComplianceSchema" -sidebarTitle: "TweetDropComplianceSchema" -description: "Schemas.TweetDropComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetDropComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceObjectSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceObjectSchema.mdx deleted file mode 100644 index 03c065497..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceObjectSchema.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "TweetEditComplianceObjectSchema" -sidebarTitle: "TweetEditComplianceObjectSchema" -description: "TypeScript XDK `TweetEditComplianceObjectSchema` interface reference — compliance schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetEditComplianceObjectSchema - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceSchema.mdx deleted file mode 100644 index 38c4e77a8..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetEditComplianceSchema" -sidebarTitle: "TweetEditComplianceSchema" -description: "Schemas.TweetEditComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetEditComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetHideRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetHideRequest.mdx deleted file mode 100644 index bcfc3d12f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetHideRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetHideRequest" -sidebarTitle: "TweetHideRequest" -description: "Reference for the Schemas.TweetHideRequest TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetHideRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse.mdx deleted file mode 100644 index 0b5f0d646..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetHideResponse" -sidebarTitle: "TweetHideResponse" -description: "Reference for the Schemas.TweetHideResponse TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetHideResponse - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetNotice.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetNotice.mdx deleted file mode 100644 index e204fe2e7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetNotice.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "TweetNotice" -sidebarTitle: "TweetNotice" -description: "Reference for the Schemas.TweetNotice TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetNotice - -## Properties - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetNoticeSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetNoticeSchema.mdx deleted file mode 100644 index 5fd57ac38..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetNoticeSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetNoticeSchema" -sidebarTitle: "TweetNoticeSchema" -description: "Reference for the Schemas.TweetNoticeSchema TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetNoticeSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetTakedownComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetTakedownComplianceSchema.mdx deleted file mode 100644 index 306c650b5..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetTakedownComplianceSchema.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "TweetTakedownComplianceSchema" -sidebarTitle: "TweetTakedownComplianceSchema" -description: "Schemas.TweetTakedownComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetTakedownComplianceSchema - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetUndropComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetUndropComplianceSchema.mdx deleted file mode 100644 index ace731dd8..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetUndropComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetUndropComplianceSchema" -sidebarTitle: "TweetUndropComplianceSchema" -description: "Schemas.TweetUndropComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetUndropComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetUnviewable.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetUnviewable.mdx deleted file mode 100644 index a3b1981b7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetUnviewable.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "TweetUnviewable" -sidebarTitle: "TweetUnviewable" -description: "Reference for the Schemas.TweetUnviewable TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetUnviewable - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetUnviewableSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetUnviewableSchema.mdx deleted file mode 100644 index 4a7d499f4..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetUnviewableSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetUnviewableSchema" -sidebarTitle: "TweetUnviewableSchema" -description: "Reference for the Schemas.TweetUnviewableSchema TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetUnviewableSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetWithheld.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetWithheld.mdx deleted file mode 100644 index 33338f0de..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetWithheld.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "TweetWithheld" -sidebarTitle: "TweetWithheld" -description: "Reference for the Schemas.TweetWithheld TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetWithheld - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.TweetWithheldComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.TweetWithheldComplianceSchema.mdx deleted file mode 100644 index 92332ebc8..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.TweetWithheldComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "TweetWithheldComplianceSchema" -sidebarTitle: "TweetWithheldComplianceSchema" -description: "Schemas.TweetWithheldComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).TweetWithheldComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UnlikeComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UnlikeComplianceSchema.mdx deleted file mode 100644 index 8de2725a7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UnlikeComplianceSchema.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UnlikeComplianceSchema" -sidebarTitle: "UnlikeComplianceSchema" -description: "TypeScript XDK `UnlikeComplianceSchema` interface reference — compliance schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UnlikeComplianceSchema - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UploadSource.mdx b/xdks/typescript/reference/interfaces/Schemas.UploadSource.mdx deleted file mode 100644 index cf84559c0..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UploadSource.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UploadSource" -sidebarTitle: "UploadSource" -description: "Reference for the Schemas.UploadSource TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UploadSource - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UrlFields.mdx b/xdks/typescript/reference/interfaces/Schemas.UrlFields.mdx deleted file mode 100644 index 6875e26bc..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UrlFields.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "UrlFields" -sidebarTitle: "UrlFields" -description: "Reference for the Schemas.UrlFields TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UrlFields - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UrlImage.mdx b/xdks/typescript/reference/interfaces/Schemas.UrlImage.mdx deleted file mode 100644 index 24e2be036..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UrlImage.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "UrlImage" -sidebarTitle: "UrlImage" -description: "Reference for the Schemas.UrlImage TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UrlImage - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Usage.mdx b/xdks/typescript/reference/interfaces/Schemas.Usage.mdx deleted file mode 100644 index c61f08b3e..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Usage.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Usage" -sidebarTitle: "Usage" -description: "Reference for the Schemas.Usage TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Usage - -## Properties - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsageFields.mdx b/xdks/typescript/reference/interfaces/Schemas.UsageFields.mdx deleted file mode 100644 index eab5747e7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsageFields.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsageFields" -sidebarTitle: "UsageFields" -description: "Reference for the Schemas.UsageFields TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsageFields - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.User.mdx b/xdks/typescript/reference/interfaces/Schemas.User.mdx deleted file mode 100644 index df5fe3ff6..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.User.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "User" -sidebarTitle: "User" -description: "Reference for the Schemas.User TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).User - -## Properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserComplianceSchema.mdx deleted file mode 100644 index d78a7c6ae..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserComplianceSchema.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UserComplianceSchema" -sidebarTitle: "UserComplianceSchema" -description: "Reference for the Schemas.UserComplianceSchema TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserComplianceSchema - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserDeleteComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserDeleteComplianceSchema.mdx deleted file mode 100644 index d340ccf9c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserDeleteComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserDeleteComplianceSchema" -sidebarTitle: "UserDeleteComplianceSchema" -description: "Schemas.UserDeleteComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserDeleteComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationComplianceSchema.mdx deleted file mode 100644 index 60ece4794..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserProfileModificationComplianceSchema" -sidebarTitle: "UserProfileModificationComplianceSchema" -description: "TypeScript XDK `UserProfileModificationComplianceSchema` interface reference — compliance schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserProfileModificationComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationObjectSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationObjectSchema.mdx deleted file mode 100644 index 7f766011f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationObjectSchema.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "UserProfileModificationObjectSchema" -sidebarTitle: "UserProfileModificationObjectSchema" -description: "TypeScript XDK `UserProfileModificationObjectSchema` interface reference — schema with fields, types, and required flags for the X API v2 SDK." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserProfileModificationObjectSchema - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserProtectComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserProtectComplianceSchema.mdx deleted file mode 100644 index ca5a099c5..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserProtectComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserProtectComplianceSchema" -sidebarTitle: "UserProtectComplianceSchema" -description: "Schemas.UserProtectComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserProtectComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoObjectSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoObjectSchema.mdx deleted file mode 100644 index c1c3885cf..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoObjectSchema.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "UserScrubGeoObjectSchema" -sidebarTitle: "UserScrubGeoObjectSchema" -description: "Schemas.UserScrubGeoObjectSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserScrubGeoObjectSchema - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoSchema.mdx deleted file mode 100644 index 4e4e048ef..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserScrubGeoSchema" -sidebarTitle: "UserScrubGeoSchema" -description: "Reference for the Schemas.UserScrubGeoSchema TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserScrubGeoSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserSuspendComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserSuspendComplianceSchema.mdx deleted file mode 100644 index d4b668b30..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserSuspendComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserSuspendComplianceSchema" -sidebarTitle: "UserSuspendComplianceSchema" -description: "Schemas.UserSuspendComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserSuspendComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserTakedownComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserTakedownComplianceSchema.mdx deleted file mode 100644 index f3d88db6a..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserTakedownComplianceSchema.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "UserTakedownComplianceSchema" -sidebarTitle: "UserTakedownComplianceSchema" -description: "Schemas.UserTakedownComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserTakedownComplianceSchema - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserUndeleteComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserUndeleteComplianceSchema.mdx deleted file mode 100644 index 216493bb0..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserUndeleteComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserUndeleteComplianceSchema" -sidebarTitle: "UserUndeleteComplianceSchema" -description: "Schemas.UserUndeleteComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserUndeleteComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserUnprotectComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserUnprotectComplianceSchema.mdx deleted file mode 100644 index 69b301532..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserUnprotectComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserUnprotectComplianceSchema" -sidebarTitle: "UserUnprotectComplianceSchema" -description: "Schemas.UserUnprotectComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserUnprotectComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserUnsuspendComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserUnsuspendComplianceSchema.mdx deleted file mode 100644 index 752692e1d..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserUnsuspendComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserUnsuspendComplianceSchema" -sidebarTitle: "UserUnsuspendComplianceSchema" -description: "Schemas.UserUnsuspendComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserUnsuspendComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserWithheld.mdx b/xdks/typescript/reference/interfaces/Schemas.UserWithheld.mdx deleted file mode 100644 index 50063b1ab..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserWithheld.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UserWithheld" -sidebarTitle: "UserWithheld" -description: "Reference for the Schemas.UserWithheld TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserWithheld - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UserWithheldComplianceSchema.mdx b/xdks/typescript/reference/interfaces/Schemas.UserWithheldComplianceSchema.mdx deleted file mode 100644 index cc56e5d20..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UserWithheldComplianceSchema.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UserWithheldComplianceSchema" -sidebarTitle: "UserWithheldComplianceSchema" -description: "Schemas.UserWithheldComplianceSchema TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UserWithheldComplianceSchema - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse.mdx deleted file mode 100644 index 9519ec4d5..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersDMBlockCreateResponse" -sidebarTitle: "UsersDMBlockCreateResponse" -description: "Schemas.UsersDMBlockCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersDMBlockCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse.mdx deleted file mode 100644 index 324819f05..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersDMUnBlockCreateResponse" -sidebarTitle: "UsersDMUnBlockCreateResponse" -description: "Schemas.UsersDMUnBlockCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersDMUnBlockCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest.mdx deleted file mode 100644 index 98b4f425d..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UsersFollowingCreateRequest" -sidebarTitle: "UsersFollowingCreateRequest" -description: "Schemas.UsersFollowingCreateRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersFollowingCreateRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse.mdx deleted file mode 100644 index 885718c40..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersFollowingCreateResponse" -sidebarTitle: "UsersFollowingCreateResponse" -description: "Schemas.UsersFollowingCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersFollowingCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse.mdx deleted file mode 100644 index 9c7c85997..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersFollowingDeleteResponse" -sidebarTitle: "UsersFollowingDeleteResponse" -description: "Schemas.UsersFollowingDeleteResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersFollowingDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest.mdx deleted file mode 100644 index e4f367389..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UsersLikesCreateRequest" -sidebarTitle: "UsersLikesCreateRequest" -description: "Schemas.UsersLikesCreateRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersLikesCreateRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse.mdx deleted file mode 100644 index bcddf09be..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersLikesCreateResponse" -sidebarTitle: "UsersLikesCreateResponse" -description: "Schemas.UsersLikesCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersLikesCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse.mdx deleted file mode 100644 index db480c45f..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersLikesDeleteResponse" -sidebarTitle: "UsersLikesDeleteResponse" -description: "Schemas.UsersLikesDeleteResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersLikesDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest.mdx deleted file mode 100644 index fc44dae63..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "UsersRetweetsCreateRequest" -sidebarTitle: "UsersRetweetsCreateRequest" -description: "Schemas.UsersRetweetsCreateRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersRetweetsCreateRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse.mdx deleted file mode 100644 index 7dda244be..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersRetweetsCreateResponse" -sidebarTitle: "UsersRetweetsCreateResponse" -description: "Schemas.UsersRetweetsCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersRetweetsCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse.mdx deleted file mode 100644 index 3d706f902..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "UsersRetweetsDeleteResponse" -sidebarTitle: "UsersRetweetsDeleteResponse" -description: "Schemas.UsersRetweetsDeleteResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).UsersRetweetsDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.Variant.mdx b/xdks/typescript/reference/interfaces/Schemas.Variant.mdx deleted file mode 100644 index 943795be5..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.Variant.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Variant" -sidebarTitle: "Variant" -description: "Reference for the Schemas.Variant TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response payloads." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).Variant - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookConfig.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookConfig.mdx deleted file mode 100644 index 39cb5fa4c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookConfig.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "WebhookConfig" -sidebarTitle: "WebhookConfig" -description: "Reference for the Schemas.WebhookConfig TypeScript interface in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookConfig - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest.mdx deleted file mode 100644 index a3df36a0d..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "WebhookConfigCreateRequest" -sidebarTitle: "WebhookConfigCreateRequest" -description: "Schemas.WebhookConfigCreateRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookConfigCreateRequest - -## Properties - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse.mdx deleted file mode 100644 index 1bd826a25..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "WebhookConfigCreateResponse" -sidebarTitle: "WebhookConfigCreateResponse" -description: "Schemas.WebhookConfigCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookConfigCreateResponse - -## Properties - - - - - - - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse.mdx deleted file mode 100644 index 467524931..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "WebhookConfigDeleteResponse" -sidebarTitle: "WebhookConfigDeleteResponse" -description: "Schemas.WebhookConfigDeleteResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookConfigDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse.mdx deleted file mode 100644 index 263a0f823..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "WebhookConfigPutResponse" -sidebarTitle: "WebhookConfigPutResponse" -description: "Schemas.WebhookConfigPutResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookConfigPutResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse.mdx deleted file mode 100644 index 26f84d101..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "WebhookLinksCreateResponse" -sidebarTitle: "WebhookLinksCreateResponse" -description: "Schemas.WebhookLinksCreateResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookLinksCreateResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse.mdx deleted file mode 100644 index ca92a7ef7..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "WebhookLinksDeleteResponse" -sidebarTitle: "WebhookLinksDeleteResponse" -description: "Schemas.WebhookLinksDeleteResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookLinksDeleteResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse.mdx deleted file mode 100644 index cdb45917c..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse.mdx +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "WebhookLinksGetResponse" -sidebarTitle: "WebhookLinksGetResponse" -description: "Schemas.WebhookLinksGetResponse TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookLinksGetResponse - -## Properties - - - - - - diff --git a/xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest.mdx b/xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest.mdx deleted file mode 100644 index cea10c939..000000000 --- a/xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "WebhookReplayCreateRequest" -sidebarTitle: "WebhookReplayCreateRequest" -description: "Schemas.WebhookReplayCreateRequest TypeScript interface reference in the X API SDK. Field definitions, types, and properties for X API request or response." ---- - -[Schemas](/xdks/typescript/reference/modules/Schemas).WebhookReplayCreateRequest - -## Properties - - - - - - - - - diff --git a/xdks/typescript/reference/modules.mdx b/xdks/typescript/reference/modules.mdx deleted file mode 100644 index cf5540125..000000000 --- a/xdks/typescript/reference/modules.mdx +++ /dev/null @@ -1,404 +0,0 @@ ---- -title: "X API SDK v2.152 - v0.4.0" -description: "Reference for the modules module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." -sidebarTitle: "API Reference" ---- - - - - - - - - [ClientConfig](/xdks/typescript/reference/interfaces/ClientConfig) - - - - - [HttpClientRequestOptions](/xdks/typescript/reference/interfaces/HttpClientRequestOptions) - - [HttpResponse](/xdks/typescript/reference/interfaces/HttpResponse) - - - - - [ApiResponse](/xdks/typescript/reference/interfaces/ApiResponse) - - [PaginatedResponse](/xdks/typescript/reference/interfaces/PaginatedResponse) - - [PaginationMeta](/xdks/typescript/reference/interfaces/PaginationMeta) - - [RequestOptions](/xdks/typescript/reference/interfaces/RequestOptions) - - [Schemas.ActivityStreamingResponse](/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse) - - [Schemas.ActivitySubscription](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscription) - - [Schemas.ActivitySubscriptionCreateRequest](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest) - - [Schemas.ActivitySubscriptionCreateResponse](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse) - - [Schemas.ActivitySubscriptionDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse) - - [Schemas.ActivitySubscriptionFilter](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionFilter) - - [Schemas.ActivitySubscriptionGetResponse](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse) - - [Schemas.ActivitySubscriptionUpdateRequest](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest) - - [Schemas.ActivitySubscriptionUpdateResponse](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse) - - [Schemas.AddOrDeleteRulesResponse](/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse) - - [Schemas.AddRulesRequest](/xdks/typescript/reference/interfaces/Schemas.AddRulesRequest) - - [Schemas.AllowDownloadStatus](/xdks/typescript/reference/interfaces/Schemas.AllowDownloadStatus) - - [Schemas.AltText](/xdks/typescript/reference/interfaces/Schemas.AltText) - - [Schemas.Analytics](/xdks/typescript/reference/interfaces/Schemas.Analytics) - - [Schemas.AppRulesCount](/xdks/typescript/reference/interfaces/Schemas.AppRulesCount) - - [Schemas.AudiencePolicy](/xdks/typescript/reference/interfaces/Schemas.AudiencePolicy) - - [Schemas.BookmarkAddRequest](/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest) - - [Schemas.BookmarkFolderPostsResponse](/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse) - - [Schemas.BookmarkFoldersResponse](/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse) - - [Schemas.BookmarkMutationResponse](/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse) - - [Schemas.CashtagFields](/xdks/typescript/reference/interfaces/Schemas.CashtagFields) - - [Schemas.ClientAppUsage](/xdks/typescript/reference/interfaces/Schemas.ClientAppUsage) - - [Schemas.Community](/xdks/typescript/reference/interfaces/Schemas.Community) - - [Schemas.ComplianceJob](/xdks/typescript/reference/interfaces/Schemas.ComplianceJob) - - [Schemas.Connection](/xdks/typescript/reference/interfaces/Schemas.Connection) - - [Schemas.ContentExpiration](/xdks/typescript/reference/interfaces/Schemas.ContentExpiration) - - [Schemas.ContextAnnotation](/xdks/typescript/reference/interfaces/Schemas.ContextAnnotation) - - [Schemas.ContextAnnotationDomainFields](/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationDomainFields) - - [Schemas.ContextAnnotationEntityFields](/xdks/typescript/reference/interfaces/Schemas.ContextAnnotationEntityFields) - - [Schemas.CreateAttachmentsMessageRequest](/xdks/typescript/reference/interfaces/Schemas.CreateAttachmentsMessageRequest) - - [Schemas.CreateComplianceJobRequest](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest) - - [Schemas.CreateComplianceJobResponse](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse) - - [Schemas.CreateDmConversationRequest](/xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest) - - [Schemas.CreateDmEventResponse](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse) - - [Schemas.CreateNoteRequest](/xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest) - - [Schemas.CreateNoteResponse](/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse) - - [Schemas.CreateTextMessageRequest](/xdks/typescript/reference/interfaces/Schemas.CreateTextMessageRequest) - - [Schemas.DeleteDmResponse](/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse) - - [Schemas.DeleteNoteResponse](/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse) - - [Schemas.DeleteRulesRequest](/xdks/typescript/reference/interfaces/Schemas.DeleteRulesRequest) - - [Schemas.DmEvent](/xdks/typescript/reference/interfaces/Schemas.DmEvent) - - [Schemas.DmMediaAttachment](/xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment) - - [Schemas.DomainRestrictions](/xdks/typescript/reference/interfaces/Schemas.DomainRestrictions) - - [Schemas.Engagement](/xdks/typescript/reference/interfaces/Schemas.Engagement) - - [Schemas.EntityIndicesInclusiveExclusive](/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveExclusive) - - [Schemas.EntityIndicesInclusiveInclusive](/xdks/typescript/reference/interfaces/Schemas.EntityIndicesInclusiveInclusive) - - [Schemas.Error](/xdks/typescript/reference/interfaces/Schemas.Error) - - [Schemas.EvaluateNoteRequest](/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest) - - [Schemas.EvaluateNoteResponse](/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse) - - [Schemas.Expansions](/xdks/typescript/reference/interfaces/Schemas.Expansions) - - [Schemas.FilteredStreamingTweetResponse](/xdks/typescript/reference/interfaces/Schemas.FilteredStreamingTweetResponse) - - [Schemas.FollowActivityResponsePayload](/xdks/typescript/reference/interfaces/Schemas.FollowActivityResponsePayload) - - [Schemas.FoundMediaOrigin](/xdks/typescript/reference/interfaces/Schemas.FoundMediaOrigin) - - [Schemas.FullTextEntities](/xdks/typescript/reference/interfaces/Schemas.FullTextEntities) - - [Schemas.Geo](/xdks/typescript/reference/interfaces/Schemas.Geo) - - [Schemas.Get2CommunitiesIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse) - - [Schemas.Get2CommunitiesSearchResponse](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse) - - [Schemas.Get2ComplianceJobsIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse) - - [Schemas.Get2ComplianceJobsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse) - - [Schemas.Get2ConnectionsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse) - - [Schemas.Get2DmConversationsIdDmEventsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse) - - [Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse) - - [Schemas.Get2DmEventsEventIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse) - - [Schemas.Get2DmEventsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse) - - [Schemas.Get2FdxAccountsAccountidContactResponse](/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidContactResponse) - - [Schemas.Get2FdxAccountsAccountidPayment_networksResponse](/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidPayment_networksResponse) - - [Schemas.Get2FdxAccountsAccountidResponse](/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidResponse) - - [Schemas.Get2FdxAccountsAccountidTransactionsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2FdxAccountsAccountidTransactionsResponse) - - [Schemas.Get2FdxCustomersCurrentResponse](/xdks/typescript/reference/interfaces/Schemas.Get2FdxCustomersCurrentResponse) - - [Schemas.Get2Insights28hrResponse](/xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse) - - [Schemas.Get2InsightsHistoricalResponse](/xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse) - - [Schemas.Get2LikesFirehoseStreamResponse](/xdks/typescript/reference/interfaces/Schemas.Get2LikesFirehoseStreamResponse) - - [Schemas.Get2LikesSample10StreamResponse](/xdks/typescript/reference/interfaces/Schemas.Get2LikesSample10StreamResponse) - - [Schemas.Get2ListsIdFollowersResponse](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse) - - [Schemas.Get2ListsIdMembersResponse](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse) - - [Schemas.Get2ListsIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse) - - [Schemas.Get2ListsIdTweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse) - - [Schemas.Get2MediaAnalyticsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2MediaAnalyticsResponse) - - [Schemas.Get2MediaMediaKeyResponse](/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse) - - [Schemas.Get2MediaResponse](/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse) - - [Schemas.Get2NewsIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse) - - [Schemas.Get2NewsSearchResponse](/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse) - - [Schemas.Get2NotesSearchNotesWrittenResponse](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse) - - [Schemas.Get2NotesSearchPostsEligibleForNotesResponse](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse) - - [Schemas.Get2SpacesByCreatorIdsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse) - - [Schemas.Get2SpacesIdBuyersResponse](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse) - - [Schemas.Get2SpacesIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse) - - [Schemas.Get2SpacesIdTweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse) - - [Schemas.Get2SpacesResponse](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse) - - [Schemas.Get2SpacesSearchResponse](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse) - - [Schemas.Get2TrendsByWoeidWoeidResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse) - - [Schemas.Get2TweetsAnalyticsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsAnalyticsResponse) - - [Schemas.Get2TweetsCountsAllResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse) - - [Schemas.Get2TweetsCountsRecentResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse) - - [Schemas.Get2TweetsFirehoseStreamLangEnResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangEnResponse) - - [Schemas.Get2TweetsFirehoseStreamLangJaResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangJaResponse) - - [Schemas.Get2TweetsFirehoseStreamLangKoResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangKoResponse) - - [Schemas.Get2TweetsFirehoseStreamLangPtResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamLangPtResponse) - - [Schemas.Get2TweetsFirehoseStreamResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsFirehoseStreamResponse) - - [Schemas.Get2TweetsIdLikingUsersResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse) - - [Schemas.Get2TweetsIdQuoteTweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse) - - [Schemas.Get2TweetsIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse) - - [Schemas.Get2TweetsIdRetweetedByResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse) - - [Schemas.Get2TweetsIdRetweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse) - - [Schemas.Get2TweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse) - - [Schemas.Get2TweetsSample10StreamResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSample10StreamResponse) - - [Schemas.Get2TweetsSampleStreamResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSampleStreamResponse) - - [Schemas.Get2TweetsSearchAllResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse) - - [Schemas.Get2TweetsSearchRecentResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse) - - [Schemas.Get2TweetsSearchStreamResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamResponse) - - [Schemas.Get2TweetsSearchStreamRulesCountsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse) - - [Schemas.Get2UsageTweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse) - - [Schemas.Get2UsersByResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse) - - [Schemas.Get2UsersByUsernameUsernameResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse) - - [Schemas.Get2UsersIdBlockingResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse) - - [Schemas.Get2UsersIdBookmarksResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse) - - [Schemas.Get2UsersIdFollowedListsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse) - - [Schemas.Get2UsersIdFollowersResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse) - - [Schemas.Get2UsersIdFollowingResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse) - - [Schemas.Get2UsersIdLikedTweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse) - - [Schemas.Get2UsersIdListMembershipsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse) - - [Schemas.Get2UsersIdMentionsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse) - - [Schemas.Get2UsersIdMutingResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse) - - [Schemas.Get2UsersIdOwnedListsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse) - - [Schemas.Get2UsersIdPinnedListsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse) - - [Schemas.Get2UsersIdResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse) - - [Schemas.Get2UsersIdTimelinesReverseChronologicalResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse) - - [Schemas.Get2UsersIdTweetsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse) - - [Schemas.Get2UsersMeResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse) - - [Schemas.Get2UsersPersonalizedTrendsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse) - - [Schemas.Get2UsersRepostsOfMeResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse) - - [Schemas.Get2UsersResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse) - - [Schemas.Get2UsersSearchResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse) - - [Schemas.Get2WebhooksResponse](/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse) - - [Schemas.HashtagFields](/xdks/typescript/reference/interfaces/Schemas.HashtagFields) - - [Schemas.KillAllConnectionsResponse](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse) - - [Schemas.LikeComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.LikeComplianceSchema) - - [Schemas.LikeWithTweetAuthor](/xdks/typescript/reference/interfaces/Schemas.LikeWithTweetAuthor) - - [Schemas.List](/xdks/typescript/reference/interfaces/Schemas.List) - - [Schemas.ListAddUserRequest](/xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest) - - [Schemas.ListCreateRequest](/xdks/typescript/reference/interfaces/Schemas.ListCreateRequest) - - [Schemas.ListCreateResponse](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse) - - [Schemas.ListDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse) - - [Schemas.ListFollowedRequest](/xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest) - - [Schemas.ListFollowedResponse](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse) - - [Schemas.ListMutateResponse](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse) - - [Schemas.ListPinnedRequest](/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest) - - [Schemas.ListPinnedResponse](/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse) - - [Schemas.ListUnpinResponse](/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse) - - [Schemas.ListUpdateRequest](/xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest) - - [Schemas.ListUpdateResponse](/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse) - - [Schemas.ManagementInfo](/xdks/typescript/reference/interfaces/Schemas.ManagementInfo) - - [Schemas.Media](/xdks/typescript/reference/interfaces/Schemas.Media) - - [Schemas.MediaAnalytics](/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics) - - [Schemas.MediaMetrics](/xdks/typescript/reference/interfaces/Schemas.MediaMetrics) - - [Schemas.MediaTimestampedMetrics](/xdks/typescript/reference/interfaces/Schemas.MediaTimestampedMetrics) - - [Schemas.MediaUploadAppendResponse](/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse) - - [Schemas.MediaUploadConfigRequest](/xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest) - - [Schemas.MediaUploadRequestOneShot](/xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot) - - [Schemas.MediaUploadResponse](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse) - - [Schemas.MentionFields](/xdks/typescript/reference/interfaces/Schemas.MentionFields) - - [Schemas.MetadataCreateRequest](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest) - - [Schemas.MetadataCreateResponse](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse) - - [Schemas.Metrics](/xdks/typescript/reference/interfaces/Schemas.Metrics) - - [Schemas.MuteUserMutationResponse](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse) - - [Schemas.MuteUserRequest](/xdks/typescript/reference/interfaces/Schemas.MuteUserRequest) - - [Schemas.News](/xdks/typescript/reference/interfaces/Schemas.News) - - [Schemas.NewsActivityResponsePayload](/xdks/typescript/reference/interfaces/Schemas.NewsActivityResponsePayload) - - [Schemas.Note](/xdks/typescript/reference/interfaces/Schemas.Note) - - [Schemas.NoteInfo](/xdks/typescript/reference/interfaces/Schemas.NoteInfo) - - [Schemas.NoteTestResult](/xdks/typescript/reference/interfaces/Schemas.NoteTestResult) - - [Schemas.PersonalizedTrend](/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend) - - [Schemas.Place](/xdks/typescript/reference/interfaces/Schemas.Place) - - [Schemas.PlaidAccount](/xdks/typescript/reference/interfaces/Schemas.PlaidAccount) - - [Schemas.PlaidAccountContact](/xdks/typescript/reference/interfaces/Schemas.PlaidAccountContact) - - [Schemas.PlaidAccountPaymentNetwork](/xdks/typescript/reference/interfaces/Schemas.PlaidAccountPaymentNetwork) - - [Schemas.PlaidAccountTransaction](/xdks/typescript/reference/interfaces/Schemas.PlaidAccountTransaction) - - [Schemas.PlaidAddress](/xdks/typescript/reference/interfaces/Schemas.PlaidAddress) - - [Schemas.PlaidCurrency](/xdks/typescript/reference/interfaces/Schemas.PlaidCurrency) - - [Schemas.PlaidCustomer](/xdks/typescript/reference/interfaces/Schemas.PlaidCustomer) - - [Schemas.PlaidName](/xdks/typescript/reference/interfaces/Schemas.PlaidName) - - [Schemas.PlaidTelephone](/xdks/typescript/reference/interfaces/Schemas.PlaidTelephone) - - [Schemas.Point](/xdks/typescript/reference/interfaces/Schemas.Point) - - [Schemas.Poll](/xdks/typescript/reference/interfaces/Schemas.Poll) - - [Schemas.PollOption](/xdks/typescript/reference/interfaces/Schemas.PollOption) - - [Schemas.PreviewImage](/xdks/typescript/reference/interfaces/Schemas.PreviewImage) - - [Schemas.Problem](/xdks/typescript/reference/interfaces/Schemas.Problem) - - [Schemas.ProcessingInfo](/xdks/typescript/reference/interfaces/Schemas.ProcessingInfo) - - [Schemas.ProfileUpdateActivityResponsePayload](/xdks/typescript/reference/interfaces/Schemas.ProfileUpdateActivityResponsePayload) - - [Schemas.ReplayJobCreateResponse](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse) - - [Schemas.Rule](/xdks/typescript/reference/interfaces/Schemas.Rule) - - [Schemas.RuleNoId](/xdks/typescript/reference/interfaces/Schemas.RuleNoId) - - [Schemas.RulesCount](/xdks/typescript/reference/interfaces/Schemas.RulesCount) - - [Schemas.RulesLookupResponse](/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse) - - [Schemas.RulesResponseMetadata](/xdks/typescript/reference/interfaces/Schemas.RulesResponseMetadata) - - [Schemas.SearchCount](/xdks/typescript/reference/interfaces/Schemas.SearchCount) - - [Schemas.SensitiveMediaWarning](/xdks/typescript/reference/interfaces/Schemas.SensitiveMediaWarning) - - [Schemas.SharedInfo](/xdks/typescript/reference/interfaces/Schemas.SharedInfo) - - [Schemas.Space](/xdks/typescript/reference/interfaces/Schemas.Space) - - [Schemas.Sticker](/xdks/typescript/reference/interfaces/Schemas.Sticker) - - [Schemas.StickerInfo](/xdks/typescript/reference/interfaces/Schemas.StickerInfo) - - [Schemas.StreamingLikeResponseV2](/xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2) - - [Schemas.StreamingTweetResponse](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) - - [Schemas.SubscriptionsCountGetResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse) - - [Schemas.SubscriptionsCreateResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse) - - [Schemas.SubscriptionsDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse) - - [Schemas.SubscriptionsGetResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse) - - [Schemas.SubscriptionsListGetResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse) - - [Schemas.Subtitles](/xdks/typescript/reference/interfaces/Schemas.Subtitles) - - [Schemas.SubtitlesCreateRequest](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest) - - [Schemas.SubtitlesCreateResponse](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse) - - [Schemas.SubtitlesDeleteRequest](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest) - - [Schemas.SubtitlesDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse) - - [Schemas.TimestampedMetrics](/xdks/typescript/reference/interfaces/Schemas.TimestampedMetrics) - - [Schemas.Topic](/xdks/typescript/reference/interfaces/Schemas.Topic) - - [Schemas.Trend](/xdks/typescript/reference/interfaces/Schemas.Trend) - - [Schemas.Tweet](/xdks/typescript/reference/interfaces/Schemas.Tweet) - - [Schemas.TweetComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetComplianceSchema) - - [Schemas.TweetCreateRequest](/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest) - - [Schemas.TweetCreateResponse](/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse) - - [Schemas.TweetDeleteComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetDeleteComplianceSchema) - - [Schemas.TweetDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse) - - [Schemas.TweetDropComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetDropComplianceSchema) - - [Schemas.TweetEditComplianceObjectSchema](/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceObjectSchema) - - [Schemas.TweetEditComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceSchema) - - [Schemas.TweetHideRequest](/xdks/typescript/reference/interfaces/Schemas.TweetHideRequest) - - [Schemas.TweetHideResponse](/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse) - - [Schemas.TweetNotice](/xdks/typescript/reference/interfaces/Schemas.TweetNotice) - - [Schemas.TweetNoticeSchema](/xdks/typescript/reference/interfaces/Schemas.TweetNoticeSchema) - - [Schemas.TweetTakedownComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetTakedownComplianceSchema) - - [Schemas.TweetUndropComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetUndropComplianceSchema) - - [Schemas.TweetUnviewable](/xdks/typescript/reference/interfaces/Schemas.TweetUnviewable) - - [Schemas.TweetUnviewableSchema](/xdks/typescript/reference/interfaces/Schemas.TweetUnviewableSchema) - - [Schemas.TweetWithheld](/xdks/typescript/reference/interfaces/Schemas.TweetWithheld) - - [Schemas.TweetWithheldComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetWithheldComplianceSchema) - - [Schemas.UnlikeComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UnlikeComplianceSchema) - - [Schemas.UploadSource](/xdks/typescript/reference/interfaces/Schemas.UploadSource) - - [Schemas.UrlFields](/xdks/typescript/reference/interfaces/Schemas.UrlFields) - - [Schemas.UrlImage](/xdks/typescript/reference/interfaces/Schemas.UrlImage) - - [Schemas.Usage](/xdks/typescript/reference/interfaces/Schemas.Usage) - - [Schemas.UsageFields](/xdks/typescript/reference/interfaces/Schemas.UsageFields) - - [Schemas.User](/xdks/typescript/reference/interfaces/Schemas.User) - - [Schemas.UserComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserComplianceSchema) - - [Schemas.UserDeleteComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserDeleteComplianceSchema) - - [Schemas.UserProfileModificationComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationComplianceSchema) - - [Schemas.UserProfileModificationObjectSchema](/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationObjectSchema) - - [Schemas.UserProtectComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserProtectComplianceSchema) - - [Schemas.UserScrubGeoObjectSchema](/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoObjectSchema) - - [Schemas.UserScrubGeoSchema](/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoSchema) - - [Schemas.UserSuspendComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserSuspendComplianceSchema) - - [Schemas.UserTakedownComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserTakedownComplianceSchema) - - [Schemas.UserUndeleteComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserUndeleteComplianceSchema) - - [Schemas.UserUnprotectComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserUnprotectComplianceSchema) - - [Schemas.UserUnsuspendComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserUnsuspendComplianceSchema) - - [Schemas.UserWithheld](/xdks/typescript/reference/interfaces/Schemas.UserWithheld) - - [Schemas.UserWithheldComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserWithheldComplianceSchema) - - [Schemas.UsersDMBlockCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse) - - [Schemas.UsersDMUnBlockCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse) - - [Schemas.UsersFollowingCreateRequest](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest) - - [Schemas.UsersFollowingCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse) - - [Schemas.UsersFollowingDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse) - - [Schemas.UsersLikesCreateRequest](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest) - - [Schemas.UsersLikesCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse) - - [Schemas.UsersLikesDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse) - - [Schemas.UsersRetweetsCreateRequest](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest) - - [Schemas.UsersRetweetsCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse) - - [Schemas.UsersRetweetsDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse) - - [Schemas.Variant](/xdks/typescript/reference/interfaces/Schemas.Variant) - - [Schemas.WebhookConfig](/xdks/typescript/reference/interfaces/Schemas.WebhookConfig) - - [Schemas.WebhookConfigCreateRequest](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest) - - [Schemas.WebhookConfigCreateResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse) - - [Schemas.WebhookConfigDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse) - - [Schemas.WebhookConfigPutResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse) - - [Schemas.WebhookLinksCreateResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse) - - [Schemas.WebhookLinksDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse) - - [Schemas.WebhookLinksGetResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse) - - [Schemas.WebhookReplayCreateRequest](/xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest) - - - - - - - - - [AccountActivityClient](/xdks/typescript/reference/classes/AccountActivityClient) - - - - - [ActivityClient](/xdks/typescript/reference/classes/ActivityClient) - - - - - [Client](/xdks/typescript/reference/classes/Client) - - - - - [NewsClient](/xdks/typescript/reference/classes/NewsClient) - - - - - [CommunitiesClient](/xdks/typescript/reference/classes/CommunitiesClient) - - - - - [CommunityNotesClient](/xdks/typescript/reference/classes/CommunityNotesClient) - - - - - [ComplianceClient](/xdks/typescript/reference/classes/ComplianceClient) - - - - - [ConnectionsClient](/xdks/typescript/reference/classes/ConnectionsClient) - - - - - [ApiError](/xdks/typescript/reference/classes/ApiError) - - - - - [DirectMessagesClient](/xdks/typescript/reference/classes/DirectMessagesClient) - - - - - [GeneralClient](/xdks/typescript/reference/classes/GeneralClient) - - - - - [HttpClient](/xdks/typescript/reference/classes/HttpClient) - - - - - [ListsClient](/xdks/typescript/reference/classes/ListsClient) - - - - - [MediaClient](/xdks/typescript/reference/classes/MediaClient) - - - - - [EventPaginator](/xdks/typescript/reference/classes/EventPaginator) - - [PostPaginator](/xdks/typescript/reference/classes/PostPaginator) - - [UserPaginator](/xdks/typescript/reference/classes/UserPaginator) - - - - - [Paginator](/xdks/typescript/reference/classes/Paginator) - - - - - [PostsClient](/xdks/typescript/reference/classes/PostsClient) - - - - - [SpacesClient](/xdks/typescript/reference/classes/SpacesClient) - - - - - [StreamClient](/xdks/typescript/reference/classes/StreamClient) - - - - - [TrendsClient](/xdks/typescript/reference/classes/TrendsClient) - - - - - [UsageClient](/xdks/typescript/reference/classes/UsageClient) - - - - - [UsersClient](/xdks/typescript/reference/classes/UsersClient) - - - - - [WebhooksClient](/xdks/typescript/reference/classes/WebhooksClient) - - - - - diff --git a/xdks/typescript/reference/modules/AccountActivity.mdx b/xdks/typescript/reference/modules/AccountActivity.mdx deleted file mode 100644 index b505f0f7c..000000000 --- a/xdks/typescript/reference/modules/AccountActivity.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "Namespace: AccountActivity" -sidebarTitle: "Namespace: AccountActivity" -description: "Reference for the AccountActivity module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetSubscriptionsResponse - -Ƭ **GetSubscriptionsResponse**: [`SubscriptionsListGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse) - -Response for getSubscriptions - -#### Defined in - -[account_activity/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/models.ts#L18) - -___ - -### DeleteSubscriptionResponse - -Ƭ **DeleteSubscriptionResponse**: [`SubscriptionsDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse) - -Response for deleteSubscription - -#### Defined in - -[account_activity/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/models.ts#L24) - -___ - -### ValidateSubscriptionResponse - -Ƭ **ValidateSubscriptionResponse**: [`SubscriptionsGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse) - -Response for validateSubscription - -#### Defined in - -[account_activity/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/models.ts#L30) - -___ - -### CreateSubscriptionRequest - -Ƭ **CreateSubscriptionRequest**: [`SubscriptionsCreateRequest`](/xdks/typescript/reference/modules/Schemas#subscriptionscreaterequest) - -Request for createSubscription - -#### Defined in - -[account_activity/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/models.ts#L36) - -___ - -### CreateSubscriptionResponse - -Ƭ **CreateSubscriptionResponse**: [`SubscriptionsCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse) - -Response for createSubscription - -#### Defined in - -[account_activity/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/models.ts#L42) - -___ - -### CreateReplayJobResponse - -Ƭ **CreateReplayJobResponse**: [`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse) - -Response for createReplayJob - -#### Defined in - -[account_activity/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/models.ts#L48) - -___ - -### GetSubscriptionCountResponse - -Ƭ **GetSubscriptionCountResponse**: [`SubscriptionsCountGetResponse`](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse) - -Response for getSubscriptionCount - -#### Defined in - -[account_activity/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/models.ts#L54) diff --git a/xdks/typescript/reference/modules/Activity.mdx b/xdks/typescript/reference/modules/Activity.mdx deleted file mode 100644 index b64c31858..000000000 --- a/xdks/typescript/reference/modules/Activity.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "Namespace: Activity" -sidebarTitle: "Namespace: Activity" -description: "Reference for the Activity module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetSubscriptionsResponse - -Ƭ **GetSubscriptionsResponse**: [`ActivitySubscriptionGetResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse) - -Response for getSubscriptions - -#### Defined in - -[activity/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/models.ts#L18) - -___ - -### CreateSubscriptionRequest - -Ƭ **CreateSubscriptionRequest**: [`ActivitySubscriptionCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateRequest) - -Request for createSubscription - -#### Defined in - -[activity/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/models.ts#L24) - -___ - -### CreateSubscriptionResponse - -Ƭ **CreateSubscriptionResponse**: [`ActivitySubscriptionCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionCreateResponse) - -Response for createSubscription - -#### Defined in - -[activity/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/models.ts#L30) - -___ - -### StreamResponse - -Ƭ **StreamResponse**: [`ActivityStreamingResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivityStreamingResponse) - -Response for stream - -#### Defined in - -[activity/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/models.ts#L36) - -___ - -### UpdateSubscriptionRequest - -Ƭ **UpdateSubscriptionRequest**: [`ActivitySubscriptionUpdateRequest`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateRequest) - -Request for updateSubscription - -#### Defined in - -[activity/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/models.ts#L42) - -___ - -### UpdateSubscriptionResponse - -Ƭ **UpdateSubscriptionResponse**: [`ActivitySubscriptionUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse) - -Response for updateSubscription - -#### Defined in - -[activity/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/models.ts#L48) - -___ - -### DeleteSubscriptionResponse - -Ƭ **DeleteSubscriptionResponse**: [`ActivitySubscriptionDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse) - -Response for deleteSubscription - -#### Defined in - -[activity/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/models.ts#L54) diff --git a/xdks/typescript/reference/modules/Communities.mdx b/xdks/typescript/reference/modules/Communities.mdx deleted file mode 100644 index e206fc83b..000000000 --- a/xdks/typescript/reference/modules/Communities.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Namespace: Communities" -sidebarTitle: "Namespace: Communities" -description: "Reference for the Communities module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### SearchResponse - -Ƭ **SearchResponse**: [`Get2CommunitiesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesSearchResponse) - -Response for search - -#### Defined in - -[communities/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/models.ts#L18) - -___ - -### GetByIdResponse - -Ƭ **GetByIdResponse**: [`Get2CommunitiesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2CommunitiesIdResponse) - -Response for getById - -#### Defined in - -[communities/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/communities/models.ts#L24) diff --git a/xdks/typescript/reference/modules/CommunityNotes.mdx b/xdks/typescript/reference/modules/CommunityNotes.mdx deleted file mode 100644 index ff89a8460..000000000 --- a/xdks/typescript/reference/modules/CommunityNotes.mdx +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "Namespace: CommunityNotes" -sidebarTitle: "Namespace: CommunityNotes" -description: "Reference for the CommunityNotes module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### SearchEligiblePostsResponse - -Ƭ **SearchEligiblePostsResponse**: [`Get2NotesSearchPostsEligibleForNotesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchPostsEligibleForNotesResponse) - -Response for searchEligiblePosts - -#### Defined in - -[community_notes/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/models.ts#L18) - -___ - -### EvaluateRequest - -Ƭ **EvaluateRequest**: [`EvaluateNoteRequest`](/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteRequest) - -Request for evaluate - -#### Defined in - -[community_notes/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/models.ts#L24) - -___ - -### EvaluateResponse - -Ƭ **EvaluateResponse**: [`EvaluateNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.EvaluateNoteResponse) - -Response for evaluate - -#### Defined in - -[community_notes/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/models.ts#L30) - -___ - -### SearchWrittenResponse - -Ƭ **SearchWrittenResponse**: [`Get2NotesSearchNotesWrittenResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NotesSearchNotesWrittenResponse) - -Response for searchWritten - -#### Defined in - -[community_notes/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/models.ts#L36) - -___ - -### DeleteResponse - -Ƭ **DeleteResponse**: [`DeleteNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.DeleteNoteResponse) - -Response for delete - -#### Defined in - -[community_notes/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/models.ts#L42) - -___ - -### CreateRequest - -Ƭ **CreateRequest**: [`CreateNoteRequest`](/xdks/typescript/reference/interfaces/Schemas.CreateNoteRequest) - -Request for create - -#### Defined in - -[community_notes/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/models.ts#L48) - -___ - -### CreateResponse - -Ƭ **CreateResponse**: [`CreateNoteResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateNoteResponse) - -Response for create - -#### Defined in - -[community_notes/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/community_notes/models.ts#L54) diff --git a/xdks/typescript/reference/modules/Compliance.mdx b/xdks/typescript/reference/modules/Compliance.mdx deleted file mode 100644 index c269c0ffc..000000000 --- a/xdks/typescript/reference/modules/Compliance.mdx +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "Namespace: Compliance" -sidebarTitle: "Namespace: Compliance" -description: "Reference for the Compliance module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetJobsByIdResponse - -Ƭ **GetJobsByIdResponse**: [`Get2ComplianceJobsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsIdResponse) - -Response for getJobsById - -#### Defined in - -[compliance/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/models.ts#L18) - -___ - -### GetJobsResponse - -Ƭ **GetJobsResponse**: [`Get2ComplianceJobsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ComplianceJobsResponse) - -Response for getJobs - -#### Defined in - -[compliance/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/models.ts#L24) - -___ - -### CreateJobsRequest - -Ƭ **CreateJobsRequest**: [`CreateComplianceJobRequest`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobRequest) - -Request for createJobs - -#### Defined in - -[compliance/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/models.ts#L30) - -___ - -### CreateJobsResponse - -Ƭ **CreateJobsResponse**: [`CreateComplianceJobResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateComplianceJobResponse) - -Response for createJobs - -#### Defined in - -[compliance/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/compliance/models.ts#L36) diff --git a/xdks/typescript/reference/modules/Connections.mdx b/xdks/typescript/reference/modules/Connections.mdx deleted file mode 100644 index df99f9ef8..000000000 --- a/xdks/typescript/reference/modules/Connections.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Namespace: Connections" -sidebarTitle: "Namespace: Connections" -description: "Reference for the Connections module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetConnectionHistoryResponse - -Ƭ **GetConnectionHistoryResponse**: [`Get2ConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ConnectionsResponse) - -Response for getConnectionHistory - -#### Defined in - -[connections/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/models.ts#L18) - -___ - -### DeleteAllResponse - -Ƭ **DeleteAllResponse**: [`KillAllConnectionsResponse`](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse) - -Response for deleteAll - -#### Defined in - -[connections/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/connections/models.ts#L24) diff --git a/xdks/typescript/reference/modules/DirectMessages.mdx b/xdks/typescript/reference/modules/DirectMessages.mdx deleted file mode 100644 index 244ed0920..000000000 --- a/xdks/typescript/reference/modules/DirectMessages.mdx +++ /dev/null @@ -1,137 +0,0 @@ ---- -title: "Namespace: DirectMessages" -sidebarTitle: "Namespace: DirectMessages" -description: "Reference for the DirectMessages module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### CreateByConversationIdRequest - -Ƭ **CreateByConversationIdRequest**: [`CreateMessageRequest`](/xdks/typescript/reference/modules/Schemas#createmessagerequest) - -Request for createByConversationId - -#### Defined in - -[direct_messages/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L18) - -___ - -### CreateByConversationIdResponse - -Ƭ **CreateByConversationIdResponse**: [`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse) - -Response for createByConversationId - -#### Defined in - -[direct_messages/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L24) - -___ - -### GetEventsByConversationIdResponse - -Ƭ **GetEventsByConversationIdResponse**: [`Get2DmConversationsIdDmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsIdDmEventsResponse) - -Response for getEventsByConversationId - -#### Defined in - -[direct_messages/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L30) - -___ - -### CreateConversationRequest - -Ƭ **CreateConversationRequest**: [`CreateDmConversationRequest`](/xdks/typescript/reference/interfaces/Schemas.CreateDmConversationRequest) - -Request for createConversation - -#### Defined in - -[direct_messages/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L36) - -___ - -### CreateConversationResponse - -Ƭ **CreateConversationResponse**: [`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse) - -Response for createConversation - -#### Defined in - -[direct_messages/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L42) - -___ - -### GetEventsByParticipantIdResponse - -Ƭ **GetEventsByParticipantIdResponse**: [`Get2DmConversationsWithParticipantIdDmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmConversationsWithParticipantIdDmEventsResponse) - -Response for getEventsByParticipantId - -#### Defined in - -[direct_messages/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L48) - -___ - -### GetEventsResponse - -Ƭ **GetEventsResponse**: [`Get2DmEventsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsResponse) - -Response for getEvents - -#### Defined in - -[direct_messages/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L54) - -___ - -### GetEventsByIdResponse - -Ƭ **GetEventsByIdResponse**: [`Get2DmEventsEventIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2DmEventsEventIdResponse) - -Response for getEventsById - -#### Defined in - -[direct_messages/models.ts:60](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L60) - -___ - -### DeleteEventsResponse - -Ƭ **DeleteEventsResponse**: [`DeleteDmResponse`](/xdks/typescript/reference/interfaces/Schemas.DeleteDmResponse) - -Response for deleteEvents - -#### Defined in - -[direct_messages/models.ts:66](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L66) - -___ - -### CreateByParticipantIdRequest - -Ƭ **CreateByParticipantIdRequest**: [`CreateMessageRequest`](/xdks/typescript/reference/modules/Schemas#createmessagerequest) - -Request for createByParticipantId - -#### Defined in - -[direct_messages/models.ts:72](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L72) - -___ - -### CreateByParticipantIdResponse - -Ƭ **CreateByParticipantIdResponse**: [`CreateDmEventResponse`](/xdks/typescript/reference/interfaces/Schemas.CreateDmEventResponse) - -Response for createByParticipantId - -#### Defined in - -[direct_messages/models.ts:78](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/direct_messages/models.ts#L78) diff --git a/xdks/typescript/reference/modules/General.mdx b/xdks/typescript/reference/modules/General.mdx deleted file mode 100644 index e1df8412b..000000000 --- a/xdks/typescript/reference/modules/General.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Namespace: General" -sidebarTitle: "Namespace: General" -description: "Reference for the General module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetOpenApiSpecResponse - -Ƭ **GetOpenApiSpecResponse**: `Record`\<`string`, `any`\> - -Response for getOpenApiSpec - -#### Defined in - -[general/models.ts:19](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/general/models.ts#L19) diff --git a/xdks/typescript/reference/modules/Lists.mdx b/xdks/typescript/reference/modules/Lists.mdx deleted file mode 100644 index 2977e322a..000000000 --- a/xdks/typescript/reference/modules/Lists.mdx +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: "Namespace: Lists" -sidebarTitle: "Namespace: Lists" -description: "Reference for the Lists module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetFollowersResponse - -Ƭ **GetFollowersResponse**: [`Get2ListsIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdFollowersResponse) - -Response for getFollowers - -#### Defined in - -[lists/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L18) - -___ - -### CreateRequest - -Ƭ **CreateRequest**: [`ListCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.ListCreateRequest) - -Request for create - -#### Defined in - -[lists/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L24) - -___ - -### CreateResponse - -Ƭ **CreateResponse**: [`ListCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse) - -Response for create - -#### Defined in - -[lists/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L30) - -___ - -### GetMembersResponse - -Ƭ **GetMembersResponse**: [`Get2ListsIdMembersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdMembersResponse) - -Response for getMembers - -#### Defined in - -[lists/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L36) - -___ - -### AddMemberRequest - -Ƭ **AddMemberRequest**: [`ListAddUserRequest`](/xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest) - -Request for addMember - -#### Defined in - -[lists/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L42) - -___ - -### AddMemberResponse - -Ƭ **AddMemberResponse**: [`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse) - -Response for addMember - -#### Defined in - -[lists/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L48) - -___ - -### GetPostsResponse - -Ƭ **GetPostsResponse**: [`Get2ListsIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdTweetsResponse) - -Response for getPosts - -#### Defined in - -[lists/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L54) - -___ - -### RemoveMemberByUserIdResponse - -Ƭ **RemoveMemberByUserIdResponse**: [`ListMutateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse) - -Response for removeMemberByUserId - -#### Defined in - -[lists/models.ts:60](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L60) - -___ - -### GetByIdResponse - -Ƭ **GetByIdResponse**: [`Get2ListsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2ListsIdResponse) - -Response for getById - -#### Defined in - -[lists/models.ts:66](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L66) - -___ - -### UpdateRequest - -Ƭ **UpdateRequest**: [`ListUpdateRequest`](/xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest) - -Request for update - -#### Defined in - -[lists/models.ts:72](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L72) - -___ - -### UpdateResponse - -Ƭ **UpdateResponse**: [`ListUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse) - -Response for update - -#### Defined in - -[lists/models.ts:78](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L78) - -___ - -### DeleteResponse - -Ƭ **DeleteResponse**: [`ListDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse) - -Response for delete - -#### Defined in - -[lists/models.ts:84](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/lists/models.ts#L84) diff --git a/xdks/typescript/reference/modules/Media.mdx b/xdks/typescript/reference/modules/Media.mdx deleted file mode 100644 index c185b7e5d..000000000 --- a/xdks/typescript/reference/modules/Media.mdx +++ /dev/null @@ -1,217 +0,0 @@ ---- -title: "Namespace: Media" -sidebarTitle: "Namespace: Media" -description: "Reference for the Media module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -zeUploadResponse](/xdks/typescript/reference/modules/Media#finalizeuploadresponse) -- [InitializeUploadRequest](/xdks/typescript/reference/modules/Media#initializeuploadrequest) -- [InitializeUploadResponse](/xdks/typescript/reference/modules/Media#initializeuploadresponse) -- [CreateSubtitlesRequest](/xdks/typescript/reference/modules/Media#createsubtitlesrequest) -- [CreateSubtitlesResponse](/xdks/typescript/reference/modules/Media#createsubtitlesresponse) -- [DeleteSubtitlesRequest](/xdks/typescript/reference/modules/Media#deletesubtitlesrequest) -- [DeleteSubtitlesResponse](/xdks/typescript/reference/modules/Media#deletesubtitlesresponse) - -## Type Aliases - -### GetByKeyResponse - -Ƭ **GetByKeyResponse**: [`Get2MediaMediaKeyResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2MediaMediaKeyResponse) - -Response for getByKey - -#### Defined in - -[media/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L18) - -___ - -### GetUploadStatusResponse - -Ƭ **GetUploadStatusResponse**: [`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse) - -Response for getUploadStatus - -#### Defined in - -[media/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L24) - -___ - -### UploadRequest - -Ƭ **UploadRequest**: [`MediaUploadRequestOneShot`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot) - -Request for upload - -#### Defined in - -[media/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L30) - -___ - -### UploadResponse - -Ƭ **UploadResponse**: [`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse) - -Response for upload - -#### Defined in - -[media/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L36) - -___ - -### GetAnalyticsResponse - -Ƭ **GetAnalyticsResponse**: [`MediaAnalytics`](/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics) - -Response for getAnalytics - -#### Defined in - -[media/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L42) - -___ - -### AppendUploadRequest - -Ƭ **AppendUploadRequest**: [`MediaUploadAppendRequest`](/xdks/typescript/reference/modules/Schemas#mediauploadappendrequest) - -Request for appendUpload - -#### Defined in - -[media/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L48) - -___ - -### AppendUploadResponse - -Ƭ **AppendUploadResponse**: [`MediaUploadAppendResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse) - -Response for appendUpload - -#### Defined in - -[media/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L54) - -___ - -### GetByKeysResponse - -Ƭ **GetByKeysResponse**: [`Get2MediaResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2MediaResponse) - -Response for getByKeys - -#### Defined in - -[media/models.ts:60](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L60) - -___ - -### CreateMetadataRequest - -Ƭ **CreateMetadataRequest**: [`MetadataCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest) - -Request for createMetadata - -#### Defined in - -[media/models.ts:66](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L66) - -___ - -### CreateMetadataResponse - -Ƭ **CreateMetadataResponse**: [`MetadataCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse) - -Response for createMetadata - -#### Defined in - -[media/models.ts:72](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L72) - -___ - -### FinalizeUploadResponse - -Ƭ **FinalizeUploadResponse**: [`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse) - -Response for finalizeUpload - -#### Defined in - -[media/models.ts:78](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L78) - -___ - -### InitializeUploadRequest - -Ƭ **InitializeUploadRequest**: [`MediaUploadConfigRequest`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest) - -Request for initializeUpload - -#### Defined in - -[media/models.ts:84](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L84) - -___ - -### InitializeUploadResponse - -Ƭ **InitializeUploadResponse**: [`MediaUploadResponse`](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse) - -Response for initializeUpload - -#### Defined in - -[media/models.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L90) - -___ - -### CreateSubtitlesRequest - -Ƭ **CreateSubtitlesRequest**: [`SubtitlesCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest) - -Request for createSubtitles - -#### Defined in - -[media/models.ts:96](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L96) - -___ - -### CreateSubtitlesResponse - -Ƭ **CreateSubtitlesResponse**: [`SubtitlesCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse) - -Response for createSubtitles - -#### Defined in - -[media/models.ts:102](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L102) - -___ - -### DeleteSubtitlesRequest - -Ƭ **DeleteSubtitlesRequest**: [`SubtitlesDeleteRequest`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest) - -Request for deleteSubtitles - -#### Defined in - -[media/models.ts:108](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L108) - -___ - -### DeleteSubtitlesResponse - -Ƭ **DeleteSubtitlesResponse**: [`SubtitlesDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse) - -Response for deleteSubtitles - -#### Defined in - -[media/models.ts:114](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/media/models.ts#L114) diff --git a/xdks/typescript/reference/modules/News.mdx b/xdks/typescript/reference/modules/News.mdx deleted file mode 100644 index e26915a4a..000000000 --- a/xdks/typescript/reference/modules/News.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "Namespace: News" -sidebarTitle: "Namespace: News" -description: "Reference for the News module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetResponse - -Ƭ **GetResponse**: [`Get2NewsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse) - -Response for get - -#### Defined in - -[news/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/models.ts#L18) - -___ - -### SearchResponse - -Ƭ **SearchResponse**: [`Get2NewsSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse) - -Response for search - -#### Defined in - -[news/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/models.ts#L24) diff --git a/xdks/typescript/reference/modules/Posts.mdx b/xdks/typescript/reference/modules/Posts.mdx deleted file mode 100644 index 5dc1c09a6..000000000 --- a/xdks/typescript/reference/modules/Posts.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -title: "Namespace: Posts" -sidebarTitle: "Namespace: Posts" -description: "Reference for the Posts module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetInsights28hrResponse - -Ƭ **GetInsights28hrResponse**: [`Get2Insights28hrResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2Insights28hrResponse) - -Response for getInsights28hr - -#### Defined in - -[posts/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L18) - -___ - -### GetAnalyticsResponse - -Ƭ **GetAnalyticsResponse**: [`Analytics`](/xdks/typescript/reference/interfaces/Schemas.Analytics) - -Response for getAnalytics - -#### Defined in - -[posts/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L24) - -___ - -### GetRepostsResponse - -Ƭ **GetRepostsResponse**: [`Get2TweetsIdRetweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetsResponse) - -Response for getReposts - -#### Defined in - -[posts/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L30) - -___ - -### SearchRecentResponse - -Ƭ **SearchRecentResponse**: [`Get2TweetsSearchRecentResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchRecentResponse) - -Response for searchRecent - -#### Defined in - -[posts/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L36) - -___ - -### SearchAllResponse - -Ƭ **SearchAllResponse**: [`Get2TweetsSearchAllResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchAllResponse) - -Response for searchAll - -#### Defined in - -[posts/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L42) - -___ - -### GetByIdsResponse - -Ƭ **GetByIdsResponse**: [`Get2TweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsResponse) - -Response for getByIds - -#### Defined in - -[posts/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L48) - -___ - -### CreateRequest - -Ƭ **CreateRequest**: [`TweetCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest) - -Request for create - -#### Defined in - -[posts/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L54) - -___ - -### CreateResponse - -Ƭ **CreateResponse**: [`TweetCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse) - -Response for create - -#### Defined in - -[posts/models.ts:60](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L60) - -___ - -### GetQuotedResponse - -Ƭ **GetQuotedResponse**: [`Get2TweetsIdQuoteTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdQuoteTweetsResponse) - -Response for getQuoted - -#### Defined in - -[posts/models.ts:66](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L66) - -___ - -### GetCountsRecentResponse - -Ƭ **GetCountsRecentResponse**: [`Get2TweetsCountsRecentResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsRecentResponse) - -Response for getCountsRecent - -#### Defined in - -[posts/models.ts:72](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L72) - -___ - -### HideReplyRequest - -Ƭ **HideReplyRequest**: [`TweetHideRequest`](/xdks/typescript/reference/interfaces/Schemas.TweetHideRequest) - -Request for hideReply - -#### Defined in - -[posts/models.ts:78](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L78) - -___ - -### HideReplyResponse - -Ƭ **HideReplyResponse**: [`TweetHideResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse) - -Response for hideReply - -#### Defined in - -[posts/models.ts:84](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L84) - -___ - -### GetInsightsHistoricalResponse - -Ƭ **GetInsightsHistoricalResponse**: [`Get2InsightsHistoricalResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2InsightsHistoricalResponse) - -Response for getInsightsHistorical - -#### Defined in - -[posts/models.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L90) - -___ - -### GetCountsAllResponse - -Ƭ **GetCountsAllResponse**: [`Get2TweetsCountsAllResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsCountsAllResponse) - -Response for getCountsAll - -#### Defined in - -[posts/models.ts:96](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L96) - -___ - -### GetByIdResponse - -Ƭ **GetByIdResponse**: [`Get2TweetsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdResponse) - -Response for getById - -#### Defined in - -[posts/models.ts:102](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L102) - -___ - -### DeleteResponse - -Ƭ **DeleteResponse**: [`TweetDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse) - -Response for delete - -#### Defined in - -[posts/models.ts:108](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L108) - -___ - -### GetLikingUsersResponse - -Ƭ **GetLikingUsersResponse**: [`Get2TweetsIdLikingUsersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdLikingUsersResponse) - -Response for getLikingUsers - -#### Defined in - -[posts/models.ts:114](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L114) - -___ - -### GetRepostedByResponse - -Ƭ **GetRepostedByResponse**: [`Get2TweetsIdRetweetedByResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsIdRetweetedByResponse) - -Response for getRepostedBy - -#### Defined in - -[posts/models.ts:120](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/posts/models.ts#L120) diff --git a/xdks/typescript/reference/modules/Schemas.mdx b/xdks/typescript/reference/modules/Schemas.mdx deleted file mode 100644 index d20c77ab7..000000000 --- a/xdks/typescript/reference/modules/Schemas.mdx +++ /dev/null @@ -1,1601 +0,0 @@ ---- -title: "Namespace: Schemas" -sidebarTitle: "Namespace: Schemas" -description: "Reference for the Schemas module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -zedTrendsResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse) -- [Get2UsersRepostsOfMeResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse) -- [Get2UsersResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse) -- [Get2UsersSearchResponse](/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse) -- [Get2WebhooksResponse](/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse) -- [HashtagFields](/xdks/typescript/reference/interfaces/Schemas.HashtagFields) -- [KillAllConnectionsResponse](/xdks/typescript/reference/interfaces/Schemas.KillAllConnectionsResponse) -- [LikeComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.LikeComplianceSchema) -- [LikeWithTweetAuthor](/xdks/typescript/reference/interfaces/Schemas.LikeWithTweetAuthor) -- [List](/xdks/typescript/reference/interfaces/Schemas.List) -- [ListAddUserRequest](/xdks/typescript/reference/interfaces/Schemas.ListAddUserRequest) -- [ListCreateRequest](/xdks/typescript/reference/interfaces/Schemas.ListCreateRequest) -- [ListCreateResponse](/xdks/typescript/reference/interfaces/Schemas.ListCreateResponse) -- [ListDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.ListDeleteResponse) -- [ListFollowedRequest](/xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest) -- [ListFollowedResponse](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse) -- [ListMutateResponse](/xdks/typescript/reference/interfaces/Schemas.ListMutateResponse) -- [ListPinnedRequest](/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest) -- [ListPinnedResponse](/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse) -- [ListUnpinResponse](/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse) -- [ListUpdateRequest](/xdks/typescript/reference/interfaces/Schemas.ListUpdateRequest) -- [ListUpdateResponse](/xdks/typescript/reference/interfaces/Schemas.ListUpdateResponse) -- [ManagementInfo](/xdks/typescript/reference/interfaces/Schemas.ManagementInfo) -- [Media](/xdks/typescript/reference/interfaces/Schemas.Media) -- [MediaAnalytics](/xdks/typescript/reference/interfaces/Schemas.MediaAnalytics) -- [MediaMetrics](/xdks/typescript/reference/interfaces/Schemas.MediaMetrics) -- [MediaTimestampedMetrics](/xdks/typescript/reference/interfaces/Schemas.MediaTimestampedMetrics) -- [MediaUploadAppendResponse](/xdks/typescript/reference/interfaces/Schemas.MediaUploadAppendResponse) -- [MediaUploadConfigRequest](/xdks/typescript/reference/interfaces/Schemas.MediaUploadConfigRequest) -- [MediaUploadRequestOneShot](/xdks/typescript/reference/interfaces/Schemas.MediaUploadRequestOneShot) -- [MediaUploadResponse](/xdks/typescript/reference/interfaces/Schemas.MediaUploadResponse) -- [MentionFields](/xdks/typescript/reference/interfaces/Schemas.MentionFields) -- [MetadataCreateRequest](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateRequest) -- [MetadataCreateResponse](/xdks/typescript/reference/interfaces/Schemas.MetadataCreateResponse) -- [Metrics](/xdks/typescript/reference/interfaces/Schemas.Metrics) -- [MuteUserMutationResponse](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse) -- [MuteUserRequest](/xdks/typescript/reference/interfaces/Schemas.MuteUserRequest) -- [News](/xdks/typescript/reference/interfaces/Schemas.News) -- [NewsActivityResponsePayload](/xdks/typescript/reference/interfaces/Schemas.NewsActivityResponsePayload) -- [Note](/xdks/typescript/reference/interfaces/Schemas.Note) -- [NoteInfo](/xdks/typescript/reference/interfaces/Schemas.NoteInfo) -- [NoteTestResult](/xdks/typescript/reference/interfaces/Schemas.NoteTestResult) -- [PersonalizedTrend](/xdks/typescript/reference/interfaces/Schemas.PersonalizedTrend) -- [Place](/xdks/typescript/reference/interfaces/Schemas.Place) -- [PlaidAccount](/xdks/typescript/reference/interfaces/Schemas.PlaidAccount) -- [PlaidAccountContact](/xdks/typescript/reference/interfaces/Schemas.PlaidAccountContact) -- [PlaidAccountPaymentNetwork](/xdks/typescript/reference/interfaces/Schemas.PlaidAccountPaymentNetwork) -- [PlaidAccountTransaction](/xdks/typescript/reference/interfaces/Schemas.PlaidAccountTransaction) -- [PlaidAddress](/xdks/typescript/reference/interfaces/Schemas.PlaidAddress) -- [PlaidCurrency](/xdks/typescript/reference/interfaces/Schemas.PlaidCurrency) -- [PlaidCustomer](/xdks/typescript/reference/interfaces/Schemas.PlaidCustomer) -- [PlaidName](/xdks/typescript/reference/interfaces/Schemas.PlaidName) -- [PlaidTelephone](/xdks/typescript/reference/interfaces/Schemas.PlaidTelephone) -- [Point](/xdks/typescript/reference/interfaces/Schemas.Point) -- [Poll](/xdks/typescript/reference/interfaces/Schemas.Poll) -- [PollOption](/xdks/typescript/reference/interfaces/Schemas.PollOption) -- [PreviewImage](/xdks/typescript/reference/interfaces/Schemas.PreviewImage) -- [Problem](/xdks/typescript/reference/interfaces/Schemas.Problem) -- [ProcessingInfo](/xdks/typescript/reference/interfaces/Schemas.ProcessingInfo) -- [ProfileUpdateActivityResponsePayload](/xdks/typescript/reference/interfaces/Schemas.ProfileUpdateActivityResponsePayload) -- [ReplayJobCreateResponse](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse) -- [Rule](/xdks/typescript/reference/interfaces/Schemas.Rule) -- [RuleNoId](/xdks/typescript/reference/interfaces/Schemas.RuleNoId) -- [RulesCount](/xdks/typescript/reference/interfaces/Schemas.RulesCount) -- [RulesLookupResponse](/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse) -- [RulesResponseMetadata](/xdks/typescript/reference/interfaces/Schemas.RulesResponseMetadata) -- [SearchCount](/xdks/typescript/reference/interfaces/Schemas.SearchCount) -- [SensitiveMediaWarning](/xdks/typescript/reference/interfaces/Schemas.SensitiveMediaWarning) -- [SharedInfo](/xdks/typescript/reference/interfaces/Schemas.SharedInfo) -- [Space](/xdks/typescript/reference/interfaces/Schemas.Space) -- [Sticker](/xdks/typescript/reference/interfaces/Schemas.Sticker) -- [StickerInfo](/xdks/typescript/reference/interfaces/Schemas.StickerInfo) -- [StreamingLikeResponseV2](/xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2) -- [StreamingTweetResponse](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) -- [SubscriptionsCountGetResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse) -- [SubscriptionsCreateResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCreateResponse) -- [SubscriptionsDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse) -- [SubscriptionsGetResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse) -- [SubscriptionsListGetResponse](/xdks/typescript/reference/interfaces/Schemas.SubscriptionsListGetResponse) -- [Subtitles](/xdks/typescript/reference/interfaces/Schemas.Subtitles) -- [SubtitlesCreateRequest](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateRequest) -- [SubtitlesCreateResponse](/xdks/typescript/reference/interfaces/Schemas.SubtitlesCreateResponse) -- [SubtitlesDeleteRequest](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteRequest) -- [SubtitlesDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.SubtitlesDeleteResponse) -- [TimestampedMetrics](/xdks/typescript/reference/interfaces/Schemas.TimestampedMetrics) -- [Topic](/xdks/typescript/reference/interfaces/Schemas.Topic) -- [Trend](/xdks/typescript/reference/interfaces/Schemas.Trend) -- [Tweet](/xdks/typescript/reference/interfaces/Schemas.Tweet) -- [TweetComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetComplianceSchema) -- [TweetCreateRequest](/xdks/typescript/reference/interfaces/Schemas.TweetCreateRequest) -- [TweetCreateResponse](/xdks/typescript/reference/interfaces/Schemas.TweetCreateResponse) -- [TweetDeleteComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetDeleteComplianceSchema) -- [TweetDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.TweetDeleteResponse) -- [TweetDropComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetDropComplianceSchema) -- [TweetEditComplianceObjectSchema](/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceObjectSchema) -- [TweetEditComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetEditComplianceSchema) -- [TweetHideRequest](/xdks/typescript/reference/interfaces/Schemas.TweetHideRequest) -- [TweetHideResponse](/xdks/typescript/reference/interfaces/Schemas.TweetHideResponse) -- [TweetNotice](/xdks/typescript/reference/interfaces/Schemas.TweetNotice) -- [TweetNoticeSchema](/xdks/typescript/reference/interfaces/Schemas.TweetNoticeSchema) -- [TweetTakedownComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetTakedownComplianceSchema) -- [TweetUndropComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetUndropComplianceSchema) -- [TweetUnviewable](/xdks/typescript/reference/interfaces/Schemas.TweetUnviewable) -- [TweetUnviewableSchema](/xdks/typescript/reference/interfaces/Schemas.TweetUnviewableSchema) -- [TweetWithheld](/xdks/typescript/reference/interfaces/Schemas.TweetWithheld) -- [TweetWithheldComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.TweetWithheldComplianceSchema) -- [UnlikeComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UnlikeComplianceSchema) -- [UploadSource](/xdks/typescript/reference/interfaces/Schemas.UploadSource) -- [UrlFields](/xdks/typescript/reference/interfaces/Schemas.UrlFields) -- [UrlImage](/xdks/typescript/reference/interfaces/Schemas.UrlImage) -- [Usage](/xdks/typescript/reference/interfaces/Schemas.Usage) -- [UsageFields](/xdks/typescript/reference/interfaces/Schemas.UsageFields) -- [User](/xdks/typescript/reference/interfaces/Schemas.User) -- [UserComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserComplianceSchema) -- [UserDeleteComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserDeleteComplianceSchema) -- [UserProfileModificationComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationComplianceSchema) -- [UserProfileModificationObjectSchema](/xdks/typescript/reference/interfaces/Schemas.UserProfileModificationObjectSchema) -- [UserProtectComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserProtectComplianceSchema) -- [UserScrubGeoObjectSchema](/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoObjectSchema) -- [UserScrubGeoSchema](/xdks/typescript/reference/interfaces/Schemas.UserScrubGeoSchema) -- [UsersDMBlockCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse) -- [UsersDMUnBlockCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse) -- [UsersFollowingCreateRequest](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest) -- [UsersFollowingCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse) -- [UsersFollowingDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse) -- [UsersLikesCreateRequest](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest) -- [UsersLikesCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse) -- [UsersLikesDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse) -- [UsersRetweetsCreateRequest](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest) -- [UsersRetweetsCreateResponse](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse) -- [UsersRetweetsDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse) -- [UserSuspendComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserSuspendComplianceSchema) -- [UserTakedownComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserTakedownComplianceSchema) -- [UserUndeleteComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserUndeleteComplianceSchema) -- [UserUnprotectComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserUnprotectComplianceSchema) -- [UserUnsuspendComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserUnsuspendComplianceSchema) -- [UserWithheld](/xdks/typescript/reference/interfaces/Schemas.UserWithheld) -- [UserWithheldComplianceSchema](/xdks/typescript/reference/interfaces/Schemas.UserWithheldComplianceSchema) -- [Variant](/xdks/typescript/reference/interfaces/Schemas.Variant) -- [WebhookConfig](/xdks/typescript/reference/interfaces/Schemas.WebhookConfig) -- [WebhookConfigCreateRequest](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest) -- [WebhookConfigCreateResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse) -- [WebhookConfigDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse) -- [WebhookConfigPutResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse) -- [WebhookLinksCreateResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse) -- [WebhookLinksDeleteResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse) -- [WebhookLinksGetResponse](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse) -- [WebhookReplayCreateRequest](/xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest) - -### Type Aliases - -- [ActivityEventId](/xdks/typescript/reference/modules/Schemas#activityeventid) -- [ActivityStreamingResponsePayload](/xdks/typescript/reference/modules/Schemas#activitystreamingresponsepayload) -- [ActivitySubscriptionId](/xdks/typescript/reference/modules/Schemas#activitysubscriptionid) -- [AddOrDeleteRulesRequest](/xdks/typescript/reference/modules/Schemas#addordeleterulesrequest) -- [Aggregate](/xdks/typescript/reference/modules/Schemas#aggregate) -- [AllProjectClientApps](/xdks/typescript/reference/modules/Schemas#allprojectclientapps) -- [AnimatedGif](/xdks/typescript/reference/modules/Schemas#animatedgif) -- [BookmarkFolderId](/xdks/typescript/reference/modules/Schemas#bookmarkfolderid) -- [CashtagEntity](/xdks/typescript/reference/modules/Schemas#cashtagentity) -- [ClientAppId](/xdks/typescript/reference/modules/Schemas#clientappid) -- [ClientDisconnectedProblem](/xdks/typescript/reference/modules/Schemas#clientdisconnectedproblem) -- [ClientForbiddenProblem](/xdks/typescript/reference/modules/Schemas#clientforbiddenproblem) -- [CommunityId](/xdks/typescript/reference/modules/Schemas#communityid) -- [ComplianceJobName](/xdks/typescript/reference/modules/Schemas#compliancejobname) -- [ComplianceJobStatus](/xdks/typescript/reference/modules/Schemas#compliancejobstatus) -- [ComplianceJobType](/xdks/typescript/reference/modules/Schemas#compliancejobtype) -- [ConflictProblem](/xdks/typescript/reference/modules/Schemas#conflictproblem) -- [ConnectionExceptionProblem](/xdks/typescript/reference/modules/Schemas#connectionexceptionproblem) -- [CountryCode](/xdks/typescript/reference/modules/Schemas#countrycode) -- [CreatedAt](/xdks/typescript/reference/modules/Schemas#createdat) -- [CreateMessageRequest](/xdks/typescript/reference/modules/Schemas#createmessagerequest) -- [DisallowedResourceProblem](/xdks/typescript/reference/modules/Schemas#disallowedresourceproblem) -- [DisplayTextRange](/xdks/typescript/reference/modules/Schemas#displaytextrange) -- [DmAttachments](/xdks/typescript/reference/modules/Schemas#dmattachments) -- [DmConversationId](/xdks/typescript/reference/modules/Schemas#dmconversationid) -- [DmEventId](/xdks/typescript/reference/modules/Schemas#dmeventid) -- [DmParticipants](/xdks/typescript/reference/modules/Schemas#dmparticipants) -- [DownloadExpiration](/xdks/typescript/reference/modules/Schemas#downloadexpiration) -- [DownloadUrl](/xdks/typescript/reference/modules/Schemas#downloadurl) -- [DuplicateRuleProblem](/xdks/typescript/reference/modules/Schemas#duplicateruleproblem) -- [End](/xdks/typescript/reference/modules/Schemas#end) -- [FieldUnauthorizedProblem](/xdks/typescript/reference/modules/Schemas#fieldunauthorizedproblem) -- [GenericProblem](/xdks/typescript/reference/modules/Schemas#genericproblem) -- [GeoRestrictions](/xdks/typescript/reference/modules/Schemas#georestrictions) -- [HashtagEntity](/xdks/typescript/reference/modules/Schemas#hashtagentity) -- [HttpStatusCode](/xdks/typescript/reference/modules/Schemas#httpstatuscode) -- [InvalidRequestProblem](/xdks/typescript/reference/modules/Schemas#invalidrequestproblem) -- [InvalidRuleProblem](/xdks/typescript/reference/modules/Schemas#invalidruleproblem) -- [JobId](/xdks/typescript/reference/modules/Schemas#jobid) -- [Keyword](/xdks/typescript/reference/modules/Schemas#keyword) -- [LikeId](/xdks/typescript/reference/modules/Schemas#likeid) -- [LikesComplianceStreamResponse](/xdks/typescript/reference/modules/Schemas#likescompliancestreamresponse) -- [ListId](/xdks/typescript/reference/modules/Schemas#listid) -- [MediaCategory](/xdks/typescript/reference/modules/Schemas#mediacategory) -- [MediaCategoryOneShot](/xdks/typescript/reference/modules/Schemas#mediacategoryoneshot) -- [MediaCategorySubtitles](/xdks/typescript/reference/modules/Schemas#mediacategorysubtitles) -- [MediaHeight](/xdks/typescript/reference/modules/Schemas#mediaheight) -- [MediaId](/xdks/typescript/reference/modules/Schemas#mediaid) -- [MediaKey](/xdks/typescript/reference/modules/Schemas#mediakey) -- [MediaPayloadBinary](/xdks/typescript/reference/modules/Schemas#mediapayloadbinary) -- [MediaPayloadByte](/xdks/typescript/reference/modules/Schemas#mediapayloadbyte) -- [MediaSegments](/xdks/typescript/reference/modules/Schemas#mediasegments) -- [MediaUploadAppendRequest](/xdks/typescript/reference/modules/Schemas#mediauploadappendrequest) -- [MediaWidth](/xdks/typescript/reference/modules/Schemas#mediawidth) -- [MentionEntity](/xdks/typescript/reference/modules/Schemas#mentionentity) -- [MisleadingTags](/xdks/typescript/reference/modules/Schemas#misleadingtags) -- [NewestId](/xdks/typescript/reference/modules/Schemas#newestid) -- [NewsId](/xdks/typescript/reference/modules/Schemas#newsid) -- [NextToken](/xdks/typescript/reference/modules/Schemas#nexttoken) -- [NonCompliantRulesProblem](/xdks/typescript/reference/modules/Schemas#noncompliantrulesproblem) -- [NoteClassification](/xdks/typescript/reference/modules/Schemas#noteclassification) -- [NoteId](/xdks/typescript/reference/modules/Schemas#noteid) -- [NoteRatingStatus](/xdks/typescript/reference/modules/Schemas#noteratingstatus) -- [NoteTweetText](/xdks/typescript/reference/modules/Schemas#notetweettext) -- [Oauth1PermissionsProblem](/xdks/typescript/reference/modules/Schemas#oauth1permissionsproblem) -- [OldestId](/xdks/typescript/reference/modules/Schemas#oldestid) -- [OperationalDisconnectProblem](/xdks/typescript/reference/modules/Schemas#operationaldisconnectproblem) -- [PaginationToken32](/xdks/typescript/reference/modules/Schemas#paginationtoken32) -- [PaginationToken36](/xdks/typescript/reference/modules/Schemas#paginationtoken36) -- [PaginationTokenLong](/xdks/typescript/reference/modules/Schemas#paginationtokenlong) -- [Photo](/xdks/typescript/reference/modules/Schemas#photo) -- [PlaceId](/xdks/typescript/reference/modules/Schemas#placeid) -- [PlaceType](/xdks/typescript/reference/modules/Schemas#placetype) -- [PollId](/xdks/typescript/reference/modules/Schemas#pollid) -- [PollOptionLabel](/xdks/typescript/reference/modules/Schemas#polloptionlabel) -- [Position](/xdks/typescript/reference/modules/Schemas#position) -- [PreviousToken](/xdks/typescript/reference/modules/Schemas#previoustoken) -- [ReplySettings](/xdks/typescript/reference/modules/Schemas#replysettings) -- [ReplySettingsWithVerifiedUsers](/xdks/typescript/reference/modules/Schemas#replysettingswithverifiedusers) -- [ResourceNotFoundProblem](/xdks/typescript/reference/modules/Schemas#resourcenotfoundproblem) -- [ResourceUnauthorizedProblem](/xdks/typescript/reference/modules/Schemas#resourceunauthorizedproblem) -- [ResourceUnavailableProblem](/xdks/typescript/reference/modules/Schemas#resourceunavailableproblem) -- [ResultCount](/xdks/typescript/reference/modules/Schemas#resultcount) -- [RuleId](/xdks/typescript/reference/modules/Schemas#ruleid) -- [RulesCapProblem](/xdks/typescript/reference/modules/Schemas#rulescapproblem) -- [RulesRequestSummary](/xdks/typescript/reference/modules/Schemas#rulesrequestsummary) -- [RuleTag](/xdks/typescript/reference/modules/Schemas#ruletag) -- [RuleValue](/xdks/typescript/reference/modules/Schemas#rulevalue) -- [SpaceId](/xdks/typescript/reference/modules/Schemas#spaceid) -- [Start](/xdks/typescript/reference/modules/Schemas#start) -- [SubscriptionsCreateRequest](/xdks/typescript/reference/modules/Schemas#subscriptionscreaterequest) -- [SubtitleLanguageCode](/xdks/typescript/reference/modules/Schemas#subtitlelanguagecode) -- [TopicId](/xdks/typescript/reference/modules/Schemas#topicid) -- [TweetComplianceData](/xdks/typescript/reference/modules/Schemas#tweetcompliancedata) -- [TweetComplianceStreamResponse](/xdks/typescript/reference/modules/Schemas#tweetcompliancestreamresponse) -- [TweetCount](/xdks/typescript/reference/modules/Schemas#tweetcount) -- [TweetId](/xdks/typescript/reference/modules/Schemas#tweetid) -- [TweetLabelData](/xdks/typescript/reference/modules/Schemas#tweetlabeldata) -- [TweetLabelStreamResponse](/xdks/typescript/reference/modules/Schemas#tweetlabelstreamresponse) -- [TweetText](/xdks/typescript/reference/modules/Schemas#tweettext) -- [UnsupportedAuthenticationProblem](/xdks/typescript/reference/modules/Schemas#unsupportedauthenticationproblem) -- [UploadExpiration](/xdks/typescript/reference/modules/Schemas#uploadexpiration) -- [UploadUrl](/xdks/typescript/reference/modules/Schemas#uploadurl) -- [Url](/xdks/typescript/reference/modules/Schemas#url) -- [UrlEntity](/xdks/typescript/reference/modules/Schemas#urlentity) -- [UrlEntityDm](/xdks/typescript/reference/modules/Schemas#urlentitydm) -- [UsageCapExceededProblem](/xdks/typescript/reference/modules/Schemas#usagecapexceededproblem) -- [UserComplianceData](/xdks/typescript/reference/modules/Schemas#usercompliancedata) -- [UserComplianceStreamResponse](/xdks/typescript/reference/modules/Schemas#usercompliancestreamresponse) -- [UserId](/xdks/typescript/reference/modules/Schemas#userid) -- [UserIdMatchesAuthenticatedUser](/xdks/typescript/reference/modules/Schemas#useridmatchesauthenticateduser) -- [UserName](/xdks/typescript/reference/modules/Schemas#username) -- [UserSearchQueryVnext](/xdks/typescript/reference/modules/Schemas#usersearchqueryvnext) -- [Variants](/xdks/typescript/reference/modules/Schemas#variants) -- [Video](/xdks/typescript/reference/modules/Schemas#video) -- [WebhookConfigId](/xdks/typescript/reference/modules/Schemas#webhookconfigid) - -## Type Aliases - -### ActivityEventId - -Ƭ **ActivityEventId**: `string` - -The unique identifier of an Activity event. - * - * - -#### Defined in - -[schemas.ts:19](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L19) - -___ - -### ActivityStreamingResponsePayload - -Ƭ **ActivityStreamingResponsePayload**: `any` - -Schema type for ActivityStreamingResponsePayload - * - * - -#### Defined in - -[schemas.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L30) - -___ - -### ActivitySubscriptionId - -Ƭ **ActivitySubscriptionId**: `string` - -#### Defined in - -[schemas.ts:65](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L65) - -___ - -### AddOrDeleteRulesRequest - -Ƭ **AddOrDeleteRulesRequest**: `any` - -Schema type for AddOrDeleteRulesRequest - * - * - -#### Defined in - -[schemas.ts:81](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L81) - -___ - -### Aggregate - -Ƭ **Aggregate**: `number` - -#### Defined in - -[schemas.ts:96](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L96) - -___ - -### AllProjectClientApps - -Ƭ **AllProjectClientApps**: [`AppRulesCount`](/xdks/typescript/reference/interfaces/Schemas.AppRulesCount)[] - -#### Defined in - -[schemas.ts:106](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L106) - -___ - -### AnimatedGif - -Ƭ **AnimatedGif**: `any` - -Schema type for AnimatedGif - * - * - -#### Defined in - -[schemas.ts:122](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L122) - -___ - -### BookmarkFolderId - -Ƭ **BookmarkFolderId**: `string` - -#### Defined in - -[schemas.ts:142](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L142) - -___ - -### CashtagEntity - -Ƭ **CashtagEntity**: `any` - -Schema type for CashtagEntity - * - * - -#### Defined in - -[schemas.ts:163](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L163) - -___ - -### ClientAppId - -Ƭ **ClientAppId**: `string` - -#### Defined in - -[schemas.ts:173](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L173) - -___ - -### ClientDisconnectedProblem - -Ƭ **ClientDisconnectedProblem**: `any` - -Your client has gone away. - * - * - -#### Defined in - -[schemas.ts:184](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L184) - -___ - -### ClientForbiddenProblem - -Ƭ **ClientForbiddenProblem**: `any` - -A problem that indicates your client is forbidden from making this request. - * - * - -#### Defined in - -[schemas.ts:190](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L190) - -___ - -### CommunityId - -Ƭ **CommunityId**: `string` - -#### Defined in - -[schemas.ts:200](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L200) - -___ - -### ComplianceJobName - -Ƭ **ComplianceJobName**: `string` - -#### Defined in - -[schemas.ts:210](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L210) - -___ - -### ComplianceJobStatus - -Ƭ **ComplianceJobStatus**: ``"created"`` \| ``"in_progress"`` \| ``"failed"`` \| ``"complete"`` \| ``"expired"`` - -#### Defined in - -[schemas.ts:215](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L215) - -___ - -### ComplianceJobType - -Ƭ **ComplianceJobType**: ``"tweets"`` \| ``"users"`` - -#### Defined in - -[schemas.ts:220](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L220) - -___ - -### ConflictProblem - -Ƭ **ConflictProblem**: `any` - -You cannot create a new job if one is already in progress. - * - * - -#### Defined in - -[schemas.ts:226](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L226) - -___ - -### ConnectionExceptionProblem - -Ƭ **ConnectionExceptionProblem**: `any` - -A problem that indicates something is wrong with the connection. - * - * - -#### Defined in - -[schemas.ts:237](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L237) - -___ - -### CountryCode - -Ƭ **CountryCode**: `string` - -#### Defined in - -[schemas.ts:262](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L262) - -___ - -### CreatedAt - -Ƭ **CreatedAt**: `string` - -#### Defined in - -[schemas.ts:282](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L282) - -___ - -### CreateMessageRequest - -Ƭ **CreateMessageRequest**: `any` - -Schema type for CreateMessageRequest - * - * - -#### Defined in - -[schemas.ts:298](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L298) - -___ - -### DisallowedResourceProblem - -Ƭ **DisallowedResourceProblem**: `any` - -A problem that indicates that the resource requested violates the precepts of this API. - * - * - -#### Defined in - -[schemas.ts:334](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L334) - -___ - -### DisplayTextRange - -Ƭ **DisplayTextRange**: `number`[] - -#### Defined in - -[schemas.ts:339](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L339) - -___ - -### DmAttachments - -Ƭ **DmAttachments**: [`DmMediaAttachment`](/xdks/typescript/reference/interfaces/Schemas.DmMediaAttachment)[] - -#### Defined in - -[schemas.ts:344](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L344) - -___ - -### DmConversationId - -Ƭ **DmConversationId**: `string` - -#### Defined in - -[schemas.ts:349](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L349) - -___ - -### DmEventId - -Ƭ **DmEventId**: `string` - -#### Defined in - -[schemas.ts:359](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L359) - -___ - -### DmParticipants - -Ƭ **DmParticipants**: [`UserId`](/xdks/typescript/reference/modules/Schemas#userid)[] - -#### Defined in - -[schemas.ts:369](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L369) - -___ - -### DownloadExpiration - -Ƭ **DownloadExpiration**: `string` - -#### Defined in - -[schemas.ts:379](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L379) - -___ - -### DownloadUrl - -Ƭ **DownloadUrl**: `string` - -#### Defined in - -[schemas.ts:384](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L384) - -___ - -### DuplicateRuleProblem - -Ƭ **DuplicateRuleProblem**: `any` - -The rule you have submitted is a duplicate. - * - * - -#### Defined in - -[schemas.ts:390](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L390) - -___ - -### End - -Ƭ **End**: `string` - -#### Defined in - -[schemas.ts:395](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L395) - -___ - -### FieldUnauthorizedProblem - -Ƭ **FieldUnauthorizedProblem**: `any` - -A problem that indicates that you are not allowed to see a particular field on a Tweet, User, etc. - * - * - -#### Defined in - -[schemas.ts:436](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L436) - -___ - -### GenericProblem - -Ƭ **GenericProblem**: `any` - -A generic problem with no additional information beyond that provided by the HTTP status code. - * - * - -#### Defined in - -[schemas.ts:462](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L462) - -___ - -### GeoRestrictions - -Ƭ **GeoRestrictions**: `any` - -Schema type for GeoRestrictions - * - * - -#### Defined in - -[schemas.ts:473](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L473) - -___ - -### HashtagEntity - -Ƭ **HashtagEntity**: `any` - -Schema type for HashtagEntity - * - * - -#### Defined in - -[schemas.ts:874](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L874) - -___ - -### HttpStatusCode - -Ƭ **HttpStatusCode**: `number` - -#### Defined in - -[schemas.ts:884](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L884) - -___ - -### InvalidRequestProblem - -Ƭ **InvalidRequestProblem**: `any` - -A problem that indicates this request is invalid. - * - * - -#### Defined in - -[schemas.ts:890](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L890) - -___ - -### InvalidRuleProblem - -Ƭ **InvalidRuleProblem**: `any` - -The rule you have submitted is invalid. - * - * - -#### Defined in - -[schemas.ts:896](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L896) - -___ - -### JobId - -Ƭ **JobId**: `string` - -#### Defined in - -[schemas.ts:901](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L901) - -___ - -### Keyword - -Ƭ **Keyword**: `string` - -#### Defined in - -[schemas.ts:906](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L906) - -___ - -### LikeId - -Ƭ **LikeId**: `string` - -#### Defined in - -[schemas.ts:921](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L921) - -___ - -### LikesComplianceStreamResponse - -Ƭ **LikesComplianceStreamResponse**: `any` - -Likes compliance stream events. - * - * - -#### Defined in - -[schemas.ts:927](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L927) - -___ - -### ListId - -Ƭ **ListId**: `string` - -#### Defined in - -[schemas.ts:972](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L972) - -___ - -### MediaCategory - -Ƭ **MediaCategory**: ``"amplify_video"`` \| ``"tweet_gif"`` \| ``"tweet_image"`` \| ``"tweet_video"`` \| ``"dm_gif"`` \| ``"dm_image"`` \| ``"dm_video"`` \| ``"subtitles"`` - -#### Defined in - -[schemas.ts:1022](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1022) - -___ - -### MediaCategoryOneShot - -Ƭ **MediaCategoryOneShot**: ``"tweet_image"`` \| ``"dm_image"`` \| ``"subtitles"`` - -#### Defined in - -[schemas.ts:1027](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1027) - -___ - -### MediaCategorySubtitles - -Ƭ **MediaCategorySubtitles**: ``"AmplifyVideo"`` \| ``"TweetVideo"`` - -#### Defined in - -[schemas.ts:1032](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1032) - -___ - -### MediaHeight - -Ƭ **MediaHeight**: `number` - -#### Defined in - -[schemas.ts:1037](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1037) - -___ - -### MediaId - -Ƭ **MediaId**: `string` - -#### Defined in - -[schemas.ts:1042](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1042) - -___ - -### MediaKey - -Ƭ **MediaKey**: `string` - -#### Defined in - -[schemas.ts:1047](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1047) - -___ - -### MediaPayloadBinary - -Ƭ **MediaPayloadBinary**: `string` - -#### Defined in - -[schemas.ts:1057](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1057) - -___ - -### MediaPayloadByte - -Ƭ **MediaPayloadByte**: `string` - -#### Defined in - -[schemas.ts:1062](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1062) - -___ - -### MediaSegments - -Ƭ **MediaSegments**: `any` - -Schema type for MediaSegments - * - * - -#### Defined in - -[schemas.ts:1068](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1068) - -___ - -### MediaUploadAppendRequest - -Ƭ **MediaUploadAppendRequest**: `any` - -Schema type for MediaUploadAppendRequest - * - * - -#### Defined in - -[schemas.ts:1079](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1079) - -___ - -### MediaWidth - -Ƭ **MediaWidth**: `number` - -#### Defined in - -[schemas.ts:1104](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1104) - -___ - -### MentionEntity - -Ƭ **MentionEntity**: `any` - -Schema type for MentionEntity - * - * - -#### Defined in - -[schemas.ts:1110](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1110) - -___ - -### MisleadingTags - -Ƭ **MisleadingTags**: ``"disputed_claim_as_fact"`` \| ``"factual_error"`` \| ``"manipulated_media"`` \| ``"misinterpreted_satire"`` \| ``"missing_important_context"`` \| ``"other"`` \| ``"outdated_information"`` - -#### Defined in - -[schemas.ts:1135](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1135) - -___ - -### NewestId - -Ƭ **NewestId**: `string` - -#### Defined in - -[schemas.ts:1150](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1150) - -___ - -### NewsId - -Ƭ **NewsId**: `string` - -#### Defined in - -[schemas.ts:1165](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1165) - -___ - -### NextToken - -Ƭ **NextToken**: `string` - -#### Defined in - -[schemas.ts:1170](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1170) - -___ - -### NonCompliantRulesProblem - -Ƭ **NonCompliantRulesProblem**: `any` - -A problem that indicates the user's rule set is not compliant. - * - * - -#### Defined in - -[schemas.ts:1176](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1176) - -___ - -### NoteClassification - -Ƭ **NoteClassification**: ``"misinformed_or_potentially_misleading"`` \| ``"not_misleading"`` - -#### Defined in - -[schemas.ts:1186](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1186) - -___ - -### NoteId - -Ƭ **NoteId**: `string` - -#### Defined in - -[schemas.ts:1191](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1191) - -___ - -### NoteRatingStatus - -Ƭ **NoteRatingStatus**: ``"currently_rated_helpful"`` \| ``"currently_rated_not_helpful"`` \| ``"firm_reject"`` \| ``"insufficient_consensus"`` \| ``"minimum_ratings_not_met"`` \| ``"needs_more_ratings"`` \| ``"needs_your_help"`` - -#### Defined in - -[schemas.ts:1201](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1201) - -___ - -### NoteTweetText - -Ƭ **NoteTweetText**: `string` - -#### Defined in - -[schemas.ts:1211](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1211) - -___ - -### Oauth1PermissionsProblem - -Ƭ **Oauth1PermissionsProblem**: `any` - -A problem that indicates your client application does not have the required OAuth1 permissions for the requested endpoint. - * - * - -#### Defined in - -[schemas.ts:1217](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1217) - -___ - -### OldestId - -Ƭ **OldestId**: `string` - -#### Defined in - -[schemas.ts:1222](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1222) - -___ - -### OperationalDisconnectProblem - -Ƭ **OperationalDisconnectProblem**: `any` - -You have been disconnected for operational reasons. - * - * - -#### Defined in - -[schemas.ts:1228](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1228) - -___ - -### PaginationToken32 - -Ƭ **PaginationToken32**: `string` - -#### Defined in - -[schemas.ts:1233](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1233) - -___ - -### PaginationToken36 - -Ƭ **PaginationToken36**: `string` - -#### Defined in - -[schemas.ts:1238](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1238) - -___ - -### PaginationTokenLong - -Ƭ **PaginationTokenLong**: `string` - -#### Defined in - -[schemas.ts:1243](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1243) - -___ - -### Photo - -Ƭ **Photo**: `any` - -Schema type for Photo - * - * - -#### Defined in - -[schemas.ts:1254](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1254) - -___ - -### PlaceId - -Ƭ **PlaceId**: `string` - -#### Defined in - -[schemas.ts:1264](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1264) - -___ - -### PlaceType - -Ƭ **PlaceType**: ``"poi"`` \| ``"neighborhood"`` \| ``"city"`` \| ``"admin"`` \| ``"country"`` \| ``"unknown"`` - -#### Defined in - -[schemas.ts:1269](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1269) - -___ - -### PollId - -Ƭ **PollId**: `string` - -#### Defined in - -[schemas.ts:1329](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1329) - -___ - -### PollOptionLabel - -Ƭ **PollOptionLabel**: `string` - -#### Defined in - -[schemas.ts:1339](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1339) - -___ - -### Position - -Ƭ **Position**: `number`[] - -#### Defined in - -[schemas.ts:1344](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1344) - -___ - -### PreviousToken - -Ƭ **PreviousToken**: `string` - -#### Defined in - -[schemas.ts:1354](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1354) - -___ - -### ReplySettings - -Ƭ **ReplySettings**: ``"everyone"`` \| ``"mentionedUsers"`` \| ``"following"`` \| ``"other"`` - -#### Defined in - -[schemas.ts:1379](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1379) - -___ - -### ReplySettingsWithVerifiedUsers - -Ƭ **ReplySettingsWithVerifiedUsers**: ``"everyone"`` \| ``"mentionedUsers"`` \| ``"following"`` \| ``"other"`` \| ``"subscribers"`` \| ``"verified"`` - -#### Defined in - -[schemas.ts:1384](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1384) - -___ - -### ResourceNotFoundProblem - -Ƭ **ResourceNotFoundProblem**: `any` - -A problem that indicates that a given Tweet, User, etc. does not exist. - * - * - -#### Defined in - -[schemas.ts:1390](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1390) - -___ - -### ResourceUnauthorizedProblem - -Ƭ **ResourceUnauthorizedProblem**: `any` - -A problem that indicates you are not allowed to see a particular Tweet, User, etc. - * - * - -#### Defined in - -[schemas.ts:1396](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1396) - -___ - -### ResourceUnavailableProblem - -Ƭ **ResourceUnavailableProblem**: `any` - -A problem that indicates a particular Tweet, User, etc. is not available to you. - * - * - -#### Defined in - -[schemas.ts:1402](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1402) - -___ - -### ResultCount - -Ƭ **ResultCount**: `number` - -#### Defined in - -[schemas.ts:1407](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1407) - -___ - -### RuleId - -Ƭ **RuleId**: `string` - -#### Defined in - -[schemas.ts:1417](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1417) - -___ - -### RulesCapProblem - -Ƭ **RulesCapProblem**: `any` - -You have exceeded the maximum number of rules. - * - * - -#### Defined in - -[schemas.ts:1428](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1428) - -___ - -### RulesRequestSummary - -Ƭ **RulesRequestSummary**: `any` - -Schema type for RulesRequestSummary - * - * - -#### Defined in - -[schemas.ts:1444](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1444) - -___ - -### RuleTag - -Ƭ **RuleTag**: `string` - -#### Defined in - -[schemas.ts:1454](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1454) - -___ - -### RuleValue - -Ƭ **RuleValue**: `string` - -#### Defined in - -[schemas.ts:1459](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1459) - -___ - -### SpaceId - -Ƭ **SpaceId**: `string` - -#### Defined in - -[schemas.ts:1484](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1484) - -___ - -### Start - -Ƭ **Start**: `string` - -#### Defined in - -[schemas.ts:1489](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1489) - -___ - -### SubscriptionsCreateRequest - -Ƭ **SubscriptionsCreateRequest**: `Record`\<`string`, `any`\> - -#### Defined in - -[schemas.ts:1519](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1519) - -___ - -### SubtitleLanguageCode - -Ƭ **SubtitleLanguageCode**: `string` - -#### Defined in - -[schemas.ts:1544](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1544) - -___ - -### TopicId - -Ƭ **TopicId**: `string` - -#### Defined in - -[schemas.ts:1584](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1584) - -___ - -### TweetComplianceData - -Ƭ **TweetComplianceData**: `any` - -Tweet compliance data. - * - * - -#### Defined in - -[schemas.ts:1600](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1600) - -___ - -### TweetComplianceStreamResponse - -Ƭ **TweetComplianceStreamResponse**: `any` - -Tweet compliance stream events. - * - * - -#### Defined in - -[schemas.ts:1611](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1611) - -___ - -### TweetCount - -Ƭ **TweetCount**: `number` - -#### Defined in - -[schemas.ts:1616](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1616) - -___ - -### TweetId - -Ƭ **TweetId**: `string` - -#### Defined in - -[schemas.ts:1666](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1666) - -___ - -### TweetLabelData - -Ƭ **TweetLabelData**: `any` - -Tweet label data. - * - * - -#### Defined in - -[schemas.ts:1672](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1672) - -___ - -### TweetLabelStreamResponse - -Ƭ **TweetLabelStreamResponse**: `any` - -Tweet label stream events. - * - * - -#### Defined in - -[schemas.ts:1678](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1678) - -___ - -### TweetText - -Ƭ **TweetText**: `string` - -#### Defined in - -[schemas.ts:1698](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1698) - -___ - -### UnsupportedAuthenticationProblem - -Ƭ **UnsupportedAuthenticationProblem**: `any` - -A problem that indicates that the authentication used is not supported. - * - * - -#### Defined in - -[schemas.ts:1734](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1734) - -___ - -### UploadExpiration - -Ƭ **UploadExpiration**: `string` - -#### Defined in - -[schemas.ts:1739](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1739) - -___ - -### UploadUrl - -Ƭ **UploadUrl**: `string` - -#### Defined in - -[schemas.ts:1749](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1749) - -___ - -### Url - -Ƭ **Url**: `string` - -#### Defined in - -[schemas.ts:1754](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1754) - -___ - -### UrlEntity - -Ƭ **UrlEntity**: `any` - -Represent the portion of text recognized as a URL, and its start and end position within the text. - * - * - -#### Defined in - -[schemas.ts:1760](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1760) - -___ - -### UrlEntityDm - -Ƭ **UrlEntityDm**: `any` - -Represent the portion of text recognized as a URL, and its start and end position within the text. - * - * - -#### Defined in - -[schemas.ts:1766](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1766) - -___ - -### UsageCapExceededProblem - -Ƭ **UsageCapExceededProblem**: `any` - -A problem that indicates that a usage cap has been exceeded. - * - * - -#### Defined in - -[schemas.ts:1787](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1787) - -___ - -### UserComplianceData - -Ƭ **UserComplianceData**: `any` - -User compliance data. - * - * - -#### Defined in - -[schemas.ts:1803](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1803) - -___ - -### UserComplianceStreamResponse - -Ƭ **UserComplianceStreamResponse**: `any` - -User compliance stream events. - * - * - -#### Defined in - -[schemas.ts:1814](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1814) - -___ - -### UserId - -Ƭ **UserId**: `string` - -#### Defined in - -[schemas.ts:1824](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1824) - -___ - -### UserIdMatchesAuthenticatedUser - -Ƭ **UserIdMatchesAuthenticatedUser**: `string` - -#### Defined in - -[schemas.ts:1829](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1829) - -___ - -### UserName - -Ƭ **UserName**: `string` - -#### Defined in - -[schemas.ts:1834](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1834) - -___ - -### UserSearchQueryVnext - -Ƭ **UserSearchQueryVnext**: `string` - -#### Defined in - -[schemas.ts:1874](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1874) - -___ - -### Variants - -Ƭ **Variants**: [`Variant`](/xdks/typescript/reference/interfaces/Schemas.Variant)[] - -#### Defined in - -[schemas.ts:1964](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1964) - -___ - -### Video - -Ƭ **Video**: `any` - -Schema type for Video - * - * - -#### Defined in - -[schemas.ts:1970](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1970) - -___ - -### WebhookConfigId - -Ƭ **WebhookConfigId**: `string` - -#### Defined in - -[schemas.ts:1995](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/schemas.ts#L1995) diff --git a/xdks/typescript/reference/modules/Spaces.mdx b/xdks/typescript/reference/modules/Spaces.mdx deleted file mode 100644 index 12a539cb7..000000000 --- a/xdks/typescript/reference/modules/Spaces.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "Namespace: Spaces" -sidebarTitle: "Namespace: Spaces" -description: "Reference for the Spaces module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetByIdsResponse - -Ƭ **GetByIdsResponse**: [`Get2SpacesResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesResponse) - -Response for getByIds - -#### Defined in - -[spaces/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/models.ts#L18) - -___ - -### GetPostsResponse - -Ƭ **GetPostsResponse**: [`Get2SpacesIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdTweetsResponse) - -Response for getPosts - -#### Defined in - -[spaces/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/models.ts#L24) - -___ - -### SearchResponse - -Ƭ **SearchResponse**: [`Get2SpacesSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesSearchResponse) - -Response for search - -#### Defined in - -[spaces/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/models.ts#L30) - -___ - -### GetBuyersResponse - -Ƭ **GetBuyersResponse**: [`Get2SpacesIdBuyersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdBuyersResponse) - -Response for getBuyers - -#### Defined in - -[spaces/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/models.ts#L36) - -___ - -### GetByIdResponse - -Ƭ **GetByIdResponse**: [`Get2SpacesIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesIdResponse) - -Response for getById - -#### Defined in - -[spaces/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/models.ts#L42) - -___ - -### GetByCreatorIdsResponse - -Ƭ **GetByCreatorIdsResponse**: [`Get2SpacesByCreatorIdsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2SpacesByCreatorIdsResponse) - -Response for getByCreatorIds - -#### Defined in - -[spaces/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/spaces/models.ts#L48) diff --git a/xdks/typescript/reference/modules/Stream.mdx b/xdks/typescript/reference/modules/Stream.mdx deleted file mode 100644 index dde3f2a27..000000000 --- a/xdks/typescript/reference/modules/Stream.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -title: "Namespace: Stream" -sidebarTitle: "Namespace: Stream" -description: "Reference for the Stream module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### LikesComplianceResponse - -Ƭ **LikesComplianceResponse**: [`LikesComplianceStreamResponse`](/xdks/typescript/reference/modules/Schemas#likescompliancestreamresponse) - -Response for likesCompliance - -#### Defined in - -[stream/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L18) - -___ - -### UsersComplianceResponse - -Ƭ **UsersComplianceResponse**: [`UserComplianceStreamResponse`](/xdks/typescript/reference/modules/Schemas#usercompliancestreamresponse) - -Response for usersCompliance - -#### Defined in - -[stream/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L24) - -___ - -### PostsFirehoseKoResponse - -Ƭ **PostsFirehoseKoResponse**: [`StreamingTweetResponse`](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) - -Response for postsFirehoseKo - -#### Defined in - -[stream/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L30) - -___ - -### LikesSample10Response - -Ƭ **LikesSample10Response**: [`StreamingLikeResponseV2`](/xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2) - -Response for likesSample10 - -#### Defined in - -[stream/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L36) - -___ - -### GetRuleCountsResponse - -Ƭ **GetRuleCountsResponse**: [`Get2TweetsSearchStreamRulesCountsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSearchStreamRulesCountsResponse) - -Response for getRuleCounts - -#### Defined in - -[stream/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L42) - -___ - -### LikesFirehoseResponse - -Ƭ **LikesFirehoseResponse**: [`StreamingLikeResponseV2`](/xdks/typescript/reference/interfaces/Schemas.StreamingLikeResponseV2) - -Response for likesFirehose - -#### Defined in - -[stream/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L48) - -___ - -### PostsFirehoseJaResponse - -Ƭ **PostsFirehoseJaResponse**: [`StreamingTweetResponse`](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) - -Response for postsFirehoseJa - -#### Defined in - -[stream/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L54) - -___ - -### PostsFirehoseEnResponse - -Ƭ **PostsFirehoseEnResponse**: [`StreamingTweetResponse`](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) - -Response for postsFirehoseEn - -#### Defined in - -[stream/models.ts:60](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L60) - -___ - -### GetRulesResponse - -Ƭ **GetRulesResponse**: [`RulesLookupResponse`](/xdks/typescript/reference/interfaces/Schemas.RulesLookupResponse) - -Response for getRules - -#### Defined in - -[stream/models.ts:66](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L66) - -___ - -### UpdateRulesRequest - -Ƭ **UpdateRulesRequest**: [`AddOrDeleteRulesRequest`](/xdks/typescript/reference/modules/Schemas#addordeleterulesrequest) - -Request for updateRules - -#### Defined in - -[stream/models.ts:72](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L72) - -___ - -### UpdateRulesResponse - -Ƭ **UpdateRulesResponse**: [`AddOrDeleteRulesResponse`](/xdks/typescript/reference/interfaces/Schemas.AddOrDeleteRulesResponse) - -Response for updateRules - -#### Defined in - -[stream/models.ts:78](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L78) - -___ - -### PostsSampleResponse - -Ƭ **PostsSampleResponse**: [`StreamingTweetResponse`](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) - -Response for postsSample - -#### Defined in - -[stream/models.ts:84](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L84) - -___ - -### PostsSample10Response - -Ƭ **PostsSample10Response**: [`Get2TweetsSample10StreamResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TweetsSample10StreamResponse) - -Response for postsSample10 - -#### Defined in - -[stream/models.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L90) - -___ - -### PostsComplianceResponse - -Ƭ **PostsComplianceResponse**: [`TweetComplianceStreamResponse`](/xdks/typescript/reference/modules/Schemas#tweetcompliancestreamresponse) - -Response for postsCompliance - -#### Defined in - -[stream/models.ts:96](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L96) - -___ - -### LabelsComplianceResponse - -Ƭ **LabelsComplianceResponse**: [`TweetLabelStreamResponse`](/xdks/typescript/reference/modules/Schemas#tweetlabelstreamresponse) - -Response for labelsCompliance - -#### Defined in - -[stream/models.ts:102](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L102) - -___ - -### PostsResponse - -Ƭ **PostsResponse**: [`FilteredStreamingTweetResponse`](/xdks/typescript/reference/interfaces/Schemas.FilteredStreamingTweetResponse) - -Response for posts - -#### Defined in - -[stream/models.ts:108](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L108) - -___ - -### PostsFirehoseResponse - -Ƭ **PostsFirehoseResponse**: [`StreamingTweetResponse`](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) - -Response for postsFirehose - -#### Defined in - -[stream/models.ts:114](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L114) - -___ - -### PostsFirehosePtResponse - -Ƭ **PostsFirehosePtResponse**: [`StreamingTweetResponse`](/xdks/typescript/reference/interfaces/Schemas.StreamingTweetResponse) - -Response for postsFirehosePt - -#### Defined in - -[stream/models.ts:120](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/stream/models.ts#L120) diff --git a/xdks/typescript/reference/modules/Trends.mdx b/xdks/typescript/reference/modules/Trends.mdx deleted file mode 100644 index c6c76b189..000000000 --- a/xdks/typescript/reference/modules/Trends.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Namespace: Trends" -sidebarTitle: "Namespace: Trends" -description: "Reference for the Trends module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -zedResponse](/xdks/typescript/reference/modules/Trends#getpersonalizedresponse) - -## Type Aliases - -### GetByWoeidResponse - -Ƭ **GetByWoeidResponse**: [`Get2TrendsByWoeidWoeidResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2TrendsByWoeidWoeidResponse) - -Response for getByWoeid - -#### Defined in - -[trends/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/models.ts#L18) - -___ - -### GetPersonalizedResponse - -Ƭ **GetPersonalizedResponse**: [`Get2UsersPersonalizedTrendsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersPersonalizedTrendsResponse) - -Response for getPersonalized - -#### Defined in - -[trends/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/trends/models.ts#L24) diff --git a/xdks/typescript/reference/modules/Usage.mdx b/xdks/typescript/reference/modules/Usage.mdx deleted file mode 100644 index d1b940697..000000000 --- a/xdks/typescript/reference/modules/Usage.mdx +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Namespace: Usage" -sidebarTitle: "Namespace: Usage" -description: "Reference for the Usage module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### GetResponse - -Ƭ **GetResponse**: [`Get2UsageTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse) - -Response for get - -#### Defined in - -[usage/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/usage/models.ts#L18) diff --git a/xdks/typescript/reference/modules/Users.mdx b/xdks/typescript/reference/modules/Users.mdx deleted file mode 100644 index 20ce3300a..000000000 --- a/xdks/typescript/reference/modules/Users.mdx +++ /dev/null @@ -1,539 +0,0 @@ ---- -title: "Namespace: Users" -sidebarTitle: "Namespace: Users" -description: "Reference for the Users module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## References - -### MuteUserRequest - -Re-exports [MuteUserRequest](/xdks/typescript/reference/interfaces/Schemas.MuteUserRequest) - -## Type Aliases - -### GetByUsernamesResponse - -Ƭ **GetByUsernamesResponse**: [`Get2UsersByResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByResponse) - -Response for getByUsernames - -#### Defined in - -[users/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L18) - -___ - -### GetRepostsOfMeResponse - -Ƭ **GetRepostsOfMeResponse**: [`Get2UsersRepostsOfMeResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersRepostsOfMeResponse) - -Response for getRepostsOfMe - -#### Defined in - -[users/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L24) - -___ - -### UnlikePostResponse - -Ƭ **UnlikePostResponse**: [`UsersLikesDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersLikesDeleteResponse) - -Response for unlikePost - -#### Defined in - -[users/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L30) - -___ - -### GetBookmarksResponse - -Ƭ **GetBookmarksResponse**: [`Get2UsersIdBookmarksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBookmarksResponse) - -Response for getBookmarks - -#### Defined in - -[users/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L36) - -___ - -### CreateBookmarkRequest - -Ƭ **CreateBookmarkRequest**: [`BookmarkAddRequest`](/xdks/typescript/reference/interfaces/Schemas.BookmarkAddRequest) - -Request for createBookmark - -#### Defined in - -[users/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L42) - -___ - -### CreateBookmarkResponse - -Ƭ **CreateBookmarkResponse**: [`BookmarkMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse) - -Response for createBookmark - -#### Defined in - -[users/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L48) - -___ - -### GetFollowersResponse - -Ƭ **GetFollowersResponse**: [`Get2UsersIdFollowersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowersResponse) - -Response for getFollowers - -#### Defined in - -[users/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L54) - -___ - -### UnpinListResponse - -Ƭ **UnpinListResponse**: [`ListUnpinResponse`](/xdks/typescript/reference/interfaces/Schemas.ListUnpinResponse) - -Response for unpinList - -#### Defined in - -[users/models.ts:60](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L60) - -___ - -### GetByIdResponse - -Ƭ **GetByIdResponse**: [`Get2UsersIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdResponse) - -Response for getById - -#### Defined in - -[users/models.ts:66](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L66) - -___ - -### GetMentionsResponse - -Ƭ **GetMentionsResponse**: [`Get2UsersIdMentionsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMentionsResponse) - -Response for getMentions - -#### Defined in - -[users/models.ts:72](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L72) - -___ - -### UnrepostPostResponse - -Ƭ **UnrepostPostResponse**: [`UsersRetweetsDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsDeleteResponse) - -Response for unrepostPost - -#### Defined in - -[users/models.ts:78](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L78) - -___ - -### DeleteBookmarkResponse - -Ƭ **DeleteBookmarkResponse**: [`BookmarkMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkMutationResponse) - -Response for deleteBookmark - -#### Defined in - -[users/models.ts:84](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L84) - -___ - -### UnfollowListResponse - -Ƭ **UnfollowListResponse**: [`ListFollowedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse) - -Response for unfollowList - -#### Defined in - -[users/models.ts:90](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L90) - -___ - -### UnmuteUserResponse - -Ƭ **UnmuteUserResponse**: [`MuteUserMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse) - -Response for unmuteUser - -#### Defined in - -[users/models.ts:96](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L96) - -___ - -### GetMeResponse - -Ƭ **GetMeResponse**: [`Get2UsersMeResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersMeResponse) - -Response for getMe - -#### Defined in - -[users/models.ts:102](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L102) - -___ - -### GetMutingResponse - -Ƭ **GetMutingResponse**: [`Get2UsersIdMutingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdMutingResponse) - -Response for getMuting - -#### Defined in - -[users/models.ts:108](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L108) - -___ - -### MuteUserResponse - -Ƭ **MuteUserResponse**: [`MuteUserMutationResponse`](/xdks/typescript/reference/interfaces/Schemas.MuteUserMutationResponse) - -Response for muteUser - -#### Defined in - -[users/models.ts:121](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L121) - -___ - -### SearchResponse - -Ƭ **SearchResponse**: [`Get2UsersSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersSearchResponse) - -Response for search - -#### Defined in - -[users/models.ts:127](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L127) - -___ - -### GetBlockingResponse - -Ƭ **GetBlockingResponse**: [`Get2UsersIdBlockingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdBlockingResponse) - -Response for getBlocking - -#### Defined in - -[users/models.ts:133](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L133) - -___ - -### GetByIdsResponse - -Ƭ **GetByIdsResponse**: [`Get2UsersResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersResponse) - -Response for getByIds - -#### Defined in - -[users/models.ts:139](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L139) - -___ - -### GetFollowingResponse - -Ƭ **GetFollowingResponse**: [`Get2UsersIdFollowingResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowingResponse) - -Response for getFollowing - -#### Defined in - -[users/models.ts:145](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L145) - -___ - -### FollowUserRequest - -Ƭ **FollowUserRequest**: [`UsersFollowingCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateRequest) - -Request for followUser - -#### Defined in - -[users/models.ts:151](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L151) - -___ - -### FollowUserResponse - -Ƭ **FollowUserResponse**: [`UsersFollowingCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingCreateResponse) - -Response for followUser - -#### Defined in - -[users/models.ts:157](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L157) - -___ - -### LikePostRequest - -Ƭ **LikePostRequest**: [`UsersLikesCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateRequest) - -Request for likePost - -#### Defined in - -[users/models.ts:163](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L163) - -___ - -### LikePostResponse - -Ƭ **LikePostResponse**: [`UsersLikesCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersLikesCreateResponse) - -Response for likePost - -#### Defined in - -[users/models.ts:169](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L169) - -___ - -### GetLikedPostsResponse - -Ƭ **GetLikedPostsResponse**: [`Get2UsersIdLikedTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdLikedTweetsResponse) - -Response for getLikedPosts - -#### Defined in - -[users/models.ts:175](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L175) - -___ - -### GetPostsResponse - -Ƭ **GetPostsResponse**: [`Get2UsersIdTweetsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTweetsResponse) - -Response for getPosts - -#### Defined in - -[users/models.ts:181](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L181) - -___ - -### BlockDmsResponse - -Ƭ **BlockDmsResponse**: [`UsersDMBlockCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersDMBlockCreateResponse) - -Response for blockDms - -#### Defined in - -[users/models.ts:187](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L187) - -___ - -### GetListMembershipsResponse - -Ƭ **GetListMembershipsResponse**: [`Get2UsersIdListMembershipsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdListMembershipsResponse) - -Response for getListMemberships - -#### Defined in - -[users/models.ts:193](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L193) - -___ - -### GetPinnedListsResponse - -Ƭ **GetPinnedListsResponse**: [`Get2UsersIdPinnedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdPinnedListsResponse) - -Response for getPinnedLists - -#### Defined in - -[users/models.ts:199](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L199) - -___ - -### PinListRequest - -Ƭ **PinListRequest**: [`ListPinnedRequest`](/xdks/typescript/reference/interfaces/Schemas.ListPinnedRequest) - -Request for pinList - -#### Defined in - -[users/models.ts:205](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L205) - -___ - -### PinListResponse - -Ƭ **PinListResponse**: [`ListPinnedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListPinnedResponse) - -Response for pinList - -#### Defined in - -[users/models.ts:211](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L211) - -___ - -### GetByUsernameResponse - -Ƭ **GetByUsernameResponse**: [`Get2UsersByUsernameUsernameResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersByUsernameUsernameResponse) - -Response for getByUsername - -#### Defined in - -[users/models.ts:217](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L217) - -___ - -### UnfollowUserResponse - -Ƭ **UnfollowUserResponse**: [`UsersFollowingDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersFollowingDeleteResponse) - -Response for unfollowUser - -#### Defined in - -[users/models.ts:223](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L223) - -___ - -### GetTimelineResponse - -Ƭ **GetTimelineResponse**: [`Get2UsersIdTimelinesReverseChronologicalResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdTimelinesReverseChronologicalResponse) - -Response for getTimeline - -#### Defined in - -[users/models.ts:229](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L229) - -___ - -### GetFollowedListsResponse - -Ƭ **GetFollowedListsResponse**: [`Get2UsersIdFollowedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdFollowedListsResponse) - -Response for getFollowedLists - -#### Defined in - -[users/models.ts:235](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L235) - -___ - -### FollowListRequest - -Ƭ **FollowListRequest**: [`ListFollowedRequest`](/xdks/typescript/reference/interfaces/Schemas.ListFollowedRequest) - -Request for followList - -#### Defined in - -[users/models.ts:241](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L241) - -___ - -### FollowListResponse - -Ƭ **FollowListResponse**: [`ListFollowedResponse`](/xdks/typescript/reference/interfaces/Schemas.ListFollowedResponse) - -Response for followList - -#### Defined in - -[users/models.ts:247](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L247) - -___ - -### UnblockDmsResponse - -Ƭ **UnblockDmsResponse**: [`UsersDMUnBlockCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersDMUnBlockCreateResponse) - -Response for unblockDms - -#### Defined in - -[users/models.ts:253](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L253) - -___ - -### RepostPostRequest - -Ƭ **RepostPostRequest**: [`UsersRetweetsCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateRequest) - -Request for repostPost - -#### Defined in - -[users/models.ts:259](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L259) - -___ - -### RepostPostResponse - -Ƭ **RepostPostResponse**: [`UsersRetweetsCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.UsersRetweetsCreateResponse) - -Response for repostPost - -#### Defined in - -[users/models.ts:265](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L265) - -___ - -### GetBookmarkFoldersResponse - -Ƭ **GetBookmarkFoldersResponse**: [`BookmarkFoldersResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkFoldersResponse) - -Response for getBookmarkFolders - -#### Defined in - -[users/models.ts:271](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L271) - -___ - -### GetOwnedListsResponse - -Ƭ **GetOwnedListsResponse**: [`Get2UsersIdOwnedListsResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2UsersIdOwnedListsResponse) - -Response for getOwnedLists - -#### Defined in - -[users/models.ts:277](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L277) - -___ - -### GetBookmarksByFolderIdResponse - -Ƭ **GetBookmarksByFolderIdResponse**: [`BookmarkFolderPostsResponse`](/xdks/typescript/reference/interfaces/Schemas.BookmarkFolderPostsResponse) - -Response for getBookmarksByFolderId - -#### Defined in - -[users/models.ts:283](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/users/models.ts#L283) diff --git a/xdks/typescript/reference/modules/Webhooks.mdx b/xdks/typescript/reference/modules/Webhooks.mdx deleted file mode 100644 index 826e373f5..000000000 --- a/xdks/typescript/reference/modules/Webhooks.mdx +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: "Namespace: Webhooks" -sidebarTitle: "Namespace: Webhooks" -description: "Reference for the Webhooks module in the X API TypeScript SDK. Re-exported clients, types, and utilities provided by this SDK module for the X API v2." ---- - -## Type Aliases - -### CreateStreamLinkResponse - -Ƭ **CreateStreamLinkResponse**: [`WebhookLinksCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse) - -Response for createStreamLink - -#### Defined in - -[webhooks/models.ts:18](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L18) - -___ - -### DeleteStreamLinkResponse - -Ƭ **DeleteStreamLinkResponse**: [`WebhookLinksDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse) - -Response for deleteStreamLink - -#### Defined in - -[webhooks/models.ts:24](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L24) - -___ - -### GetStreamLinksResponse - -Ƭ **GetStreamLinksResponse**: [`WebhookLinksGetResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse) - -Response for getStreamLinks - -#### Defined in - -[webhooks/models.ts:30](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L30) - -___ - -### CreateWebhookReplayJobRequest - -Ƭ **CreateWebhookReplayJobRequest**: [`WebhookReplayCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.WebhookReplayCreateRequest) - -Request for createWebhookReplayJob - -#### Defined in - -[webhooks/models.ts:36](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L36) - -___ - -### CreateWebhookReplayJobResponse - -Ƭ **CreateWebhookReplayJobResponse**: [`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse) - -Response for createWebhookReplayJob - -#### Defined in - -[webhooks/models.ts:42](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L42) - -___ - -### ValidateResponse - -Ƭ **ValidateResponse**: [`WebhookConfigPutResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse) - -Response for validate - -#### Defined in - -[webhooks/models.ts:48](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L48) - -___ - -### DeleteResponse - -Ƭ **DeleteResponse**: [`WebhookConfigDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse) - -Response for delete - -#### Defined in - -[webhooks/models.ts:54](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L54) - -___ - -### GetResponse - -Ƭ **GetResponse**: [`Get2WebhooksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse) - -Response for get - -#### Defined in - -[webhooks/models.ts:60](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L60) - -___ - -### CreateRequest - -Ƭ **CreateRequest**: [`WebhookConfigCreateRequest`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateRequest) - -Request for create - -#### Defined in - -[webhooks/models.ts:66](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L66) - -___ - -### CreateResponse - -Ƭ **CreateResponse**: [`WebhookConfigCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse) - -Response for create - -#### Defined in - -[webhooks/models.ts:72](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/models.ts#L72) diff --git a/xdks/typescript/reference/overview.mdx b/xdks/typescript/reference/overview.mdx new file mode 100644 index 000000000..cbda0ee3d --- /dev/null +++ b/xdks/typescript/reference/overview.mdx @@ -0,0 +1,75 @@ +--- +title: "TypeScript XDK API Reference" +sidebarTitle: "Overview" +description: "Complete API reference for the official TypeScript XDK (@xdevplatform/xdk v0.7.2) across all X API v2 resource clients." +--- + +The official **TypeScript XDK** (`@xdevplatform/xdk`, `v0.7.2`) provides typed resource clients, authentication helpers, automatic pagination, and real-time streaming for the X API v2. + + + + Install `@xdevplatform/xdk` (`v0.7.2`) — requires Node.js 18+ (ESM & CommonJS). + + + Source code, release notes, and issue tracker for `@xdevplatform/xdk`. + + + +## Installation + +```bash +npm install @xdevplatform/xdk +``` + +## `Client` Initialization + +```typescript +import { Client } from "@xdevplatform/xdk"; + +const client = new Client({ bearerToken: process.env.X_BEARER_TOKEN }); +``` + + + App-only OAuth 2.0 Bearer Token for public read and search endpoints. + + + OAuth 2.0 user-context access token for endpoints acting on behalf of a user. + + + Configured `OAuth1` signer for OAuth 1.0a user-context requests. + + + Base URL for X API requests. + + + Request timeout in milliseconds. + + +## Resource Clients + +| Resource | Accessor | Client Class | Operations | +| :--- | :--- | :--- | ---: | +| [Account](/xdks/typescript/reference/clients/account) | `client.account` | `AccountClient` | 2 | +| [Account Activity](/xdks/typescript/reference/clients/account-activity) | `client.accountActivity` | `AccountActivityClient` | 5 | +| [Activity](/xdks/typescript/reference/clients/activity) | `client.activity` | `ActivityClient` | 5 | +| [Articles](/xdks/typescript/reference/clients/articles) | `client.articles` | `ArticlesClient` | 2 | +| [Bots](/xdks/typescript/reference/clients/bots) | `client.bots` | `BotsClient` | 6 | +| [Broadcasts](/xdks/typescript/reference/clients/broadcasts) | `client.broadcasts` | `BroadcastsClient` | 41 | +| [Calls](/xdks/typescript/reference/clients/calls) | `client.calls` | `CallsClient` | 10 | +| [Chat](/xdks/typescript/reference/clients/chat) | `client.chat` | `ChatClient` | 45 | +| [Communities](/xdks/typescript/reference/clients/communities) | `client.communities` | `CommunitiesClient` | 2 | +| [Community Notes](/xdks/typescript/reference/clients/community-notes) | `client.communityNotes` | `CommunityNotesClient` | 5 | +| [Compliance](/xdks/typescript/reference/clients/compliance) | `client.compliance` | `ComplianceClient` | 6 | +| [Connections](/xdks/typescript/reference/clients/connections) | `client.connections` | `ConnectionsClient` | 4 | +| [Direct Messages](/xdks/typescript/reference/clients/direct-messages) | `client.directMessages` | `DirectMessagesClient` | 9 | +| [General](/xdks/typescript/reference/clients/general) | `client.general` | `GeneralClient` | 1 | +| [Lists](/xdks/typescript/reference/clients/lists) | `client.lists` | `ListsClient` | 9 | +| [Media](/xdks/typescript/reference/clients/media) | `client.media` | `MediaClient` | 19 | +| [News](/xdks/typescript/reference/clients/news) | `client.news` | `NewsClient` | 2 | +| [Posts](/xdks/typescript/reference/clients/posts) | `client.posts` | `PostsClient` | 17 | +| [Spaces](/xdks/typescript/reference/clients/spaces) | `client.spaces` | `SpacesClient` | 6 | +| [Stream](/xdks/typescript/reference/clients/stream) | `client.stream` | `StreamClient` | 18 | +| [Trends](/xdks/typescript/reference/clients/trends) | `client.trends` | `TrendsClient` | 3 | +| [Usage](/xdks/typescript/reference/clients/usage) | `client.usage` | `UsageClient` | 2 | +| [Users](/xdks/typescript/reference/clients/users) | `client.users` | `UsersClient` | 46 | +| [Webhooks](/xdks/typescript/reference/clients/webhooks) | `client.webhooks` | `WebhooksClient` | 8 |