Expand description
A Rust SDK for lotide
§Usage
use meztide::prelude::*;
#[tokio::main]
async fn main() {
let client = Client::new("https://c.tide.tk/api/unstable");
let communities = client.communities(&Default::default()).await.unwrap();
let posts = client.posts(&Default::default()).await.unwrap();
let community_id = CommunityId(1);
// Get community data
let community = community_id.to_community(&client).await.unwrap();
// Get community moderators
let moderators = community_id.moderators(&client).await.unwrap();
// Follow the community
let _ = community_id.follow(&client, false).await.unwrap();
// Delete the community
let _ = community_id.delete(&client).await.unwrap();
}See Client or
ids for more things you can do.
See api_models for more sights you can see.
Modules§
- api_
models - Models returned by the API
- client
- Starting point for interacting with a lotide API
- ids
- Various ID types
- prelude
- Convenient re-exports
- request_
models - Models used when making requests to the API