lib/phrase/api/locales_api.rb in phrase-1.0.14 vs lib/phrase/api/locales_api.rb in phrase-2.0.0

- old
+ new

@@ -173,11 +173,11 @@ # @option opts [String] :encoding Enforces a specific encoding on the file contents. Valid options are \&quot;UTF-8\&quot;, \&quot;UTF-16\&quot; and \&quot;ISO-8859-1\&quot;. # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &lt;code&gt;include_unverified_translations&lt;/code&gt;. # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project. # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;. - # @return [nil] + # @return [File] def locale_download(project_id, id, opts = {}) data, _status_code, _headers = locale_download_with_http_info(project_id, id, opts) data end @@ -200,11 +200,11 @@ # @option opts [String] :encoding Enforces a specific encoding on the file contents. Valid options are \&quot;UTF-8\&quot;, \&quot;UTF-16\&quot; and \&quot;ISO-8859-1\&quot;. # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &lt;code&gt;include_unverified_translations&lt;/code&gt;. # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project. # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;. - # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers + # @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers def locale_download_with_http_info(project_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LocalesApi.locale_download ...' end # verify the required parameter 'project_id' is set @@ -236,19 +236,21 @@ query_params[:'use_last_reviewed_version'] = opts[:'use_last_reviewed_version'] if !opts[:'use_last_reviewed_version'].nil? query_params[:'fallback_locale_id'] = opts[:'fallback_locale_id'] if !opts[:'fallback_locale_id'].nil? # header parameters header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*']) header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type - return_type = opts[:return_type] + return_type = opts[:return_type] || 'File' # auth_names auth_names = opts[:auth_names] || ['Basic', 'Token'] new_options = opts.merge(