5个版本
0.1.4 | 2023年11月27日 |
---|---|
0.1.3 | 2023年7月24日 |
0.1.2 | 2023年7月23日 |
0.1.1 | 2023年7月22日 |
0.1.0 | 2023年7月22日 |
#1 in #engineered
每月75次下载
60KB
1.5K SLoC
ReverseEngineeredTwitterAPI
逆向工程Twitter的API没有太多限制,速率限制与通过Twitter网站登录的常规用户一致,无需考虑支付问题。
安装
[dependencies]
reverse-engineered-twitter-api = "0.1.3"
用法
登录
let mut api = ReAPI::new();
let name = std::env::var("TWITTER_USER_NAME").unwrap();
let pwd = std::env::var("TWITTER_USER_PASSWORD").unwrap();
// If no verification code is required, set it to empty
let confirmation_code = "";
api.login(&name, &pwd, confirmation_code).await
// check if account is logged in
let is_logged_in = api.is_logged_in().await;
搜索
// search tweets
let content = "@lidangzzz -filter:retweets";
let limit = 50;
let cursor = "";
api.search_tweets(content, limit, cursor).await;
依赖项
~7–22MB
~302K SLoC