Crate lemmy_client

source ·
Expand description

A Rust HTTP client for Lemmy. If used when targeting WASM, uses the browser’s built-in fetch API to reduce bundle size.


use lemmy_client::{LemmyClient, ClientOptions};

async fn get_site_test() {
  let client = LemmyClient::new(ClientOptions {
    domain: String::from(""),
    secure: true

  let res = client.get_site(()).await;


//! ## IMPORTANT NOTICE This crate now uses a different versioning scheme than before so as not to be too tied down to Lemmy releases. For Lemmy versions 0.19.4 and up, use versions 1.x.x. For Lemmy versions 0.19.3 and under, use versions 0.19.5 and up. This is confusing, but should become a non issue as Lemmy accumulates versions and fewer servers use Lemmy versions use 0.19.3 and lower.