20 releases

new 0.0.21 Feb 16, 2025
0.0.20 Feb 15, 2025
0.0.19 Jan 30, 2025
0.0.16 Nov 17, 2024
0.0.3 Aug 17, 2024

#573 in Authentication

Download history 257/week @ 2024-10-27 114/week @ 2024-11-03 153/week @ 2024-11-10 130/week @ 2024-11-17 9/week @ 2024-11-24 9/week @ 2024-12-01 5/week @ 2024-12-08 83/week @ 2025-01-19 137/week @ 2025-01-26 45/week @ 2025-02-02 51/week @ 2025-02-09

321 downloads per month
Used in 2 crates

MPL-2.0 license

275KB
5.5K SLoC

OpenIAP client c library

This is the rust implementation of the openiap client. This will also function as the "base" for openiap SDK implementations in other programming languages. For now this is only the GRPC and WebSocket client, later we will add a web rest, named pipe and TCP client as well.


lib.rs:

The openiap.client crate provides the [Client] struct and its methods. For now this is only the GRPC and WebSocket client, later we will add a web rest, named pipe and TCP client as well. Initialize a new client, by calling the Client::new_connect method.

use openiap_client::{OpenIAPError, Client, QueryRequest};
#[tokio::main]
async fn main() -> Result<(), OpenIAPError> {
    let client = Client::new_connect("").await?;
    let q = client.query( QueryRequest::with_projection(
        "entities",
        "{}",
        "{\"name\":1}"
    )).await?;
    let items: serde_json::Value = serde_json::from_str(&q.results).unwrap();
    let items: &Vec<serde_json::Value> = items.as_array().unwrap();
    for item in items {
        println!("Item: {:?}", item);
    }
    Ok(())
}

Dependencies

~15–53MB
~766K SLoC