Method: Gitlab::Client::Wikis#update_wiki

Defined in:
lib/gitlab/client/wikis.rb

#update_wiki(project, slug, options = {}) ⇒ Gitlab::ObjectifiedHash

Updates an existing wiki page. At least one parameter is required to update the wiki page.

Examples:

Gitlab.update_wiki(6, 'home', { title: 'New title' })
Gitlab.update_wiki(6, 'home', { title: 'New title', content: 'New Message', format: 'rdoc' })

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • slug (String)

    The slug (a unique string) of the wiki page.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • content (String)

    The content of the wiki page.

  • title (String)

    The title of the wiki page.

  • format (String) — default: optional

    The format of the wiki page. Available formats are: markdown (default), rdoc, and asciidoc.

Returns:



63
64
65
# File 'lib/gitlab/client/wikis.rb', line 63

def update_wiki(project, slug, options = {})
  put("/projects/#{url_encode project}/wikis/#{slug}", body: options)
end