Crates.io | icanhazdadjoke-sdk |
lib.rs | icanhazdadjoke-sdk |
version | 0.1.0 |
source | src |
created_at | 2021-04-17 23:03:25.761059 |
updated_at | 2021-04-17 23:03:25.761059 |
description | An SDK to interact with the icanhazdadjoke Dad Jokes API. |
homepage | |
repository | https://github.com/sno2/icanhazdadjoke-sdk/ |
max_upload_size | |
id | 385962 |
size | 11,332 |
This is a crate for interacting with the icanhazdadjoke API.
Here are some examples for how you can use it:
use icanhazdadjoke_sdk::{DadJokeSDK, PaginationOpts};
let dad_joke_sdk = DadJokeSDK::new("NAME_YOUR_APP".into()); // you can basically just put in here what your app is doing
let random_joke = dad_joke_sdk.get_random_joke().await; // gets a random joke
let paginated_jokes = dad_joke_sdk.query_jokes("pizza", PaginationOpts::default()).await; // you can specify more within the pagination options if you would like
First, install cargo readme. After that, just run the following command every time you edit the README.md file:
cargo readme > README.md
Also, make sure you run cargo test
to make sure all the code is still working.
License: MIT