opentdb-rs

Build Status MIT licensed crates.io Released API docs dependency status codecov

An implementation of the Open Trivia Database API in Rust.

The library is built with forward-compatibility in mind, you can handle your own custom things, provide your own custom base url, and handle custom error codes or elements that MAY be implemented in the future that aren't mapped to the library.

Library

Install

bash cargo add opentdb

Usage

For usage, review the examples here: examples/01baseusage.rs

Limitations

License and Acknowledgements

opentdb-rs itself is licensed under the MIT license, opentdb-rs is not affiliated with the website or API it is using.

opentdb-rs depends on serde (for (de)serialization) and reqwest (for sending HTTP requests), percent-encoding for encoding URLs conform to RFCs. It also uses a dev-dependency mockito for integration tests.

The Open Trivia Database is a collection of user-contributed trivia questions. This project would not be possible without it.

All data provided by their API is available under the Creative Commons Attribution-ShareAlike 4.0 International License as is written on the Open Trivia Database website.