pub struct AssetsClient { /* private fields */ }
Expand description
Assets API 客户端
Implementations§
Source§impl AssetsClient
impl AssetsClient
Sourcepub async fn get_repo_releases_download_tag_filename(
&self,
repo: String,
tag: String,
filename: String,
share: Option<bool>,
) -> Result<Value>
pub async fn get_repo_releases_download_tag_filename( &self, repo: String, tag: String, filename: String, share: Option<bool>, ) -> Result<Value>
发起一个获取 release 附件的请求,返回内容或者 302 到某个地址。Initiate a request to get release attachments, returns content or 302 redirect.
Sourcepub async fn post_repo_upload_imgs(
&self,
repo: String,
request_data: Value,
) -> Result<Value>
pub async fn post_repo_upload_imgs( &self, repo: String, request_data: Value, ) -> Result<Value>
发起一个上传 imgs 的请求,返回上传 cos 的 url 和 form 内容。发起一个上传 imgs 的请求,返回上传 cos 的 url 和 form 内容.
Sourcepub async fn get_repo_releases_latest_download_file_name(
&self,
repo: String,
file_name: String,
) -> Result<Value>
pub async fn get_repo_releases_latest_download_file_name( &self, repo: String, file_name: String, ) -> Result<Value>
发起一个获取 latest release 附件的请求,返回内容或者 302 到某个地址。Initiate a request to get latest release attachments, returns content or 302 redirect.
Sourcepub async fn post_group_upload_logos(
&self,
group: String,
request_data: Value,
) -> Result<Value>
pub async fn post_group_upload_logos( &self, group: String, request_data: Value, ) -> Result<Value>
发起一个上传 logo 的请求,返回上传 cos 的 url 和 form 内容。Post a request to upload a logo.
Sourcepub async fn post_repo_upload_files(
&self,
repo: String,
request_data: Value,
) -> Result<Value>
pub async fn post_repo_upload_files( &self, repo: String, request_data: Value, ) -> Result<Value>
发起一个上传 files 的请求,返回上传 cos 的 url 和 form 内容。Initiate a request to upload files,returns COS upload URL and form data.
Sourcepub async fn get_repo_commit_assets_download_commit_id_filename(
&self,
repo: String,
commit_id: String,
filename: String,
share: Option<bool>,
) -> Result<Value>
pub async fn get_repo_commit_assets_download_commit_id_filename( &self, repo: String, commit_id: String, filename: String, share: Option<bool>, ) -> Result<Value>
发起一个获取 commits 附件的请求,返回内容或者 302 到某个地址。Get a request to fetch a commit assets and returns the content directly or a 302 redirect to the assets URL.
Auto Trait Implementations§
impl Freeze for AssetsClient
impl !RefUnwindSafe for AssetsClient
impl Send for AssetsClient
impl Sync for AssetsClient
impl Unpin for AssetsClient
impl !UnwindSafe for AssetsClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more