docs/UploadsApi.md in phrase-2.26.0 vs docs/UploadsApi.md in phrase-3.0.0
- old
+ new
@@ -10,11 +10,11 @@
## upload_create
-> Upload upload_create(project_id, opts)
+> Upload upload_create(project_id, file, file_format, locale_id, opts)
Upload a new file
Upload a new language file. Creates necessary resources in your project.
@@ -34,33 +34,33 @@
config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::UploadsApi.new
project_id = 'project_id_example' # String | Project ID
+file = File.new('/path/to/some/file') # File | File to be imported
+file_format = 'file_format_example' # String | File format. Auto-detected when possible and not specified.
+locale_id = 'locale_id_example' # String | Locale of the file's content. Can be the name or id of the locale. Preferred is id.
opts = {
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
branch: 'branch_example', # String | specify the branch to use
- file: File.new('/path/to/some/file'), # File | File to be imported
- file_format: 'file_format_example', # String | File format. Auto-detected when possible and not specified.
- locale_id: 'locale_id_example', # String | Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id.
tags: 'tags_example', # String | List of tags separated by comma to be associated with the new keys contained in the upload.
update_translations: true, # Boolean | Indicates whether existing translations should be updated with the file content.
update_descriptions: true, # Boolean | Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
convert_emoji: true, # Boolean | This option is obsolete. Providing the option will cause a bad request error.
skip_upload_tags: true, # Boolean | Indicates whether the upload should not create upload tags.
skip_unverification: true, # Boolean | Indicates whether the upload should unverify updated translations.
file_encoding: 'file_encoding_example', # String | Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\".
- locale_mapping: { ... }, # Object | Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
+ locale_mapping: { ... }, # Object | Mapping between locale names and translation columns. Required in some formats like CSV or XLSX.
format_options: { ... }, # Object | Additional options available for specific formats. See our format guide for complete list.
autotranslate: true, # Boolean | If set, translations for the uploaded language will be fetched automatically.
mark_reviewed: true, # Boolean | Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
tag_only_affected_keys: true # Boolean | Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
}
begin
#Upload a new file
- result = api_instance.upload_create(project_id, opts)
+ result = api_instance.upload_create(project_id, file, file_format, locale_id, opts)
pp result
rescue Phrase::ApiError => e
puts "Exception when calling UploadsApi->upload_create: #{e}"
end
```
@@ -69,22 +69,22 @@
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **String**| Project ID |
+ **file** | **File**| File to be imported |
+ **file_format** | **String**| File format. Auto-detected when possible and not specified. |
+ **locale_id** | **String**| Locale of the file's content. Can be the name or id of the locale. Preferred is id. |
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
**branch** | **String**| specify the branch to use | [optional]
- **file** | **File**| File to be imported | [optional]
- **file_format** | **String**| File format. Auto-detected when possible and not specified. | [optional]
- **locale_id** | **String**| Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id. | [optional]
**tags** | **String**| List of tags separated by comma to be associated with the new keys contained in the upload. | [optional]
**update_translations** | **Boolean**| Indicates whether existing translations should be updated with the file content. | [optional]
**update_descriptions** | **Boolean**| Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions. | [optional]
**convert_emoji** | **Boolean**| This option is obsolete. Providing the option will cause a bad request error. | [optional]
**skip_upload_tags** | **Boolean**| Indicates whether the upload should not create upload tags. | [optional]
**skip_unverification** | **Boolean**| Indicates whether the upload should unverify updated translations. | [optional]
**file_encoding** | **String**| Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\". | [optional]
- **locale_mapping** | [**Object**](Object.md)| Optional, format specific mapping between locale names and the columns the translations to those locales are contained in. | [optional]
+ **locale_mapping** | [**Object**](Object.md)| Mapping between locale names and translation columns. Required in some formats like CSV or XLSX. | [optional]
**format_options** | [**Object**](Object.md)| Additional options available for specific formats. See our format guide for complete list. | [optional]
**autotranslate** | **Boolean**| If set, translations for the uploaded language will be fetched automatically. | [optional]
**mark_reviewed** | **Boolean**| Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project. | [optional]
**tag_only_affected_keys** | **Boolean**| Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false` | [optional] [default to false]