Module: Crowdin::ApiResources::Workflows
- Defined in:
- lib/crowdin-api/api_resources/workflows.rb
Instance Method Summary collapse
- #get_workflow_step(step_id = nil, project_id = config.project_id) ⇒ Object
- #get_workflow_template(template_id = nil) ⇒ Object
- #list_workflow_step_strings(step_id, query = {}, project_id = config.project_id) ⇒ Object
- #list_workflow_steps(query = {}, project_id = config.project_id) ⇒ Object
- #list_workflow_templates(query = {}) ⇒ Object
Instance Method Details
#get_workflow_step(step_id = nil, project_id = config.project_id) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/crowdin-api/api_resources/workflows.rb', line 25 def get_workflow_step(step_id = nil, project_id = config.project_id) enterprise_mode? || raise_only_for_enterprise_mode_error step_id || raise_parameter_is_required_error(:step_id) project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :get, "#{config.target_api_url}/projects/#{project_id}/workflow-steps/#{step_id}" ) Web::SendRequest.new(request).perform end |
#get_workflow_template(template_id = nil) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/crowdin-api/api_resources/workflows.rb', line 54 def get_workflow_template(template_id = nil) enterprise_mode? || raise_only_for_enterprise_mode_error template_id || raise_parameter_is_required_error(:template_id) request = Web::Request.new( connection, :get, "#{config.target_api_url}/workflow-templates/#{template_id}" ) Web::SendRequest.new(request).perform end |
#list_workflow_step_strings(step_id, query = {}, project_id = config.project_id) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/crowdin-api/api_resources/workflows.rb', line 69 def list_workflow_step_strings(step_id, query = {}, project_id = config.project_id) enterprise_mode? || raise_only_for_enterprise_mode_error project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :get, "#{config.target_api_url}/projects/#{project_id}/workflow-steps/#{step_id}/strings", { params: query } ) Web::SendRequest.new(request).perform end |
#list_workflow_steps(query = {}, project_id = config.project_id) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/crowdin-api/api_resources/workflows.rb', line 10 def list_workflow_steps(query = {}, project_id = config.project_id) enterprise_mode? || raise_only_for_enterprise_mode_error project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :get, "#{config.target_api_url}/projects/#{project_id}/workflow-steps", { params: query } ) Web::SendRequest.new(request).perform end |
#list_workflow_templates(query = {}) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/crowdin-api/api_resources/workflows.rb', line 40 def list_workflow_templates(query = {}) enterprise_mode? || raise_only_for_enterprise_mode_error request = Web::Request.new( connection, :get, "#{config.target_api_url}/workflow-templates", { params: query } ) Web::SendRequest.new(request).perform end |