Module: RedmineAPIHelper::WikiPagesAPIHelper
- Included in:
- Helpers
- Defined in:
- lib/redmine_api_helper/wiki_pages_api_helper.rb
Instance Method Summary collapse
-
#create_or_update_project_wiki_page(project_id, title, **params) ⇒ Object
updates or creates an existing wiki_page with params, corresponds to controller#update.
-
#destroy_project_wiki_page(project_id, id, **params) ⇒ Object
deletes an existing wiki_page with params, corresponds to controller#destroy.
-
#list_project_wiki_pages(project_id, **params) ⇒ Object
lists wiki_pages, corresponds to controller#index.
-
#project_wiki_page_url(project_id, id, **params) ⇒ Object
creates wiki_page_url.
-
#project_wiki_pages_url(project_id, **params) ⇒ Object
reads wiki_pages_url from args.
-
#read_project_wiki_page(project_id, title, **params) ⇒ Object
reads wiki_page having id, corresponds to controller#show.
Instance Method Details
#create_or_update_project_wiki_page(project_id, title, **params) ⇒ Object
updates or creates an existing wiki_page with params, corresponds to controller#update
54 55 56 |
# File 'lib/redmine_api_helper/wiki_pages_api_helper.rb', line 54 def create_or_update_project_wiki_page(project_id, title, **params) jput({:wiki_page => params}, :url => url_path(project_wiki_pages_url(project_id), title)) end |
#destroy_project_wiki_page(project_id, id, **params) ⇒ Object
deletes an existing wiki_page with params, corresponds to controller#destroy
61 62 63 |
# File 'lib/redmine_api_helper/wiki_pages_api_helper.rb', line 61 def destroy_project_wiki_page(project_id, id, **params) jdel(:url => url_path(project_wiki_pages_url(project_id), id), :params => params ) end |
#list_project_wiki_pages(project_id, **params) ⇒ Object
lists wiki_pages, corresponds to controller#index
40 41 42 |
# File 'lib/redmine_api_helper/wiki_pages_api_helper.rb', line 40 def list_project_wiki_pages(project_id, **params) jget(:url => url_path(project_wiki_pages_url(project_id), "index"), :params => params ) end |
#project_wiki_page_url(project_id, id, **params) ⇒ Object
creates wiki_page_url
33 34 35 |
# File 'lib/redmine_api_helper/wiki_pages_api_helper.rb', line 33 def project_wiki_page_url(project_id, id, **params) url_path(project_wiki_pages_url(project_id), id, params) end |
#project_wiki_pages_url(project_id, **params) ⇒ Object
reads wiki_pages_url from args
26 27 28 |
# File 'lib/redmine_api_helper/wiki_pages_api_helper.rb', line 26 def project_wiki_pages_url(project_id, **params) url_path(project_url(project_id), "wiki", params) end |
#read_project_wiki_page(project_id, title, **params) ⇒ Object
reads wiki_page having id, corresponds to controller#show
47 48 49 |
# File 'lib/redmine_api_helper/wiki_pages_api_helper.rb', line 47 def read_project_wiki_page(project_id, title, **params) jget(:url => url_path(project_wiki_pages_url(project_id), title), :params => params ).wiki_page end |