Expand description
Lark/Feishu OpenAPI SDK for Rust.
§Quick start
use larksuite_oapi_sdk_rs::LarkClient;
let client = LarkClient::builder("APP_ID", "APP_SECRET").build().unwrap();§Features
- REST services — 56+ service modules under
servicecovering IM, Calendar, Drive, etc. - Event dispatch — webhook and WebSocket event routing via
EventDispatcher. - Typed events — 200+ typed event structs under
events. - Card builder — interactive Lark card construction via
card. - Channel messaging — feature-gated (
messaging) high-level send, reply, edit, upload, and download operations via [channel::ChannelMessaging]. - Channel runtime — feature-gated (
channel) inbound event normalization and policy handling; enablesmessagingandws. - WebSocket client — feature-gated (
ws) persistent long-connection event stream via [ws::WsClient]. - Axum adapter — feature-gated (
axum) integration for HTTP servers.
Re-exports§
pub use cache::Cache;pub use cache::LocalCache;pub use client::LarkClient;pub use client::LarkClientBuilder;pub use config::Config;pub use constants::AccessTokenType;pub use constants::AppType;pub use constants::FEISHU_BASE_URL;pub use constants::LARK_BASE_URL;pub use crypto::encrypted_event_msg;pub use crypto::event_decrypt;pub use crypto::event_encrypt;pub use crypto::verify_signature_sha1;pub use crypto::verify_signature_sha256;pub use error::LarkError;pub use event::CallbackAction;pub use event::CallbackCard;pub use event::CallbackContext;pub use event::CallbackHandlerFn;pub use event::CallbackOperator;pub use event::CardAction;pub use event::CardActionHandler;pub use event::CardActionTriggerRequest;pub use event::CardActionTriggerResponse;pub use event::CardHandlerFn;pub use event::CardHandlerResult;pub use event::CustomResp;pub use event::CustomizedEventHandlerFn;pub use event::EventBase;pub use event::EventDispatcher;pub use event::EventHandlerFn;pub use event::EventHeader;pub use event::EventReq;pub use event::EventResp;pub use event::EventV1Header;pub use event::EventV2Base;pub use event::EventV2Body;pub use event::InlinePreview;pub use event::PreviewUrl;pub use event::TemplateCard;pub use event::Toast;pub use event::ToastI18n;pub use event::URLPreviewGetRequest;pub use event::URLPreviewGetResponse;pub use json::JsonValue;pub use req::ApiReq;pub use req::FormDataBuilder;pub use req::FormDataField;pub use req::FormDataValue;pub use req::PathParams;pub use req::QueryParams;pub use req::ReqBody;pub use req::RequestOption;pub use resp::ApiResp;pub use resp::CodeError;pub use resp::CodeErrorInfo;pub use resp::RawResponse;pub use service::go_compatibility::GoCompatibility;pub use service::go_compatibility::GoCompatibilityEndpoint;pub use service::go_compatibility::GoCompatibilityEndpointMeta;pub use service::go_compatibility::GoV397;Deprecated pub use service::go_compatibility::GoV397Endpoint;Deprecated pub use service::go_compatibility::GoV397EndpointMeta;Deprecated pub use token::AppTicketManager;pub use token::AppTokenResponse;pub use token::ClientAssertionProvider;pub use token::MarketplaceAppTokenReq;pub use token::MarketplaceTenantTokenReq;pub use token::ResendAppTicketRequest;pub use token::ResendAppTicketResponse;pub use token::SelfBuiltAppTokenReq;pub use token::SelfBuiltTenantTokenReq;pub use token::TargetInfo;pub use token::TenantTokenResponse;pub use token::Token;pub use token::TokenManager;
Modules§
- cache
- In-memory token cache with TTL expiry.
- card
- Lark interactive card builder.
- client
- config
- constants
- crypto
- error
- event
- Lark event dispatch framework.
- events
- Typed P2 (v2.0 protocol) event payload structs and handler registration methods.
- http_
handler - Framework-agnostic HTTP adapter helpers for event callbacks.
- json
- SDK-owned representation for intentionally dynamic JSON values.
- registration
- OAuth app registration via device-code flow.
- req
- resp
- service
- token
Structs§
- Http
Method - The Request Method (VERB)