A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://python-gitlab.readthedocs.org/en/stable/gl_objects/wikis.html below:

Wiki pages - python-gitlab v6.2.0

Toggle table of contents sidebar

Wiki pages References Examples

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_all=True)

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_all=True)

Get a single wiki page for a project:

page = project.wikis.get(page_slug)

Get a single wiki page for a group:

page = group.wikis.get(page_slug)

Get the contents of a wiki page:

Create a wiki page on a project level:

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

Update a wiki page:

page.content = 'My new content'
page.save()

Delete a wiki page:

File uploads Reference Examples

Upload a file into a project wiki using a filesystem path:

page = project.wikis.get(page_slug)
page.upload("filename.txt", filepath="/some/path/filename.txt")

Upload a file into a project wiki with raw data:

page.upload("filename.txt", filedata="Raw data")

Upload a file into a group wiki using a filesystem path:

page = group.wikis.get(page_slug)
page.upload("filename.txt", filepath="/some/path/filename.txt")

Upload a file into a group wiki using raw data:

page.upload("filename.txt", filedata="Raw data")

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4