2 releases
0.1.1 | Sep 22, 2024 |
---|---|
0.1.0 | Sep 22, 2024 |
#1560 in Web programming
64 downloads per month
24KB
389 lines
kasane
kasane is a simple (and blazingly fast 🚀) library for the Tetter social media platform API.
It allows you to post tets at blazingly-fast(🚀) speeds, powered by Rust, Reqwest and Tokio.
[!NOTE] Both Tetter and kasane.rs are still in development. Things may change as time goes on.
Usage
- Log in to your Tetter account on https://tetter.vercel.app.
- Find your token (required for authenticated requests).
You can find this in 2 ways:
- Find the Firebase token in IndexedDB
- Open DevTools, and enter the
Storage
tab - Go to IndexedDB, and find
tetter.vercel.app > firebaseLocalStorageDb > firebase:authUser:XXXXXXXX > value > stsTokenManager > accessToken
- Copy the value of
accessToken
- Open DevTools, and enter the
- Get the token from headers
- Open DevTools, and enter the
Network
tab - Do any action that requires authorization, like checking notifications
- Find the
Authorization
header, and copy the value ofBearer XXXXXXXX
- Open DevTools, and enter the
- Find the Firebase token in IndexedDB
- Now use kasane to post your tets!
use kasane::Tetter;
#[tokio::main]
async fn main() {
let client = kasane::Client::new(Some("your_token_here".to_string()));
let tet = kasane::Tet::compose(&client, "Hello from kasane.rs").await.unwrap();
println!("{:?}", tet);
}
See examples/ for more examples.
Dependencies
~7–19MB
~266K SLoC