[−][src]Struct gitlab::Gitlab
A representation of the Gitlab API for a single user.
Separate users should use separate instances of this.
Methods
impl Gitlab
[src]
pub fn new<H, T>(host: H, token: T) -> Result<Self> where
H: AsRef<str>,
T: ToString,
[src]
H: AsRef<str>,
T: ToString,
Create a new Gitlab API representation.
Errors out if token
is invalid.
pub fn new_insecure<H, T>(host: H, token: T) -> Result<Self> where
H: AsRef<str>,
T: ToString,
[src]
H: AsRef<str>,
T: ToString,
Create a new non-SSL Gitlab API representation.
Errors out if token
is invalid.
pub fn builder<H, T>(host: H, token: T) -> GitlabBuilder where
H: ToString,
T: ToString,
[src]
H: ToString,
T: ToString,
Create a new Gitlab API client builder.
pub fn current_user(&self) -> Result<UserPublic>
[src]
The user the API is acting as.
pub fn users<T>(&self) -> Result<Vec<T>> where
T: UserResult,
[src]
T: UserResult,
Get all user accounts
pub fn user<T>(&self, user: UserId) -> Result<T> where
T: UserResult,
[src]
T: UserResult,
Find a user by id.
pub fn user_by_name<T, N>(&self, name: N) -> Result<T> where
T: UserResult,
N: AsRef<str>,
[src]
T: UserResult,
N: AsRef<str>,
Find a user by username.
pub fn projects(&self) -> Result<Vec<Project>>
[src]
Get all accessible projects.
pub fn owned_projects(&self) -> Result<Vec<Project>>
[src]
Get all owned projects.
pub fn project(&self, project: ProjectId) -> Result<Project>
[src]
Find a project by id.
pub fn project_by_name<N>(&self, name: N) -> Result<Project> where
N: AsRef<str>,
[src]
N: AsRef<str>,
Find a project by name.
pub fn hooks(&self, project: ProjectId) -> Result<Vec<ProjectHook>>
[src]
Get a project's hooks.
pub fn hook(&self, project: ProjectId, hook: HookId) -> Result<ProjectHook>
[src]
Get a project hook.
pub fn add_hook<U>(
&self,
project: ProjectId,
url: U,
events: WebhookEvents
) -> Result<ProjectHook> where
U: AsRef<str>,
[src]
&self,
project: ProjectId,
url: U,
events: WebhookEvents
) -> Result<ProjectHook> where
U: AsRef<str>,
Add a project hook.
pub fn group_members(&self, group: GroupId) -> Result<Vec<Member>>
[src]
Get the team members of a group.
pub fn group_member(&self, group: GroupId, user: UserId) -> Result<Member>
[src]
Get a team member of a group.
pub fn project_members(&self, project: ProjectId) -> Result<Vec<Member>>
[src]
Get the team members of a project.
pub fn project_member(&self, project: ProjectId, user: UserId) -> Result<Member>
[src]
Get a team member of a project.
pub fn add_user_to_project(
&self,
project: ProjectId,
user: UserId,
access: AccessLevel
) -> Result<Member>
[src]
&self,
project: ProjectId,
user: UserId,
access: AccessLevel
) -> Result<Member>
Add a user to a project.
pub fn add_user_to_project_by_name<P>(
&self,
project: P,
user: UserId,
access: AccessLevel
) -> Result<Member> where
P: AsRef<str>,
[src]
&self,
project: P,
user: UserId,
access: AccessLevel
) -> Result<Member> where
P: AsRef<str>,
Add a user to a project.
pub fn branches(&self, project: ProjectId) -> Result<Vec<RepoBranch>>
[src]
Get branches for a project.
pub fn branch<B>(&self, project: ProjectId, branch: B) -> Result<RepoBranch> where
B: AsRef<str>,
[src]
B: AsRef<str>,
Get a branch.
pub fn commit<C>(
&self,
project: ProjectId,
commit: C
) -> Result<RepoCommitDetail> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<RepoCommitDetail> where
C: AsRef<str>,
Get a commit.
pub fn commit_comments<C>(
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitNote>> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitNote>> where
C: AsRef<str>,
Get comments on a commit.
pub fn create_commit_comment<C, B>(
&self,
project: ProjectId,
commit: C,
body: B
) -> Result<CommitNote> where
C: AsRef<str>,
B: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C,
body: B
) -> Result<CommitNote> where
C: AsRef<str>,
B: AsRef<str>,
Get comments on a commit.
pub fn create_commit_comment_by_name<P, C, B>(
&self,
project: P,
commit: C,
body: B
) -> Result<CommitNote> where
P: AsRef<str>,
C: AsRef<str>,
B: AsRef<str>,
[src]
&self,
project: P,
commit: C,
body: B
) -> Result<CommitNote> where
P: AsRef<str>,
C: AsRef<str>,
B: AsRef<str>,
Get comments on a commit.
pub fn create_commit_line_comment(
&self,
project: ProjectId,
commit: &str,
body: &str,
path: &str,
line: u64
) -> Result<CommitNote>
[src]
&self,
project: ProjectId,
commit: &str,
body: &str,
path: &str,
line: u64
) -> Result<CommitNote>
Get comments on a commit.
pub fn commit_latest_statuses<C>(
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitStatus>> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitStatus>> where
C: AsRef<str>,
Get the latest statuses of a commit.
pub fn commit_latest_statuses_by_name<P, C>(
&self,
project: P,
commit: C
) -> Result<Vec<CommitStatus>> where
P: AsRef<str>,
C: AsRef<str>,
[src]
&self,
project: P,
commit: C
) -> Result<Vec<CommitStatus>> where
P: AsRef<str>,
C: AsRef<str>,
Get the latest statuses of a commit.
pub fn commit_all_statuses<C>(
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitStatus>> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<Vec<CommitStatus>> where
C: AsRef<str>,
Get the all statuses of a commit.
pub fn commit_latest_builds<C>(
&self,
project: ProjectId,
commit: C
) -> Result<Vec<Job>> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<Vec<Job>> where
C: AsRef<str>,
Get the latest builds of a commit.
pub fn commit_all_builds<C>(
&self,
project: ProjectId,
commit: C
) -> Result<Vec<Job>> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
commit: C
) -> Result<Vec<Job>> where
C: AsRef<str>,
Get the all builds of a commit.
pub fn create_commit_status<S>(
&self,
project: ProjectId,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus> where
S: AsRef<str>,
[src]
&self,
project: ProjectId,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus> where
S: AsRef<str>,
Create a status message for a commit.
pub fn create_commit_status_by_name<P, S>(
&self,
project: P,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus> where
P: AsRef<str>,
S: AsRef<str>,
[src]
&self,
project: P,
sha: S,
state: StatusState,
info: &CommitStatusInfo
) -> Result<CommitStatus> where
P: AsRef<str>,
S: AsRef<str>,
Create a status message for a commit.
pub fn issues(&self, project: ProjectId) -> Result<Vec<Issue>>
[src]
Get the issues for a project.
pub fn issue(&self, project: ProjectId, issue: IssueInternalId) -> Result<Issue>
[src]
Get issues.
pub fn issue_notes(
&self,
project: ProjectId,
issue: IssueInternalId
) -> Result<Vec<Note>>
[src]
&self,
project: ProjectId,
issue: IssueInternalId
) -> Result<Vec<Note>>
Get the notes from a issue.
pub fn issue_notes_by_name<P>(
&self,
project: P,
issue: IssueInternalId
) -> Result<Vec<Note>> where
P: AsRef<str>,
[src]
&self,
project: P,
issue: IssueInternalId
) -> Result<Vec<Note>> where
P: AsRef<str>,
Get the notes from a issue.
pub fn create_issue_note<C>(
&self,
project: ProjectId,
issue: IssueInternalId,
content: C
) -> Result<Note> where
C: AsRef<str>,
[src]
&self,
project: ProjectId,
issue: IssueInternalId,
content: C
) -> Result<Note> where
C: AsRef<str>,
Create a note on a issue.
pub fn create_issue_note_by_name<P, C>(
&self,
project: P,
issue: IssueInternalId,
content: C
) -> Result<Note> where
P: AsRef<str>,
C: AsRef<str>,
[src]
&self,
project: P,
issue: IssueInternalId,
content: C
) -> Result<Note> where
P: AsRef<str>,
C: AsRef<str>,
Create a note on a issue.
pub fn merge_requests(&self, project: ProjectId) -> Result<Vec<MergeRequest>>
[src]
Get the merge requests for a project.
pub fn merge_requests_with_state(
&self,
project: ProjectId,
state: MergeRequestStateFilter
) -> Result<Vec<MergeRequest>>
[src]
&self,
project: ProjectId,
state: MergeRequestStateFilter
) -> Result<Vec<MergeRequest>>
Get the merge requests with a given state.
pub fn merge_request(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<MergeRequest>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<MergeRequest>
Get merge requests.
pub fn merge_request_closes_issues(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<IssueReference>>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<IssueReference>>
Get the issues that will be closed when a merge request is merged.
pub fn merge_request_notes(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<Note>>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<Note>>
Get the notes from a merge request.
pub fn merge_request_notes_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId
) -> Result<Vec<Note>> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId
) -> Result<Vec<Note>> where
P: AsRef<str>,
Get the notes from a merge request.
pub fn award_merge_request_note(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji>
Award a merge request note with an award.
pub fn award_merge_request_note_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId,
award: &str
) -> Result<AwardEmoji> where
P: AsRef<str>,
Award a merge request note with an award.
pub fn merge_request_awards(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<AwardEmoji>>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<AwardEmoji>>
Get the awards for a merge request.
pub fn merge_request_awards_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId
) -> Result<Vec<AwardEmoji>> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId
) -> Result<Vec<AwardEmoji>> where
P: AsRef<str>,
Get the awards for a merge request.
pub fn merge_request_note_awards(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId
) -> Result<Vec<AwardEmoji>>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
note: NoteId
) -> Result<Vec<AwardEmoji>>
Get the awards for a merge request note.
pub fn merge_request_note_awards_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId
) -> Result<Vec<AwardEmoji>> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
note: NoteId
) -> Result<Vec<AwardEmoji>> where
P: AsRef<str>,
Get the awards for a merge request note.
pub fn create_merge_request_note(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note>
Create a note on a merge request.
pub fn create_merge_request_note_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId,
content: &str
) -> Result<Note> where
P: AsRef<str>,
Create a note on a merge request.
pub fn get_issues_closed_by_merge_request(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<Issue>>
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId
) -> Result<Vec<Issue>>
Get issues closed by a merge request.
pub fn get_issues_closed_by_merge_request_by_name<P>(
&self,
project: P,
merge_request: MergeRequestInternalId
) -> Result<Vec<Issue>> where
P: AsRef<str>,
[src]
&self,
project: P,
merge_request: MergeRequestInternalId
) -> Result<Vec<Issue>> where
P: AsRef<str>,
Get issues closed by a merge request.
pub fn set_issue_labels<I, L>(
&self,
project: ProjectId,
issue: IssueInternalId,
labels: I
) -> Result<Issue> where
I: IntoIterator<Item = L>,
L: Display,
[src]
&self,
project: ProjectId,
issue: IssueInternalId,
labels: I
) -> Result<Issue> where
I: IntoIterator<Item = L>,
L: Display,
Set the labels on an issue.
pub fn set_issue_labels_by_name<P, I, L>(
&self,
project: P,
issue: IssueInternalId,
labels: I
) -> Result<Issue> where
P: AsRef<str>,
I: IntoIterator<Item = L>,
L: Display,
[src]
&self,
project: P,
issue: IssueInternalId,
labels: I
) -> Result<Issue> where
P: AsRef<str>,
I: IntoIterator<Item = L>,
L: Display,
Set the labels on an issue.
pub fn set_merge_request_labels<I, L>(
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
labels: I
) -> Result<MergeRequest> where
I: IntoIterator<Item = L>,
L: Display,
[src]
&self,
project: ProjectId,
merge_request: MergeRequestInternalId,
labels: I
) -> Result<MergeRequest> where
I: IntoIterator<Item = L>,
L: Display,
Set the labels on a merge request.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,