module BacklogKit::Client::Wiki

Methods for the Wiki API

Public Instance Methods

create_wiki(name, content, project_id, params = {}) click to toggle source

Create a new wiki page

@param name [String] Name of the page @param content [String] Content of the page @param project_id [Integer, String] Project id @param params [Hash] Request parameters @return [BacklogKit::Response] The page information

# File lib/backlog_kit/client/wiki.rb, line 44
def create_wiki(name, content, project_id, params = {})
  params.merge!(name: name, content: content, project_id: project_id)
  post('wikis', params)
end
delete_wiki(wiki_id, params = {}) click to toggle source

Delete a wiki page

@param wiki_id [Integer, String] Wiki page id @param params [Hash] Request parameters @return [BacklogKit::Response] The page information

# File lib/backlog_kit/client/wiki.rb, line 63
def delete_wiki(wiki_id, params = {})
  delete("wikis/#{wiki_id}", params)
end
get_wiki(wiki_id) click to toggle source

Get a wiki page

@param wiki_id [Integer, String] Wiki page id @return [BacklogKit::Response] The page information

# File lib/backlog_kit/client/wiki.rb, line 25
def get_wiki(wiki_id)
  get("wikis/#{wiki_id}")
end
get_wiki_count(project_id_or_key) click to toggle source

Get number of wiki pages

@param project_id_or_key [Integer, String] Project id or project key @return [BacklogKit::Response] Number of pages

# File lib/backlog_kit/client/wiki.rb, line 17
def get_wiki_count(project_id_or_key)
  get('wikis/count', project_id_or_key: project_id_or_key)
end
get_wiki_histories(wiki_id, params = {}) click to toggle source

Get list of wiki histories

@param wiki_id [Integer, String] Wiki page id @param params [Hash] Request parameters @return [BacklogKit::Response] List of histories

# File lib/backlog_kit/client/wiki.rb, line 98
def get_wiki_histories(wiki_id, params = {})
  get("wikis/#{wiki_id}/history", params)
end
get_wiki_shared_files(wiki_id) click to toggle source

Get list of shared files on wiki

@param wiki_id [Integer, String] Wiki page id @return [BacklogKit::Response] List of files

# File lib/backlog_kit/client/wiki.rb, line 71
def get_wiki_shared_files(wiki_id)
  get("wikis/#{wiki_id}/sharedFiles")
end
get_wiki_stars(wiki_id) click to toggle source

Get list of wiki stars

@param wiki_id [Integer, String] Wiki page id @return [BacklogKit::Response] List of stars

# File lib/backlog_kit/client/wiki.rb, line 106
def get_wiki_stars(wiki_id)
  get("wikis/#{wiki_id}/stars")
end
get_wiki_tags(project_id_or_key) click to toggle source

Get list of wiki page tags

@param project_id_or_key [Integer, String] Project id or project key @return [BacklogKit::Response] List of tags

# File lib/backlog_kit/client/wiki.rb, line 33
def get_wiki_tags(project_id_or_key)
  get('wikis/tags', project_id_or_key: project_id_or_key)
end
get_wikis(project_id_or_key) click to toggle source

Get list of wiki pages

@param project_id_or_key [Integer, String] Project id or project key @return [BacklogKit::Response] List of pages

# File lib/backlog_kit/client/wiki.rb, line 9
def get_wikis(project_id_or_key)
  get('wikis', project_id_or_key: project_id_or_key)
end
update_wiki(wiki_id, params = {}) click to toggle source

Update a wiki page

@param wiki_id [Integer, String] Wiki page id @param params [Hash] Request parameters @return [BacklogKit::Response] The page information

# File lib/backlog_kit/client/wiki.rb, line 54
def update_wiki(wiki_id, params = {})
  patch("wikis/#{wiki_id}", params)
end