bionic_reading_api/
lib.rs

1//! Unofficial Rust library to get a Bionic Reading converted string from their Rapid API.
2//!
3//! Allows setting fixation and saccade to values supported by the API.
4//! For more information on Bionic Reading see the [official page](https://bionic-reading.com/).
5//!
6//! The returned string can be used either as raw HTML straight from the response or a Markdown converted version of the HTML.
7//!
8//! ## Example
9//!
10//! ```rust,no_run
11//! use bionic_reading_api::client::Client;
12//!
13//! #[tokio::main]
14//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
15//!     let res = Client::new("api_key")
16//!         .convert("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.")
17//!         .send()
18//!         .await?;
19//!
20//!     let html = res.html().unwrap();
21//!     let markdown = res.markdown().unwrap();
22//!
23//!     println!("{html}");
24//!     println!("{markdown}");
25//!
26//!     Ok(())
27//! }
28//! ```
29
30pub mod bionic;
31pub mod client;
32mod requests;
33mod secret;
34
35pub use bionic::{Error as BionicError, Text as BionicText};