nipaw_core 0.12.2

一个git平台的api封装库,core实现
Documentation
use async_trait::async_trait;
use crate::option::OrgRepoListOptions;
use crate::types::org::OrgInfo;
use crate::types::repo::RepoInfo;

#[async_trait]
pub  trait Org: Send + Sync {
	/// 获取组织信息
	///
	/// # 参数
	///
	/// * `org_name` - 组织名
	///
	async fn info(&self, org_name: &str) -> crate::Result<OrgInfo>;
	
	/// 获取组织仓库信息列表
	/// # 参数
	///
	/// * `org_name` - 组织名
	/// * `options` - 获取仓库列表选项, 详见 [OrgRepoListOptions]
	async fn repo_list(
		&self,
		org_name: &str,
		options: Option<OrgRepoListOptions>,
	) -> crate::Result<Vec<RepoInfo>>;
	
	/// 获取组织头像URL
	///
	/// # 参数
	///
	/// * `org_name` - 组织名
	///
	async fn avatar_url(&self, org_name: &str) -> crate::Result<String>;
	
}