Skip to content

Commit e384339

Browse files
committed
docs(group): added more examples on how to access group wikis and slug content
1 parent 4065903 commit e384339

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

docs/gl_objects/wikis.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,33 @@ References
1515
+ :class:`gitlab.v4.objects.GroupWikiManager`
1616
+ :attr:`gitlab.v4.objects.Group.wikis`
1717

18-
* GitLab API: https://docs.gitlab.com/ce/api/wikis.html
18+
* GitLab API for Projects: https://docs.gitlab.com/ce/api/wikis.html
19+
* GitLab API for Groups: https://docs.gitlab.com/ee/api/group_wikis.html
1920

2021
Examples
2122
--------
2223

23-
Get the list of wiki pages for a project::
24+
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::
2425

2526
pages = project.wikis.list()
2627

27-
Get the list of wiki pages for a group::
28+
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::
2829

2930
pages = group.wikis.list()
3031

31-
Get a single wiki page::
32+
Get a single wiki page for a project::
3233

3334
page = project.wikis.get(page_slug)
3435

35-
Create a wiki page::
36+
Get a single wiki page for a group::
37+
38+
page = group.wikis.get(page_slug)
39+
40+
Get the contents of a wiki page::
41+
42+
print(page.content)
43+
44+
Create a wiki page on a project level::
3645

3746
page = project.wikis.create({'title': 'Wiki Page 1',
3847
'content': open(a_file).read()})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy