module/gitlab_api.py¶
module.gitlab_api ¶
GitlabAPI
GitlabAPI ¶
Bases: Session
GitlabAPI
Parameters:
Name | Type | Description | Default |
---|---|---|---|
token |
str
|
API token. |
required |
Attributes:
Name | Type | Description |
---|---|---|
url |
str
|
|
token |
str
|
Specified API token. |
Note
The headers
will update the Authorization
in Bearer {self.token}
.
The API docs: https://docs.gitlab.com/ee/api/
Source code in module/gitlab_api.py
delete_invite_to_project ¶
DELETE invite to project
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id |
str
|
Gitlab's project id. |
required |
email |
str
|
Email address. |
required |
Returns:
Type | Description |
---|---|
Response
|
Return the requests.Response object. |
Source code in module/gitlab_api.py
get_project ¶
Get Project
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id |
str
|
Gitlab's project id. |
required |
Returns:
Type | Description |
---|---|
Response
|
Return the requests.Response object. |
post_invite_to_project ¶
Post invite to project
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_id |
str
|
Gitlab's project id. |
required |
email |
str
|
Email address. |
required |
access_level |
int
|
|
30
|