7 releases

0.1.7 May 3, 2024
0.1.6 Mar 6, 2023
0.1.4 Jun 6, 2020
0.1.2 Dec 31, 2019
0.1.1 Apr 20, 2019

#796 in Parser implementations

Download history 4/week @ 2024-07-24 1/week @ 2024-08-14 1/week @ 2024-09-04 4/week @ 2024-09-18 12/week @ 2024-09-25 1/week @ 2024-10-02 2/week @ 2024-10-09

522 downloads per month

Custom license

75KB
1K SLoC

algoliasearch

algoliasearch is a (really incomplete) rust implemention of an algolia client.

Crates.io Documentation Build Status

usage

use algoliasearch::Client;
// needs tokio as a dependency,
// tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
use tokio;

#[derive(Deserialize)]
struct User {
    name: String,
    age: u32,
}

#[tokio::main]
async fn main() -> Result<(), Box<Error>> {
    // read ALGOLIA_APPLICATION_ID and ALGOLIA_API_KEY from env
    let index = Client::default().init_index::<User>("users");

    let res = index.search("Bernardo").await?;
    dbg!(res.hits); // [User { name: "Bernardo", age: 32} ]

    Ok(())
}

todo

  • Add all the remaining calls

Dependencies

~6–22MB
~255K SLoC