module BacklogKit::Client::Wiki
Methods for the Wiki
API
Public Instance Methods
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 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 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 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 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 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 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 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