Crates.io | larkrs-client |
lib.rs | larkrs-client |
version | |
source | src |
created_at | 2025-04-11 05:03:21.068933+00 |
updated_at | 2025-04-11 05:03:21.068933+00 |
description | Lark (Feishu) API client library for Rust |
homepage | https://github.com/hanxuanliang/larkrs-mcp-server/larkrs-client |
repository | https://github.com/hanxuanliang/larkrs-mcp-server/larkrs-client |
max_upload_size | |
id | 1629245 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A Rust client library for the Lark (Feishu) API.
Add this to your Cargo.toml
:
[dependencies]
larkrs-client = "0.1.1"
use larkrs_client::auth::FeishuTokenManager;
// Set FEISHU_APP_ID and FEISHU_APP_SECRET environment variables
let token_manager = FeishuTokenManager::new();
let token = token_manager.get_token().await?;
use larkrs_client::bitable::table::BitableTableClient;
let client = BitableTableClient::new();
// Get records from a table
let records = client.get_records_list("app_token", "table_id").await?;
// Create records in a table
let records_json = r#"[
{"field1": "value1", "field2": "value2"},
{"field1": "value3", "field2": "value4"}
]"#;
client.batch_create_records_json("app_token", "table_id", records_json).await?;
use larkrs_client::bot::chat::ChatClient;
let client = ChatClient::new();
// Get list of chats
let chats = client.get_chat_group_list().await?;
// Send a text message
client.send_text_message("chat_id", "Hello from Rust!").await?;
// Send a markdown message
client.send_markdown_message(
"chat_id",
"Title",
"# Heading\n**Bold text**\n- List item 1\n- List item 2"
).await?;
The library requires the following environment variables:
FEISHU_APP_ID
: Your Feishu application IDFEISHU_APP_SECRET
: Your Feishu application secretThis project is licensed under the MIT License - see the LICENSE file for details.