docs/UploadsApi.md in phrase-1.0.1 vs docs/UploadsApi.md in phrase-1.0.2
- old
+ new
@@ -10,11 +10,11 @@
## upload_create
-> upload_create(project_id, opts)
+> Upload upload_create(project_id, opts)
Upload a new file
Upload a new language file. Creates necessary resources in your project.
@@ -29,12 +29,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::UploadsApi.new
project_id = 'project_id_example' # String | Project ID
opts = {
@@ -48,17 +47,20 @@
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: nil, # Object | Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
+ format_options: nil, # 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 (currently beta) is enabled for the project.
}
begin
#Upload a new file
- api_instance.upload_create(project_id, opts)
+ result = api_instance.upload_create(project_id, opts)
+ pp result
rescue Phrase::ApiError => e
puts "Exception when calling UploadsApi->upload_create: #{e}"
end
```
@@ -78,25 +80,27 @@
**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]
+ **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 (currently beta) is enabled for the project. | [optional]
### Return type
-Response<(nil (empty response body))>
+Response<([**Upload**](Upload.md))>
### Authorization
[Basic](../README.md#Basic), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: multipart/form-data
-- **Accept**: Not defined
+- **Accept**: application/json
## upload_show
> Upload upload_show(project_id, id, opts)
@@ -116,12 +120,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::UploadsApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
@@ -182,11 +185,10 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::UploadsApi.new
project_id = 'project_id_example' # String | Project ID
opts = {