module Gitlab::Client::Wikis

def create_wiki(project, title, content, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about created wiki page.

Options Hash: (**options)
  • format (String) -- The format of the wiki page. Available formats are: markdown (default), rdoc, and asciidoc.

Parameters:
  • options (Hash) -- A customizable set of options.
  • title (String) -- The title of the wiki page.
  • content (String) -- The content of the wiki page.
  • project (Integer, String) -- The ID or name of a project.
def create_wiki(project, title, content, options = {})
  body = { content: content, title: title }.merge(options)
  post("/projects/#{url_encode project}/wikis", body: body)
end

def delete_wiki(project, slug)

Returns:
  • (Gitlab::ObjectifiedHash) - An empty objectified hash

Parameters:
  • slug (String) -- The slug (a unique string) of the wiki page.
  • project (Integer, String) -- The ID or name of a project.
def delete_wiki(project, slug)
  delete("/projects/#{url_encode project}/wikis/#{slug}")
end

def update_wiki(project, slug, options = {})

Returns:
  • (Gitlab::ObjectifiedHash) - Information about updated wiki page.

Options Hash: (**options)
  • format (String) -- The format of the wiki page. Available formats are: markdown (default), rdoc, and asciidoc.
  • title (String) -- The title of the wiki page.
  • content (String) -- The content of the wiki page.

Parameters:
  • options (Hash) -- A customizable set of options.
  • slug (String) -- The slug (a unique string) of the wiki page.
  • project (Integer, String) -- The ID or name of a project.
def update_wiki(project, slug, options = {})
  put("/projects/#{url_encode project}/wikis/#{slug}", body: options)
end

def wiki(project, slug)

Returns:
  • (Gitlab::ObjectifiedHash) -

Parameters:
  • slug (String) -- The slug (a unique string) of the wiki page
  • project (Integer, String) -- The ID or name of a project.
def wiki(project, slug)
  get("/projects/#{url_encode project}/wikis/#{slug}")
end

def wikis(project, options = {})

Returns:
  • (Array) -

Options Hash: (**options)
  • with_content(optional) (String) -- Include pages content

Parameters:
  • options (Hash) -- A customizable set of options.
  • project (Integer, String) -- The ID or name of a project.
def wikis(project, options = {})
  get("/projects/#{url_encode project}/wikis", query: options)
end