summaryrefslogtreecommitdiff
path: root/docs/gl_objects
diff options
context:
space:
mode:
authorSimon Pamies <s.pamies@appweeve.com>2021-06-03 00:38:09 +0200
committerGitHub <noreply@github.com>2021-06-03 00:38:09 +0200
commit74f5e62ef5bfffc7ba21494d05dbead60b59ecf0 (patch)
tree163463c6b4aedece5dc675348c0ce96ff66d79af /docs/gl_objects
parent85bbd1a5db5eff8a8cea63b2b192aae66030423d (diff)
downloadgitlab-74f5e62ef5bfffc7ba21494d05dbead60b59ecf0.tar.gz
feat(objects): add support for Group wikis (#1484)
feat(objects): add support for Group wikis
Diffstat (limited to 'docs/gl_objects')
-rw-r--r--docs/gl_objects/wikis.rst24
1 files changed, 20 insertions, 4 deletions
diff --git a/docs/gl_objects/wikis.rst b/docs/gl_objects/wikis.rst
index 622c3a2..e98b9d4 100644
--- a/docs/gl_objects/wikis.rst
+++ b/docs/gl_objects/wikis.rst
@@ -11,21 +11,37 @@ References
+ :class:`gitlab.v4.objects.ProjectWiki`
+ :class:`gitlab.v4.objects.ProjectWikiManager`
+ :attr:`gitlab.v4.objects.Project.wikis`
+ + :class:`gitlab.v4.objects.GroupWiki`
+ + :class:`gitlab.v4.objects.GroupWikiManager`
+ + :attr:`gitlab.v4.objects.Group.wikis`
-* GitLab API: https://docs.gitlab.com/ce/api/wikis.html
+* GitLab API for Projects: https://docs.gitlab.com/ce/api/wikis.html
+* GitLab API for Groups: https://docs.gitlab.com/ee/api/group_wikis.html
Examples
--------
-Get the list of wiki pages for a project::
+Get the list of wiki pages for a project. These do not contain the contents of the wiki page. You will need to call get(slug) to retrieve the content by accessing the content attribute::
pages = project.wikis.list()
-Get a single wiki page::
+Get the list of wiki pages for a group. These do not contain the contents of the wiki page. You will need to call get(slug) to retrieve the content by accessing the content attribute::
+
+ pages = group.wikis.list()
+
+Get a single wiki page for a project::
page = project.wikis.get(page_slug)
-Create a wiki page::
+Get a single wiki page for a group::
+
+ page = group.wikis.get(page_slug)
+
+Get the contents of a wiki page::
+
+ print(page.content)
+
+Create a wiki page on a project level::
page = project.wikis.create({'title': 'Wiki Page 1',
'content': open(a_file).read()})