Expand description
Norris
Simple async wrapper for the Chuck Norris Joke API.
Usage
Example for retrieving 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.
Structs
API response when requesting a joke - reduced to the joke string only
API response when searching by search terms - contains multiple jokes and the total amount of
received jokes
Enums
Available joke categories to search by
Functions
Searches for all jokes that contain the
search_stringSearches for a joke that contain the
search_string