Skip to main content

twikit/
lib.rs

1#![forbid(unsafe_code)]
2#![warn(missing_docs)]
3
4//! Async Rust client for the same Twitter/X web APIs used by Python twikit.
5//!
6//! The crate intentionally keeps the raw JSON beside typed convenience models.
7//! X changes response shapes often, and preserving the original payload prevents
8//! data loss while still giving callers a Rust-first API for common workflows.
9
10pub mod captcha;
11pub mod client;
12pub mod constants;
13pub mod endpoints;
14pub mod error;
15pub mod flow;
16pub mod gql;
17pub mod media;
18pub mod models;
19pub mod result;
20pub mod streaming;
21pub mod transaction;
22pub mod ui_metrics;
23pub mod utils;
24pub mod v11;
25
26pub use captcha::{Capsolver, CaptchaSolver, UnlockHTML};
27pub use client::{
28    Client, ClientBuilder, ConversationControl, CreateTweetOptions, GuestClient, LoginOptions,
29    RawApiResponse, RequestOptions, SearchGeoOptions, TrendsOptions, TweetDetail,
30    TweetSearchProduct, TweetType,
31};
32pub use error::{Error, Result};
33pub use flow::Flow;
34pub use gql::GQLClient;
35pub use media::{AnimatedGif, Media, MediaKind, MediaVariant, Photo, Stream, Video};
36pub use models::{
37    BookmarkFolder, Community, CommunityMember, CommunityNote, Group, GroupMessage, List, Location,
38    Message, Notification, Place, PlaceTrend, PlaceTrends, Poll, ScheduledTweet, Trend, Tweet,
39    User,
40};
41pub use result::Timeline;
42pub use v11::V11Client;