lib/phrase/api/translations_api.rb in phrase-1.0.1 vs lib/phrase/api/translations_api.rb in phrase-1.0.2
- old
+ new
@@ -11,23 +11,23 @@
# Create a translation.
# @param project_id [String] Project ID
# @param translation_create_parameters [TranslationCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
- # @return [nil]
+ # @return [TranslationDetails]
def translation_create(project_id, translation_create_parameters, opts = {})
- translation_create_with_http_info(project_id, translation_create_parameters, opts)
- nil
+ data, _status_code, _headers = translation_create_with_http_info(project_id, translation_create_parameters, opts)
+ data
end
# Create a translation
# Create a translation.
# @param project_id [String] Project ID
# @param translation_create_parameters [TranslationCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
+ # @return [Array<(Response<(TranslationDetails)>, Integer, Hash)>] Response<(TranslationDetails)> data, response status code and response headers
def translation_create_with_http_info(project_id, translation_create_parameters, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TranslationsApi.translation_create ...'
end
# verify the required parameter 'project_id' is set
@@ -44,10 +44,12 @@
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
# form parameters
@@ -55,11 +57,11 @@
# http body (model)
post_body = opts[:body] || @api_client.object_to_http_body(translation_create_parameters)
# return_type
- return_type = opts[:return_type]
+ return_type = opts[:return_type] || 'TranslationDetails'
# auth_names
auth_names = opts[:auth_names] || ['Basic', 'Token']
new_options = opts.merge(
@@ -643,11 +645,11 @@
# @option opts [Integer] :page Page number
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
# @option opts [String] :branch specify the branch to use
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
# @option opts [String] :order Order direction. Can be one of: asc, desc.
- # @option opts [String] :q q_description_placeholder
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
# @return [Array<Translation>]
def translations_by_key(project_id, key_id, opts = {})
data, _status_code, _headers = translations_by_key_with_http_info(project_id, key_id, opts)
data
end
@@ -661,11 +663,11 @@
# @option opts [Integer] :page Page number
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
# @option opts [String] :branch specify the branch to use
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
# @option opts [String] :order Order direction. Can be one of: asc, desc.
- # @option opts [String] :q q_description_placeholder
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
# @return [Array<(Response<(Array<Translation>)>, Integer, Hash)>] Response<(Array<Translation>)> data, response status code and response headers
def translations_by_key_with_http_info(project_id, key_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_by_key ...'
end
@@ -733,11 +735,11 @@
# @option opts [Integer] :page Page number
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
# @option opts [String] :branch specify the branch to use
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
# @option opts [String] :order Order direction. Can be one of: asc, desc.
- # @option opts [String] :q q_description_placeholder
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
# @return [Array<Translation>]
def translations_by_locale(project_id, locale_id, opts = {})
data, _status_code, _headers = translations_by_locale_with_http_info(project_id, locale_id, opts)
data
end
@@ -751,11 +753,11 @@
# @option opts [Integer] :page Page number
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
# @option opts [String] :branch specify the branch to use
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
# @option opts [String] :order Order direction. Can be one of: asc, desc.
- # @option opts [String] :q q_description_placeholder
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
# @return [Array<(Response<(Array<Translation>)>, Integer, Hash)>] Response<(Array<Translation>)> data, response status code and response headers
def translations_by_locale_with_http_info(project_id, locale_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_by_locale ...'
end
@@ -970,11 +972,11 @@
# @option opts [Integer] :page Page number
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
# @option opts [String] :branch specify the branch to use
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
# @option opts [String] :order Order direction. Can be one of: asc, desc.
- # @option opts [String] :q q_description_placeholder
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
# @return [Array<Translation>]
def translations_list(project_id, opts = {})
data, _status_code, _headers = translations_list_with_http_info(project_id, opts)
data
end
@@ -987,10 +989,10 @@
# @option opts [Integer] :page Page number
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
# @option opts [String] :branch specify the branch to use
# @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
# @option opts [String] :order Order direction. Can be one of: asc, desc.
- # @option opts [String] :q q_description_placeholder
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
# @return [Array<(Response<(Array<Translation>)>, Integer, Hash)>] Response<(Array<Translation>)> data, response status code and response headers
def translations_list_with_http_info(project_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_list ...'
end