aqara

Crates.ioaqara
lib.rsaqara
version0.1.1
created_at2024-08-31 02:06:28.647866+00
updated_at2026-01-02 15:41:22.772477+00
descriptionAqara SDK for Rust.
homepagehttps://github.com/lvillis/aqara-sdk-rust
repositoryhttps://github.com/lvillis/aqara-sdk-rust
max_upload_size
id1358511
size272,002
(lvillis)

documentation

https://docs.rs/aqara

README

Table of Contents↗️

aqara-sdk-rust

Aqara SDK for Rust.

crates.io version crates.io version build status say thanks

Features

  • Auth interface

  • Location management interface

  • Equipment distribution network interface

  • Device management interface

  • Device resource interface

  • Infrared device management interface

  • Device firmware management interface

  • Linkage configuration query interface

  • Automation management interface

  • Scene management interface

  • Condition set management interface

  • Voice control interface

  • Push subscription interface

Usage

[dependencies]
aqara = "0.1.0"
use aqara::types::{Credentials, Endpoint};
use aqara::Client;

#[tokio::main]
async fn main() -> Result<(), aqara::Error> {
    let client = Client::builder(Credentials::new("APP_ID", "KEY_ID", "APP_KEY"))
        .endpoint(Endpoint::Singapore)
        .access_token("ACCESS_TOKEN")
        .build()?;

    let resp = client.positions().list(Default::default()).await?;
    println!("requestId={} message={}", resp.request_id(), resp.message());
    println!("result={:?}", resp.result());

    Ok(())
}
Commit count: 17

cargo fmt