bionic_reading_api

Crates.iobionic_reading_api
lib.rsbionic_reading_api
version0.1.1
sourcesrc
created_at2023-06-07 20:47:43.570476
updated_at2023-07-30 21:37:19.039939
descriptionUnofficial Rust library to get a Bionic Reading converted string from their Rapid API.
homepage
repositoryhttps://github.com/ProgDroid/bionic_reading_api
max_upload_size
id885003
size55,724
nando (ProgDroid)

documentation

https://docs.rs/bionic_reading_api/latest

README

cio-img ci-img doc-img

Bionic Reading API

Unofficial Rust library to get a Bionic Reading converted string from their Rapid API.

Allows setting fixation and saccade to values supported by the API. For more information on Bionic Reading see the official page.

The returned string can be used either as raw HTML straight from the response or a Markdown converted version of the HTML.

Example

use bionic_reading_api::client::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let res = Client::new("api_key")
        .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.")
        .send()
        .await?;

    let html = res.html().unwrap();
    let markdown = res.markdown().unwrap();

    println!("{html}");
    println!("{markdown}");

    Ok(())
}
Commit count: 16

cargo fmt