all repos — omglolrs @ main

A Rust wrapper for api.omg.lol.

e780098d
Auto formatting
Gil Poiares-Oliveira gil@poiares-oliveira.com
Wed, 10 May 2023 13:21:40 +0100
614c5b12
Fix README.md examples to match new auth workflow
Gil Poiares-Oliveira gil@poiares-oliveira.com
Wed, 10 May 2023 13:20:21 +0100
5b3bead8
Before the grammar police notices...
Gil Poiares-Oliveira gil@poiares-oliveira.com
Wed, 10 May 2023 13:15:57 +0100

omglol crate for Rust

An asynchronous Rust wrapper for the omg.lol API by Gil.

LICENSE: MPL 2.0 (see LICENSE)

Warning: This is a work in progress

Unstable and bug-prone. Endpoints may change. Upstream endpoints under development.

Contribute

Project homepage

Repos: sourcehut (canonical) | GitLab | GitHub | Codeberg

Caught a bug? Mail in a ticket after checking the bug tracker.

Examples

Get service status

use omglol::client::OmglolClient;

fn main() {
  let response = OmglolClient::new()
                  .get_service_status()
                  .await;
  println!("{:#?}", response);
}

Fetch a webpage

use omglol::client::OmglolClient;

fn main() {
  let response = OmglolClient::new()
                  .auth("YOUR_API_KEY_HERE")
                  .get_web_page("your-address")
                  .await();
  println!("{:#?}", response);
}
clone
git clone https://git.giloliveira.net/omglolrs