Skip to main content

openlark_application/common/
api_endpoints.rs

1//! 应用 API 端点定义(类型安全枚举系统)
2//!
3//! 本模块提供基于枚举的 API 端点定义,用于生产代码中的类型安全调用。
4
5/// 应用 API V1 端点枚举
6#[derive(Debug, Clone, PartialEq)]
7pub enum AppApiV1 {
8    /// 获取应用详情
9    AppGet,
10}
11
12impl AppApiV1 {
13    /// 生成对应的 URL
14    pub fn to_url(&self) -> String {
15        match self {
16            AppApiV1::AppGet => "/open-apis/application/v1/applications".to_string(),
17        }
18    }
19}