public class GitLabApi extends Object
Constructor and Description |
---|
GitLabApi(String hostUrl,
String privateToken)
Constructs a GitLabApi instance set up to interact with the GitLab server
specified by hostUrl.
|
GitLabApi(String hostUrl,
String privateToken,
String secretToken)
Constructs a GitLabApi instance set up to interact with the GitLab server
specified by hostUrl.
|
GitLabApi(String hostUrl,
String privateToken,
String secretToken,
Map<String,Object> clientConfigProperties) |
Modifier and Type | Method and Description |
---|---|
static GitLabApi |
create(String url,
String username,
String password)
Logs into GitLab using provided
username and password , and creates a new GitLabApi instance using returned private token |
CommitsApi |
getCommitsApi()
Gets the CommitsApi instance owned by this GitLabApi instance.
|
GroupApi |
getGroupApi()
Gets the GroupApi instance owned by this GitLabApi instance.
|
MergeRequestApi |
getMergeRequestApi()
Gets the MergeRequestApi instance owned by this GitLabApi instance.
|
ProjectApi |
getProjectApi()
Gets the ProjectApi instance owned by this GitLabApi instance.
|
RepositoryApi |
getRepositoryApi()
Gets the RepositoryApi instance owned by this GitLabApi instance.
|
RepositoryFileApi |
getRepositoryFileApi()
Gets the RepositoryFileApi instance owned by this GitLabApi instance.
|
ServicesApi |
getServicesApi()
Gets the ServicesApi instance owned by this GitLabApi instance.
|
SessionApi |
getSessionApi()
Gets the SessionApi instance owned by this GitLabApi instance.
|
UserApi |
getUserApi()
Gets the UserApi instance owned by this GitLabApi instance.
|
public GitLabApi(String hostUrl, String privateToken)
hostUrl
- the URL of the GitLab serverprivateToken
- to private token to use for access to the APIpublic GitLabApi(String hostUrl, String privateToken, String secretToken)
hostUrl
- the URL of the GitLab serverprivateToken
- to private token to use for access to the APIsecretToken
- use this token to validate received payloadspublic static GitLabApi create(String url, String username, String password) throws GitLabApiException
username
and password
, and creates a new GitLabApi
instance using returned private tokenurl
- GitLab URLusername
- user name for which private token should be obtainedpassword
- password for a given username
GitLabApi
instance configured for a user-specific tokenGitLabApiException
- GitLabApiException if any exception occurs during executionpublic CommitsApi getCommitsApi()
public MergeRequestApi getMergeRequestApi()
public GroupApi getGroupApi()
public ProjectApi getProjectApi()
public RepositoryApi getRepositoryApi()
public RepositoryFileApi getRepositoryFileApi()
public ServicesApi getServicesApi()
public SessionApi getSessionApi()
public UserApi getUserApi()
Copyright © 2017. All rights reserved.