Module: RedmineAPIHelper::ScriptsAPIHelper
- Included in:
- Helpers
- Defined in:
- lib/redmine_api_helper/scripts_api_helper.rb
Instance Method Summary collapse
-
#list_project_scripts(project_id, **params) ⇒ Object
lists scripts, corresponds to controller#index.
-
#list_scripts(project_id, **params) ⇒ Object
lists scripts, corresponds to controller#index.
-
#project_scripts_url(project_id, **params) ⇒ Object
reads project_scripts_url from args.
-
#read_script(id, **params) ⇒ Object
reads script having id, corresponds to controller#show.
-
#run_project_script(project_id, id, **params) ⇒ Object
runs script having id, corresponds to controller#run.
-
#run_project_script_url(project_id, id, **params) ⇒ Object
reads run_project_script_url from args.
-
#run_script(id, **params) ⇒ Object
runs script having id, corresponds to controller#run.
-
#run_script_url(id, **params) ⇒ Object
reads run_script_url from args.
-
#scripts_url(**params) ⇒ Object
reads scripts_url from args.
Instance Method Details
#list_project_scripts(project_id, **params) ⇒ Object
lists scripts, corresponds to controller#index
61 62 63 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 61 def list_project_scripts(project_id, **params) list_project_objects(project_id, :scripts, params) end |
#list_scripts(project_id, **params) ⇒ Object
lists scripts, corresponds to controller#index
54 55 56 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 54 def list_scripts(project_id, **params) list_objects(:scripts, params) end |
#project_scripts_url(project_id, **params) ⇒ Object
reads project_scripts_url from args
33 34 35 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 33 def project_scripts_url(project_id, **params) url_path(project_url(project_id), 'scripts', params) end |
#read_script(id, **params) ⇒ Object
reads script having id, corresponds to controller#show
68 69 70 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 68 def read_script(id, **params) read_object(:script, id, params) end |
#run_project_script(project_id, id, **params) ⇒ Object
runs script having id, corresponds to controller#run
82 83 84 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 82 def run_project_script(project_id, id, **params) jget(:url => run_project_script_url(project_id, id), :params => params ).script end |
#run_project_script_url(project_id, id, **params) ⇒ Object
reads run_project_script_url from args
47 48 49 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 47 def run_project_script_url(project_id, id, **params) url_path(project_scripts_url(project_id), id, 'run', params) end |
#run_script(id, **params) ⇒ Object
runs script having id, corresponds to controller#run
75 76 77 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 75 def run_script(id, **params) jget(:url => run_script_url(id), :params => params ).script end |
#run_script_url(id, **params) ⇒ Object
reads run_script_url from args
40 41 42 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 40 def run_script_url(id, **params) url_path(scripts_url, id, 'run', params) end |
#scripts_url(**params) ⇒ Object
reads scripts_url from args
26 27 28 |
# File 'lib/redmine_api_helper/scripts_api_helper.rb', line 26 def scripts_url(**params) url_path(args.urls.Home, 'scripts', params) end |