Module: BacklogKit::Client::Wiki
- Included in:
- BacklogKit::Client
- Defined in:
- lib/backlog_kit/client/wiki.rb
Overview
Methods for the Wiki API
Instance Method Summary collapse
-
#create_wiki(name, content, project_id, params = {}) ⇒ BacklogKit::Response
Create a new wiki page.
-
#delete_wiki(wiki_id, params = {}) ⇒ BacklogKit::Response
Delete a wiki page.
-
#get_wiki(wiki_id) ⇒ BacklogKit::Response
Get a wiki page.
-
#get_wiki_count(project_id_or_key) ⇒ BacklogKit::Response
Get number of wiki pages.
-
#get_wiki_histories(wiki_id, params = {}) ⇒ BacklogKit::Response
Get list of wiki histories.
-
#get_wiki_shared_files(wiki_id) ⇒ BacklogKit::Response
Get list of shared files on wiki.
-
#get_wiki_stars(wiki_id) ⇒ BacklogKit::Response
Get list of wiki stars.
-
#get_wiki_tags(project_id_or_key) ⇒ BacklogKit::Response
Get list of wiki page tags.
-
#get_wikis(project_id_or_key) ⇒ BacklogKit::Response
Get list of wiki pages.
-
#link_wiki_shared_files(wiki_id, file_ids = []) ⇒ BacklogKit::Response
Link shared files to wiki.
-
#unlink_wiki_shared_file(wiki_id, file_id) ⇒ BacklogKit::Response
Unlink a shared file on wiki.
-
#update_wiki(wiki_id, params = {}) ⇒ BacklogKit::Response
Update a wiki page.
Instance Method Details
#create_wiki(name, content, project_id, params = {}) ⇒ BacklogKit::Response
Create a new wiki page
44 45 46 47 |
# 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 = {}) ⇒ BacklogKit::Response
Delete a wiki page
63 64 65 |
# 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) ⇒ BacklogKit::Response
Get a wiki page
25 26 27 |
# 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) ⇒ BacklogKit::Response
Get number of wiki pages
17 18 19 |
# 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 = {}) ⇒ BacklogKit::Response
Get list of wiki histories
98 99 100 |
# 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) ⇒ BacklogKit::Response
Get list of shared files on wiki
71 72 73 |
# 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) ⇒ BacklogKit::Response
Get list of wiki stars
106 107 108 |
# 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) ⇒ BacklogKit::Response
Get list of wiki page tags
33 34 35 |
# File 'lib/backlog_kit/client/wiki.rb', line 33 def (project_id_or_key) get('wikis/tags', project_id_or_key: project_id_or_key) end |
#get_wikis(project_id_or_key) ⇒ BacklogKit::Response
Get list of wiki pages
9 10 11 |
# 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 |
#link_wiki_shared_files(wiki_id, file_ids = []) ⇒ BacklogKit::Response
Link shared files to wiki
80 81 82 |
# File 'lib/backlog_kit/client/wiki.rb', line 80 def link_wiki_shared_files(wiki_id, file_ids = []) post("wikis/#{wiki_id}/sharedFiles", file_id: file_ids) end |
#unlink_wiki_shared_file(wiki_id, file_id) ⇒ BacklogKit::Response
Unlink a shared file on wiki
89 90 91 |
# File 'lib/backlog_kit/client/wiki.rb', line 89 def unlink_wiki_shared_file(wiki_id, file_id) delete("wikis/#{wiki_id}/sharedFiles/#{file_id}") end |
#update_wiki(wiki_id, params = {}) ⇒ BacklogKit::Response
Update a wiki page
54 55 56 |
# File 'lib/backlog_kit/client/wiki.rb', line 54 def update_wiki(wiki_id, params = {}) patch("wikis/#{wiki_id}", params) end |