Crate larkrs_client

Crate larkrs_client 

Source
Expand description

§larkrs-client

A Rust client library for the Lark (Feishu) API.

This library provides a convenient way to interact with Lark (Feishu) APIs, including authentication, Bitable operations, and bot messaging.

§Features

  • Authentication: Tenant access token management with automatic refresh
  • Bitable: Read and write operations for Feishu Bitable
  • Bot: Send messages and interact with chats

§Example

use larkrs_client::auth::FeishuTokenManager;
use larkrs_client::bot::chat::ChatClient;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Get a token
    let token_manager = FeishuTokenManager::new();
    let token = token_manager.get_token().await?;

    // Send a message
    let client = ChatClient::new();
    client.send_text_message("chat_id", "Hello from Rust!").await?;

    Ok(())
}

Modules§

auth
bitable
bot

Structs§

LarkApiResponse
Response structure for Lark API calls.