3 releases

✓ Uses Rust 2018 edition

0.1.2 Dec 31, 2019
0.1.1 Apr 20, 2019
0.1.0 Apr 6, 2019

#48 in #client

Custom license

70KB
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 = "0.2", features = ["macros"] }
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

~5–7.5MB
~163K SLoC