/megalodon-rs-no-openssl

The megalodon-rs library but without openssl

Primary LanguageRustApache License 2.0Apache-2.0

Megalodon Without OpenSSL

Just changed some package feature flags to make this compile without openssl (no linking to -lssl, or -lcrypto). The rest of it is the same.

You should be able to add a lot more compilation targets now (including wasm)

Megalodon

Crates.io docs.rs Build GitHub

The megalodon is a client library for Fediverse. It provides REST API and streaming method which uses WebSocket. By using this library, you can take Mastodon, Pleroma, and Friendica with the same interface. This library is Rust version of megalodon.

Supporting

  • Mastodon
  • Pleroma
  • Friendica
  • Firefish
  • Gotosocial
  • Akkoma (Unofficial)

Features

  • REST API
  • Admin API
  • WebSocket for Streamings

Usage

Add your Cargo.toml like this:

[dependencies]
megalodon = { version = "0.11" }

Making Mastodon request

For a request without authentication.

let client = megalodon::generator(
  megalodon::SNS::Mastodon,
  String::from("https://fedibird.com"),
  None,
  None,
);
let res = client.get_instance().await?;
println!("{:#?}", res.json());

Making Mastodon request with authentication

For a request with authentication.

let client = megalodon::generator(
  megalodon::SNS::Mastodon,
  String::from("https://fedibird.com"),
  Some(String::from("your access token")),
  None,
);
let res = client.verify_account_credentials().await?;
println!("{:#?}", res.json());

License

The software is available as open source under the terms of the Apache License 2.0.