[][src]Struct gitlab::Gitlab

pub struct Gitlab { /* fields omitted */ }

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]

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]

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]

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]

Get all user accounts

pub fn user<T>(&self, user: UserId) -> Result<T> where
    T: UserResult
[src]

Find a user by id.

pub fn user_by_name<T, N>(&self, name: N) -> Result<T> where
    T: UserResult,
    N: AsRef<str>, 
[src]

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]

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]

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]

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]

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]

Get a branch.

pub fn commit<C>(
    &self,
    project: ProjectId,
    commit: C
) -> Result<RepoCommitDetail> where
    C: AsRef<str>, 
[src]

Get a commit.

pub fn commit_comments<C>(
    &self,
    project: ProjectId,
    commit: C
) -> Result<Vec<CommitNote>> where
    C: AsRef<str>, 
[src]

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]

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]

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]

Get comments on a commit.

pub fn commit_latest_statuses<C>(
    &self,
    project: ProjectId,
    commit: C
) -> Result<Vec<CommitStatus>> where
    C: AsRef<str>, 
[src]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

Get the merge requests with a given state.

pub fn merge_request(
    &self,
    project: ProjectId,
    merge_request: MergeRequestInternalId
) -> Result<MergeRequest>
[src]

Get merge requests.

pub fn merge_request_closes_issues(
    &self,
    project: ProjectId,
    merge_request: MergeRequestInternalId
) -> Result<Vec<IssueReference>>
[src]

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]

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]

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]

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]

Award a merge request note with an award.

pub fn merge_request_awards(
    &self,
    project: ProjectId,
    merge_request: MergeRequestInternalId
) -> Result<Vec<AwardEmoji>>
[src]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

Set the labels on a merge request.

Trait Implementations

impl Debug for Gitlab[src]

Auto Trait Implementations

impl Send for Gitlab

impl Sync for Gitlab

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Erased for T