| Crates.io | gitee-rs |
| lib.rs | gitee-rs |
| version | 0.9.1 |
| created_at | 2026-01-22 09:07:41.357692+00 |
| updated_at | 2026-01-22 14:21:04.601356+00 |
| description | A high-performance Gitee API client library for Rust. |
| homepage | https://github.com/zymaio/gitee-rs |
| repository | https://github.com/zymaio/gitee-rs |
| max_upload_size | |
| id | 2061154 |
| size | 99,377 |
A high-performance, type-safe Gitee API client library for Rust.
⚖️ 免责声明 (Disclaimer): 本项目为第三方开发,并非 Gitee (OSChina) 官方产品。
reqwest 和 tokio 实现全异步调用。在 Cargo.toml 中添加依赖:
[dependencies]
gitee-rs = "0.1.0"
tokio = { version = "1.0", features = ["full"] }
use gitee_rs::GiteeClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// 初始化客户端 (从环境变量 GITEE_TOKEN 读取)
let client = GiteeClient::new(None, None)?;
// 获取仓库信息
let repo = client.get_repo("owner", "repo").await?;
println!("Repo name: {}", repo.full_name);
// 列出 Issue
let issues = client.list_issues().await?;
for issue in issues {
println!("#{} - {}", issue.number, issue.title);
}
Ok(())
}
| 模块 | 功能说明 |
|---|---|
issues |
问题的创建、详情、列表、更新、评论等 |
pulls |
拉取请求的完整生命周期管理及差异文件查询 |
repos |
仓库查询、创建(个人/组织)、Fork、搜索 |
files |
读取文件内容、列出目录树、全局代码搜索 |
users |
获取用户信息及用户搜索 |
labels |
标签的自动化管理 |
releases |
版本发布管理 |
notifications |
用户通知实时拉取 |
本项目采用 MIT License 开源。