1 unstable release
0.1.0 | Apr 17, 2021 |
---|
#1309 in Asynchronous
11KB
160 lines
icanhazdadjoke-sdk
This is a crate for interacting with the icanhazdadjoke API.
Here are some examples for how you can use it:
Examples
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
Contributing
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
License: MIT
lib.rs
:
This is an unofficial Rust SDK for interacting with the icanhazdadjoke API.
Here are some examples for how you can use it:
Examples
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
Documentation
Check out the full documentation at docs.rs.
Contributing
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
Dependencies
~5–16MB
~228K SLoC