#joke #api #funny #chuck

norris

Simple async wrapper for the Chuck Norris Joke API: https://api.chucknorris.io/

4 releases

0.1.3 Jan 18, 2023
0.1.2 Jan 18, 2023
0.1.1 Jan 17, 2023
0.1.0 Jan 17, 2023

#17 in #funny

MIT license

7KB
113 lines

Norris

Simple async wrapper for the Chuck Norris Joke API.

Usage

Example for retrieving a random joke:

use::std::error::Error;
use::norris::get_random_joke;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let joke = get_random_joke().await?.value;
    println!("{}", joke);
    Ok(())
}

Documentation

Please refer to docs.rs.

Dependencies

~7–19MB
~256K SLoC