Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tettersocial/kasane
Rust library for the Tetter API
https://github.com/tettersocial/kasane
api-bindings kasane-teto rest-api teto teto-kasane tetter
Last synced: about 1 month ago
JSON representation
Rust library for the Tetter API
- Host: GitHub
- URL: https://github.com/tettersocial/kasane
- Owner: TetterSocial
- License: mit
- Created: 2024-09-22T15:04:21.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-23T23:15:17.000Z (about 2 months ago)
- Last Synced: 2024-10-11T10:43:26.129Z (about 1 month ago)
- Topics: api-bindings, kasane-teto, rest-api, teto, teto-kasane, tetter
- Language: Rust
- Homepage: https://crates.io/crates/kasane
- Size: 17.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
1. Log in to your Tetter account on [https://tetter.vercel.app].
2. Find your token (required for authenticated requests).
You can find this in 2 ways:
- Find the Firebase token in IndexedDB
1. Open DevTools, and enter the `Storage` tab
2. Go to IndexedDB, and find `tetter.vercel.app > firebaseLocalStorageDb > firebase:authUser:XXXXXXXX > value > stsTokenManager > accessToken`
3. Copy the value of `accessToken`
- Get the token from headers
1. Open DevTools, and enter the `Network` tab
2. Do any action that requires authorization, like checking notifications
3. Find the `Authorization` header, and copy the value of `Bearer XXXXXXXX`
3. Now use kasane to post your tets!```rust
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/](examples/) for more examples.