1pub mod auth;
2pub mod search;
3pub mod types;
4use std::{path::PathBuf, sync::Arc};
5
6use reqwest::Client;
7mod profile;
8mod users;
9
10pub const LOGIN_URL: &str = "https://api.twitter.com/1.1/onboarding/task.json";
11pub const LOGOUR_URL: &str = "https://api.twitter.com/1.1/account/logout.json";
12pub const GUEST_ACTIVE_URL: &str = "https://api.twitter.com/1.1/guest/activate.json";
13pub const VERIFY_CREDENTIALS_URL: &str =
14 "https://api.twitter.com/1.1/account/verify_credentials.json";
15pub const OAUTH_URL: &str = "https://api.twitter.com/oauth2/token";
16pub const BEARER_TOKEN: &str = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA";
17pub const APP_CONSUMER_KEY: &str = "3nVuSoBZnx6U4vzUxf5w";
18pub const APP_CONSUMER_SECRET: &str = "Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys";
19
20pub struct TwAPI {
21 client: Client,
22 guest_token: String,
23 csrf_token: String,
24 cookie_store: Arc<reqwest_cookie_store::CookieStoreMutex>,
25 session_path: Option<PathBuf>
26}
27