Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sno2/icanhazdadjoke-sdk
An SDK to interact with the icanhazdadjoke Dad Jokes API.
https://github.com/sno2/icanhazdadjoke-sdk
icanhazdadjoke rust rust-crate sdk
Last synced: 24 days ago
JSON representation
An SDK to interact with the icanhazdadjoke Dad Jokes API.
- Host: GitHub
- URL: https://github.com/sno2/icanhazdadjoke-sdk
- Owner: sno2
- License: mit
- Created: 2021-04-17T21:15:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-26T16:04:02.000Z (over 3 years ago)
- Last Synced: 2024-12-01T16:17:45.960Z (about 1 month ago)
- Topics: icanhazdadjoke, rust, rust-crate, sdk
- Language: Rust
- Homepage: https://crates.io/crates/icanhazdadjoke-sdk
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# icanhazdadjoke-sdk
This is a crate for interacting with the [icanhazdadjoke API](https://icanhazdadjoke.com/).
Here are some examples for how you can use it:
## Examples
```rust
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](https://crates.io/crates/cargo-readme). After that, just run the following command every time you edit the [README.md](./README.md) file:
```sh
cargo readme > README.md
```Also, make sure you run `cargo test` to make sure all the code is still working.
### License
[See attached license](./LICENSE)
License: MIT