Module: Crowdin::ApiResources::Advisor
- Defined in:
- lib/crowdin-api/api_resources/advisor.rb
Instance Method Summary collapse
- #create_advisor_check(body = {}, project_id = config.project_id) ⇒ Object
- #create_or_update_application_advisor_insight(application_identifier, module_key, body = {}, project_id = config.project_id) ⇒ Object
- #edit_advisor_insight(insight_id, body = [], project_id = config.project_id) ⇒ Object
- #get_advisor_check_status(check_id, project_id = config.project_id) ⇒ Object
- #list_advisor_insights(query = {}, project_id = config.project_id) ⇒ Object
Instance Method Details
#create_advisor_check(body = {}, project_id = config.project_id) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/crowdin-api/api_resources/advisor.rb', line 9 def create_advisor_check(body = {}, project_id = config.project_id) project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :post, "#{config.target_api_url}/projects/#{project_id}/advisors/checks", { params: body } ) Web::SendRequest.new(request).perform end |
#create_or_update_application_advisor_insight(application_identifier, module_key, body = {}, project_id = config.project_id) ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/crowdin-api/api_resources/advisor.rb', line 71 def create_or_update_application_advisor_insight(application_identifier, module_key, body = {}, project_id = config.project_id) project_id || raise_project_id_is_required_error endpoint = "projects/#{project_id}/applications/#{application_identifier}/modules/#{module_key}/advisors/insights" request = Web::Request.new( connection, :put, "#{config.target_api_url}/#{endpoint}", { params: body } ) Web::SendRequest.new(request).perform end |
#edit_advisor_insight(insight_id, body = [], project_id = config.project_id) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/crowdin-api/api_resources/advisor.rb', line 54 def edit_advisor_insight(insight_id, body = [], project_id = config.project_id) project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :patch, "#{config.target_api_url}/projects/#{project_id}/advisors/insights/#{insight_id}", { params: body } ) Web::SendRequest.new(request).perform end |
#get_advisor_check_status(check_id, project_id = config.project_id) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/crowdin-api/api_resources/advisor.rb', line 24 def get_advisor_check_status(check_id, project_id = config.project_id) project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :get, "#{config.target_api_url}/projects/#{project_id}/advisors/checks/#{check_id}" ) Web::SendRequest.new(request).perform end |
#list_advisor_insights(query = {}, project_id = config.project_id) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/crowdin-api/api_resources/advisor.rb', line 38 def list_advisor_insights(query = {}, project_id = config.project_id) project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :get, "#{config.target_api_url}/projects/#{project_id}/advisors/insights", { params: query } ) Web::SendRequest.new(request).perform end |