Module: Crowdin::ApiResources::Dictionaries
- Defined in:
- lib/crowdin-api/api_resources/dictionaries.rb
Instance Method Summary collapse
- #edit_dictionary(language_id = nil, query = {}, project_id = config.project_id) ⇒ Object
- #list_dictionaries(query = {}, project_id = config.project_id) ⇒ Object
Instance Method Details
#edit_dictionary(language_id = nil, query = {}, project_id = config.project_id) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/crowdin-api/api_resources/dictionaries.rb', line 18 def edit_dictionary(language_id = nil, query = {}, project_id = config.project_id) language_id || raise_parameter_is_required_error(:language_id) project_id || raise_project_id_is_required_error request = Web::Request.new( connection, :patch, "#{config.target_api_url}/projects/#{project_id}/dictionaries/#{language_id}", { params: query } ) Web::SendRequest.new(request).perform end |
#list_dictionaries(query = {}, project_id = config.project_id) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/crowdin-api/api_resources/dictionaries.rb', line 6 def list_dictionaries(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}/dictionaries", { params: query } ) Web::SendRequest.new(request).perform end |