Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #362
- Loading branch information
Gauvain Pocentek
committed
Dec 31, 2017
1 parent
6923f11
commit c281d95
Showing
5 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
############# | ||
Pages domains | ||
############# | ||
|
||
Admin | ||
===== | ||
|
||
References | ||
---------- | ||
|
||
* v4 API: | ||
|
||
+ :class:`gitlab.v4.objects.PagesDomain` | ||
+ :class:`gitlab.v4.objects.PagesDomainManager` | ||
+ :attr:`gitlab.Gitlab.pagesdomains` | ||
|
||
* GitLab API: https://docs.gitlab.com/ce/api/pages_domains.html#list-all-pages-domains | ||
|
||
Examples | ||
-------- | ||
|
||
List all the existing domains (admin only):: | ||
|
||
domains = gl.pagesdomains.list() | ||
|
||
Project pages domain | ||
==================== | ||
|
||
References | ||
---------- | ||
|
||
* v4 API: | ||
|
||
+ :class:`gitlab.v4.objects.ProjectPagesDomain` | ||
+ :class:`gitlab.v4.objects.ProjectPagesDomainManager` | ||
+ :attr:`gitlab.v4.objects.Project.pagesdomains` | ||
|
||
* GitLab API: https://docs.gitlab.com/ce/api/pages_domains.html#list-pages-domains | ||
|
||
Examples | ||
-------- | ||
|
||
List domains for a project:: | ||
|
||
domains = project.pagesdomains.list() | ||
|
||
Get a single domain:: | ||
|
||
domain = project.pagesdomains.get('d1.example.com') | ||
|
||
Create a new domain:: | ||
|
||
domain = project.pagesdomains.create({'domain': 'd2.example.com}) | ||
|
||
Update an existing domain:: | ||
|
||
domain.certificate = open('d2.crt').read() | ||
domain.key = open('d2.key').read() | ||
domain.save() | ||
|
||
Delete an existing domain:: | ||
|
||
domain.delete | ||
# or | ||
project.pagesdomains.delete('d2.example.com') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters