pub struct Gitlab { /* private fields */ }
Expand description
A representation of the Gitlab API for a single user.
Separate users should use separate instances of this.
Implementations§
source§impl Gitlab
impl Gitlab
sourcepub fn new<H, T>(host: H, token: T) -> Result<Self, GitlabError>
pub fn new<H, T>(host: H, token: T) -> Result<Self, GitlabError>
Create a new Gitlab API representation.
The token
should be a valid personal access token.
Errors out if token
is invalid.
sourcepub fn new_insecure<H, T>(host: H, token: T) -> Result<Self, GitlabError>
pub fn new_insecure<H, T>(host: H, token: T) -> Result<Self, GitlabError>
Create a new non-SSL Gitlab API representation.
Errors out if token
is invalid.
sourcepub fn new_job_token<H, T>(host: H, token: T) -> Result<Self, GitlabError>
pub fn new_job_token<H, T>(host: H, token: T) -> Result<Self, GitlabError>
Create a new Gitlab API representation.
The token
should be a valid job token.
Errors out if token
is invalid.
sourcepub fn new_job_token_insecure<H, T>(
host: H,
token: T
) -> Result<Self, GitlabError>
pub fn new_job_token_insecure<H, T>( host: H, token: T ) -> Result<Self, GitlabError>
Create a new non-SSL Gitlab API representation.
The token
should be a valid job token.
Errors out if token
is invalid.
sourcepub fn with_oauth2<H, T>(host: H, token: T) -> Result<Self, GitlabError>
pub fn with_oauth2<H, T>(host: H, token: T) -> Result<Self, GitlabError>
Create a new Gitlab API representation.
The token
should be a valid OAuth2 token.
Errors out if token
is invalid.
sourcepub fn with_oauth2_insecure<H, T>(
host: H,
token: T
) -> Result<Self, GitlabError>
pub fn with_oauth2_insecure<H, T>( host: H, token: T ) -> Result<Self, GitlabError>
Create a new non-SSL Gitlab API representation.
The token
should be a valid OAuth2 token.
Errors out if token
is invalid.
sourcepub fn builder<H, T>(host: H, token: T) -> GitlabBuilder
pub fn builder<H, T>(host: H, token: T) -> GitlabBuilder
Create a new Gitlab API client builder.
sourcepub fn graphql<Q>(
&self,
query: &QueryBody<Q::Variables>
) -> Result<Q::ResponseData, GitlabError>
pub fn graphql<Q>( &self, query: &QueryBody<Q::Variables> ) -> Result<Q::ResponseData, GitlabError>
Send a GraphQL query.