IssuesClient

Struct IssuesClient 

Source
pub struct IssuesClient { /* private fields */ }
Expand description

Issues API 客户端

Implementations§

Source§

impl IssuesClient

Source

pub fn new(base_url: String, client: Client) -> Self

创建新的 Issues API 客户端

Source

pub fn with_auth(self, token: &str) -> Self

设置认证信息

Source

pub async fn get_repo_issues_number( &self, repo: String, number: i64, ) -> Result<Value>

查询指定的 Issues。Get an issue.

Source

pub async fn patch_repo_issues_number( &self, repo: String, number: i64, patch_issue_form: Value, ) -> Result<Value>

更新一个 Issue。Update an issue.

Source

pub async fn delete_repo_issues_number_labels_name( &self, repo: String, number: i64, name: String, ) -> Result<Value>

删除 Issue 标签。Remove a label from an issue.

Source

pub async fn get_repo_issues_number_assignees( &self, repo: String, number: String, ) -> Result<Value>

查询指定 Issue 的 Assignees。 List repository issue assignees.

Source

pub async fn post_repo_issues_number_assignees( &self, repo: String, number: String, post_issue_assignees_form: Value, ) -> Result<Value>

添加 Assignees 到指定的 Issue。 Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.

Source

pub async fn delete_repo_issues_number_assignees( &self, repo: String, number: String, delete_issue_assignees_form: Value, ) -> Result<Value>

删除 Issue 中的 Assignees。 Removes one or more assignees from an issue.

Source

pub async fn patch_repo_issues_number_assignees( &self, repo: String, number: String, patch_issue_assignees_form: Value, ) -> Result<Value>

更新 Issue 中的 Assignees。 Updates the assignees of an issue.

Source

pub async fn get_repo_issues_number_comments( &self, repo: String, number: i64, page: Option<i64>, page_size: Option<i64>, ) -> Result<Value>

查询仓库的 Issue 评论列表。List repository issue comments.

Source

pub async fn post_repo_issues_number_comments( &self, repo: String, number: i64, post_issue_comment_form: Value, ) -> Result<Value>

创建一个 Issue Comment。Create an issue comment.

Source

pub async fn get_repo_issues_number_assignees_assignee( &self, repo: String, number: String, assignee: String, ) -> Result<Value>

检查用户是否可以被添加到 Issue 的 Assignees 中。 Checks if a user can be assigned to an issue.

Source

pub async fn get_repo_issues( &self, repo: String, page: Option<i64>, page_size: Option<i64>, state: Option<String>, keyword: Option<String>, priority: Option<String>, labels: Option<String>, authors: Option<String>, assignees: Option<String>, updated_time_begin: Option<String>, updated_time_end: Option<String>, close_time_begin: Option<String>, close_time_end: Option<String>, order_by: Option<String>, ) -> Result<Value>

查询仓库的 Issues。List issues.

Source

pub async fn post_repo_issues( &self, repo: String, post_issue_form: Value, ) -> Result<Value>

创建一个 Issue。Create an issue.

Source

pub async fn get_repo_issues_number_labels( &self, repo: String, number: i64, page: Option<i64>, page_size: Option<i64>, ) -> Result<Value>

查询 Issue 的标签(label) 列表。List labels for an issue.

Source

pub async fn post_repo_issues_number_labels( &self, repo: String, number: i64, post_issue_labels_form: Value, ) -> Result<Value>

新增 Issue 标签。Add labels to an issue.

Source

pub async fn put_repo_issues_number_labels( &self, repo: String, number: i64, put_issue_labels_form: Value, ) -> Result<Value>

设置 Issue 标签。 Set the new labels for an issue.

Source

pub async fn delete_repo_issues_number_labels( &self, repo: String, number: i64, ) -> Result<Value>

清空 Issue 标签。Remove all labels from an issue.

Source

pub async fn get_repo_issues_number_comments_comment_id( &self, repo: String, number: String, comment_id: String, ) -> Result<Value>

获取一个 Issue Comment。Get an issue comment.

Source

pub async fn patch_repo_issues_number_comments_comment_id( &self, repo: String, number: i64, comment_id: i64, patch_issue_comment_form: Value, ) -> Result<Value>

修改一个 Issue Comment。Update an issue comment.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,