phrase 1.0.14 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -9
- data/docs/CurrentUser.md +31 -0
- data/docs/JobLocale.md +5 -1
- data/docs/KeysApi.md +5 -5
- data/docs/LocalesApi.md +5 -4
- data/docs/TranslationsApi.md +25 -25
- data/docs/UsersApi.md +2 -2
- data/lib/phrase.rb +1 -0
- data/lib/phrase/api/keys_api.rb +6 -6
- data/lib/phrase/api/locales_api.rb +5 -3
- data/lib/phrase/api/translations_api.rb +35 -35
- data/lib/phrase/api/users_api.rb +3 -3
- data/lib/phrase/models/current_user.rb +257 -0
- data/lib/phrase/models/job_locale.rb +22 -4
- data/lib/phrase/version.rb +1 -1
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/locales_api_spec.rb +1 -1
- data/spec/api/translations_api_spec.rb +10 -10
- data/spec/api/users_api_spec.rb +1 -1
- data/spec/models/current_user_spec.rb +71 -0
- data/spec/models/job_locale_spec.rb +12 -0
- metadata +174 -170
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e59f0b86fbb8c281e8c41892c24797cb0e74c6491c6226003fe6e93a0d2d2e5
|
4
|
+
data.tar.gz: 5ccd88c3044eb45af04bb35cef1cf4baf151900a1c223a38891dc8bd96bb5df1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b73a93e0771c2779dfe2a773255eb644ffb0bd2b7a4627b22f30986feae49e8413f56a5b66934758350c4559a8351c95d69baff54806d4f82d5bec25a407cb6
|
7
|
+
data.tar.gz: af6d04c26da5c0e3f651fa924760d3fd3b28d97e4144e21f763a6375148dc28e118f8a1b14b564d7aa8e6ef1525fd0c2c21dd86312c90d1e8fb003aae9593117
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase is a translation management platform for software projects. You can colla
|
|
7
7
|
## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version:
|
10
|
+
- Package version: 2.0.0
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
|
13
13
|
|
@@ -56,10 +56,10 @@ gem build phrase.gemspec
|
|
56
56
|
Then install the gem locally:
|
57
57
|
|
58
58
|
```shell
|
59
|
-
gem install ./phrase-
|
59
|
+
gem install ./phrase-2.0.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-
|
62
|
+
(for development, run `gem install --dev ./phrase-2.0.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -193,7 +193,7 @@ Class | Method | HTTP request | Description
|
|
193
193
|
*Phrase::KeysApi* | [**key_delete**](docs/KeysApi.md#key_delete) | **DELETE** /projects/{project_id}/keys/{id} | Delete a key
|
194
194
|
*Phrase::KeysApi* | [**key_show**](docs/KeysApi.md#key_show) | **GET** /projects/{project_id}/keys/{id} | Get a single key
|
195
195
|
*Phrase::KeysApi* | [**key_update**](docs/KeysApi.md#key_update) | **PATCH** /projects/{project_id}/keys/{id} | Update a key
|
196
|
-
*Phrase::KeysApi* | [**
|
196
|
+
*Phrase::KeysApi* | [**keys_delete_collection**](docs/KeysApi.md#keys_delete_collection) | **DELETE** /projects/{project_id}/keys | Delete collection of keys
|
197
197
|
*Phrase::KeysApi* | [**keys_list**](docs/KeysApi.md#keys_list) | **GET** /projects/{project_id}/keys | List keys
|
198
198
|
*Phrase::KeysApi* | [**keys_search**](docs/KeysApi.md#keys_search) | **POST** /projects/{project_id}/keys/search | Search keys
|
199
199
|
*Phrase::KeysApi* | [**keys_tag**](docs/KeysApi.md#keys_tag) | **PATCH** /projects/{project_id}/keys/tag | Add tags to collection of keys
|
@@ -273,13 +273,13 @@ Class | Method | HTTP request | Description
|
|
273
273
|
*Phrase::TranslationsApi* | [**translation_verify**](docs/TranslationsApi.md#translation_verify) | **PATCH** /projects/{project_id}/translations/{id}/verify | Verify a translation
|
274
274
|
*Phrase::TranslationsApi* | [**translations_by_key**](docs/TranslationsApi.md#translations_by_key) | **GET** /projects/{project_id}/keys/{key_id}/translations | List translations by key
|
275
275
|
*Phrase::TranslationsApi* | [**translations_by_locale**](docs/TranslationsApi.md#translations_by_locale) | **GET** /projects/{project_id}/locales/{locale_id}/translations | List translations by locale
|
276
|
-
*Phrase::TranslationsApi* | [**
|
277
|
-
*Phrase::TranslationsApi* | [**
|
276
|
+
*Phrase::TranslationsApi* | [**translations_exclude_collection**](docs/TranslationsApi.md#translations_exclude_collection) | **PATCH** /projects/{project_id}/translations/exclude | Set exclude from export flag on translations selected by query
|
277
|
+
*Phrase::TranslationsApi* | [**translations_include_collection**](docs/TranslationsApi.md#translations_include_collection) | **PATCH** /projects/{project_id}/translations/include | Remove exlude from import flag from translations selected by query
|
278
278
|
*Phrase::TranslationsApi* | [**translations_list**](docs/TranslationsApi.md#translations_list) | **GET** /projects/{project_id}/translations | List all translations
|
279
|
-
*Phrase::TranslationsApi* | [**
|
279
|
+
*Phrase::TranslationsApi* | [**translations_review_collection**](docs/TranslationsApi.md#translations_review_collection) | **PATCH** /projects/{project_id}/translations/review | Review translations selected by query
|
280
280
|
*Phrase::TranslationsApi* | [**translations_search**](docs/TranslationsApi.md#translations_search) | **POST** /projects/{project_id}/translations/search | Search translations
|
281
|
-
*Phrase::TranslationsApi* | [**
|
282
|
-
*Phrase::TranslationsApi* | [**
|
281
|
+
*Phrase::TranslationsApi* | [**translations_unverify_collection**](docs/TranslationsApi.md#translations_unverify_collection) | **PATCH** /projects/{project_id}/translations/unverify | Mark translations selected by query as unverified
|
282
|
+
*Phrase::TranslationsApi* | [**translations_verify_collection**](docs/TranslationsApi.md#translations_verify_collection) | **PATCH** /projects/{project_id}/translations/verify | Verify translations selected by query
|
283
283
|
*Phrase::UploadsApi* | [**upload_create**](docs/UploadsApi.md#upload_create) | **POST** /projects/{project_id}/uploads | Upload a new file
|
284
284
|
*Phrase::UploadsApi* | [**upload_show**](docs/UploadsApi.md#upload_show) | **GET** /projects/{project_id}/uploads/{id} | View upload details
|
285
285
|
*Phrase::UploadsApi* | [**uploads_list**](docs/UploadsApi.md#uploads_list) | **GET** /projects/{project_id}/uploads | List uploads
|
@@ -327,6 +327,7 @@ Class | Method | HTTP request | Description
|
|
327
327
|
- [Phrase::CommentCreateParameters](docs/CommentCreateParameters.md)
|
328
328
|
- [Phrase::CommentMarkReadParameters](docs/CommentMarkReadParameters.md)
|
329
329
|
- [Phrase::CommentUpdateParameters](docs/CommentUpdateParameters.md)
|
330
|
+
- [Phrase::CurrentUser](docs/CurrentUser.md)
|
330
331
|
- [Phrase::Distribution](docs/Distribution.md)
|
331
332
|
- [Phrase::DistributionCreateParameters](docs/DistributionCreateParameters.md)
|
332
333
|
- [Phrase::DistributionPreview](docs/DistributionPreview.md)
|
data/docs/CurrentUser.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Phrase::CurrentUser
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | | [optional]
|
8
|
+
**username** | **String** | | [optional]
|
9
|
+
**name** | **String** | | [optional]
|
10
|
+
**email** | **String** | | [optional]
|
11
|
+
**position** | **String** | | [optional]
|
12
|
+
**language** | **String** | | [optional]
|
13
|
+
**created_at** | **DateTime** | | [optional]
|
14
|
+
**updated_at** | **DateTime** | | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'Phrase'
|
20
|
+
|
21
|
+
instance = Phrase::CurrentUser.new(id: null,
|
22
|
+
username: null,
|
23
|
+
name: null,
|
24
|
+
email: null,
|
25
|
+
position: null,
|
26
|
+
language: null,
|
27
|
+
created_at: null,
|
28
|
+
updated_at: null)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
data/docs/JobLocale.md
CHANGED
@@ -9,6 +9,8 @@ Name | Type | Description | Notes
|
|
9
9
|
**locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
|
10
10
|
**users** | [**Array<UserPreview>**](UserPreview.md) | | [optional]
|
11
11
|
**completed** | **Boolean** | | [optional]
|
12
|
+
**translation_completed_at** | **DateTime** | | [optional]
|
13
|
+
**review_completed_at** | **DateTime** | | [optional]
|
12
14
|
|
13
15
|
## Code Sample
|
14
16
|
|
@@ -19,7 +21,9 @@ instance = Phrase::JobLocale.new(id: null,
|
|
19
21
|
job: null,
|
20
22
|
locale: null,
|
21
23
|
users: null,
|
22
|
-
completed: null
|
24
|
+
completed: null,
|
25
|
+
translation_completed_at: null,
|
26
|
+
review_completed_at: null)
|
23
27
|
```
|
24
28
|
|
25
29
|
|
data/docs/KeysApi.md
CHANGED
@@ -8,7 +8,7 @@ Method | HTTP request | Description
|
|
8
8
|
[**key_delete**](KeysApi.md#key_delete) | **DELETE** /projects/{project_id}/keys/{id} | Delete a key
|
9
9
|
[**key_show**](KeysApi.md#key_show) | **GET** /projects/{project_id}/keys/{id} | Get a single key
|
10
10
|
[**key_update**](KeysApi.md#key_update) | **PATCH** /projects/{project_id}/keys/{id} | Update a key
|
11
|
-
[**
|
11
|
+
[**keys_delete_collection**](KeysApi.md#keys_delete_collection) | **DELETE** /projects/{project_id}/keys | Delete collection of keys
|
12
12
|
[**keys_list**](KeysApi.md#keys_list) | **GET** /projects/{project_id}/keys | List keys
|
13
13
|
[**keys_search**](KeysApi.md#keys_search) | **POST** /projects/{project_id}/keys/search | Search keys
|
14
14
|
[**keys_tag**](KeysApi.md#keys_tag) | **PATCH** /projects/{project_id}/keys/tag | Add tags to collection of keys
|
@@ -273,9 +273,9 @@ Response<([**TranslationKeyDetails**](TranslationKeyDetails.md))>
|
|
273
273
|
- **Accept**: application/json
|
274
274
|
|
275
275
|
|
276
|
-
##
|
276
|
+
## keys_delete_collection
|
277
277
|
|
278
|
-
> AffectedResources
|
278
|
+
> AffectedResources keys_delete_collection(project_id, opts)
|
279
279
|
|
280
280
|
Delete collection of keys
|
281
281
|
|
@@ -308,10 +308,10 @@ opts = {
|
|
308
308
|
|
309
309
|
begin
|
310
310
|
#Delete collection of keys
|
311
|
-
result = api_instance.
|
311
|
+
result = api_instance.keys_delete_collection(project_id, opts)
|
312
312
|
pp result
|
313
313
|
rescue Phrase::ApiError => e
|
314
|
-
puts "Exception when calling KeysApi->
|
314
|
+
puts "Exception when calling KeysApi->keys_delete_collection: #{e}"
|
315
315
|
end
|
316
316
|
```
|
317
317
|
|
data/docs/LocalesApi.md
CHANGED
@@ -142,7 +142,7 @@ Response<(nil (empty response body))>
|
|
142
142
|
|
143
143
|
## locale_download
|
144
144
|
|
145
|
-
> locale_download(project_id, id, opts)
|
145
|
+
> File locale_download(project_id, id, opts)
|
146
146
|
|
147
147
|
Download a locale
|
148
148
|
|
@@ -188,7 +188,8 @@ opts = {
|
|
188
188
|
|
189
189
|
begin
|
190
190
|
#Download a locale
|
191
|
-
api_instance.locale_download(project_id, id, opts)
|
191
|
+
result = api_instance.locale_download(project_id, id, opts)
|
192
|
+
pp result
|
192
193
|
rescue Phrase::ApiError => e
|
193
194
|
puts "Exception when calling LocalesApi->locale_download: #{e}"
|
194
195
|
end
|
@@ -220,7 +221,7 @@ Name | Type | Description | Notes
|
|
220
221
|
|
221
222
|
### Return type
|
222
223
|
|
223
|
-
Response<(
|
224
|
+
Response<(**File**)>
|
224
225
|
|
225
226
|
### Authorization
|
226
227
|
|
@@ -229,7 +230,7 @@ Response<(nil (empty response body))>
|
|
229
230
|
### HTTP request headers
|
230
231
|
|
231
232
|
- **Content-Type**: Not defined
|
232
|
-
- **Accept**:
|
233
|
+
- **Accept**: *
|
233
234
|
|
234
235
|
|
235
236
|
## locale_show
|
data/docs/TranslationsApi.md
CHANGED
@@ -14,13 +14,13 @@ Method | HTTP request | Description
|
|
14
14
|
[**translation_verify**](TranslationsApi.md#translation_verify) | **PATCH** /projects/{project_id}/translations/{id}/verify | Verify a translation
|
15
15
|
[**translations_by_key**](TranslationsApi.md#translations_by_key) | **GET** /projects/{project_id}/keys/{key_id}/translations | List translations by key
|
16
16
|
[**translations_by_locale**](TranslationsApi.md#translations_by_locale) | **GET** /projects/{project_id}/locales/{locale_id}/translations | List translations by locale
|
17
|
-
[**
|
18
|
-
[**
|
17
|
+
[**translations_exclude_collection**](TranslationsApi.md#translations_exclude_collection) | **PATCH** /projects/{project_id}/translations/exclude | Set exclude from export flag on translations selected by query
|
18
|
+
[**translations_include_collection**](TranslationsApi.md#translations_include_collection) | **PATCH** /projects/{project_id}/translations/include | Remove exlude from import flag from translations selected by query
|
19
19
|
[**translations_list**](TranslationsApi.md#translations_list) | **GET** /projects/{project_id}/translations | List all translations
|
20
|
-
[**
|
20
|
+
[**translations_review_collection**](TranslationsApi.md#translations_review_collection) | **PATCH** /projects/{project_id}/translations/review | Review translations selected by query
|
21
21
|
[**translations_search**](TranslationsApi.md#translations_search) | **POST** /projects/{project_id}/translations/search | Search translations
|
22
|
-
[**
|
23
|
-
[**
|
22
|
+
[**translations_unverify_collection**](TranslationsApi.md#translations_unverify_collection) | **PATCH** /projects/{project_id}/translations/unverify | Mark translations selected by query as unverified
|
23
|
+
[**translations_verify_collection**](TranslationsApi.md#translations_verify_collection) | **PATCH** /projects/{project_id}/translations/verify | Verify translations selected by query
|
24
24
|
|
25
25
|
|
26
26
|
|
@@ -692,9 +692,9 @@ Response<([**Array<Translation>**](Translation.md))>
|
|
692
692
|
- **Accept**: application/json
|
693
693
|
|
694
694
|
|
695
|
-
##
|
695
|
+
## translations_exclude_collection
|
696
696
|
|
697
|
-
> AffectedCount
|
697
|
+
> AffectedCount translations_exclude_collection(project_id, translations_exclude_parameters, opts)
|
698
698
|
|
699
699
|
Set exclude from export flag on translations selected by query
|
700
700
|
|
@@ -725,10 +725,10 @@ opts = {
|
|
725
725
|
|
726
726
|
begin
|
727
727
|
#Set exclude from export flag on translations selected by query
|
728
|
-
result = api_instance.
|
728
|
+
result = api_instance.translations_exclude_collection(project_id, translations_exclude_parameters, opts)
|
729
729
|
pp result
|
730
730
|
rescue Phrase::ApiError => e
|
731
|
-
puts "Exception when calling TranslationsApi->
|
731
|
+
puts "Exception when calling TranslationsApi->translations_exclude_collection: #{e}"
|
732
732
|
end
|
733
733
|
```
|
734
734
|
|
@@ -755,9 +755,9 @@ Response<([**AffectedCount**](AffectedCount.md))>
|
|
755
755
|
- **Accept**: application/json
|
756
756
|
|
757
757
|
|
758
|
-
##
|
758
|
+
## translations_include_collection
|
759
759
|
|
760
|
-
> AffectedCount
|
760
|
+
> AffectedCount translations_include_collection(project_id, translations_include_parameters, opts)
|
761
761
|
|
762
762
|
Remove exlude from import flag from translations selected by query
|
763
763
|
|
@@ -788,10 +788,10 @@ opts = {
|
|
788
788
|
|
789
789
|
begin
|
790
790
|
#Remove exlude from import flag from translations selected by query
|
791
|
-
result = api_instance.
|
791
|
+
result = api_instance.translations_include_collection(project_id, translations_include_parameters, opts)
|
792
792
|
pp result
|
793
793
|
rescue Phrase::ApiError => e
|
794
|
-
puts "Exception when calling TranslationsApi->
|
794
|
+
puts "Exception when calling TranslationsApi->translations_include_collection: #{e}"
|
795
795
|
end
|
796
796
|
```
|
797
797
|
|
@@ -891,9 +891,9 @@ Response<([**Array<Translation>**](Translation.md))>
|
|
891
891
|
- **Accept**: application/json
|
892
892
|
|
893
893
|
|
894
|
-
##
|
894
|
+
## translations_review_collection
|
895
895
|
|
896
|
-
> AffectedCount
|
896
|
+
> AffectedCount translations_review_collection(project_id, translations_review_parameters, opts)
|
897
897
|
|
898
898
|
Review translations selected by query
|
899
899
|
|
@@ -924,10 +924,10 @@ opts = {
|
|
924
924
|
|
925
925
|
begin
|
926
926
|
#Review translations selected by query
|
927
|
-
result = api_instance.
|
927
|
+
result = api_instance.translations_review_collection(project_id, translations_review_parameters, opts)
|
928
928
|
pp result
|
929
929
|
rescue Phrase::ApiError => e
|
930
|
-
puts "Exception when calling TranslationsApi->
|
930
|
+
puts "Exception when calling TranslationsApi->translations_review_collection: #{e}"
|
931
931
|
end
|
932
932
|
```
|
933
933
|
|
@@ -1021,9 +1021,9 @@ Response<([**Array<Translation>**](Translation.md))>
|
|
1021
1021
|
- **Accept**: application/json
|
1022
1022
|
|
1023
1023
|
|
1024
|
-
##
|
1024
|
+
## translations_unverify_collection
|
1025
1025
|
|
1026
|
-
> AffectedCount
|
1026
|
+
> AffectedCount translations_unverify_collection(project_id, translations_unverify_parameters, opts)
|
1027
1027
|
|
1028
1028
|
Mark translations selected by query as unverified
|
1029
1029
|
|
@@ -1054,10 +1054,10 @@ opts = {
|
|
1054
1054
|
|
1055
1055
|
begin
|
1056
1056
|
#Mark translations selected by query as unverified
|
1057
|
-
result = api_instance.
|
1057
|
+
result = api_instance.translations_unverify_collection(project_id, translations_unverify_parameters, opts)
|
1058
1058
|
pp result
|
1059
1059
|
rescue Phrase::ApiError => e
|
1060
|
-
puts "Exception when calling TranslationsApi->
|
1060
|
+
puts "Exception when calling TranslationsApi->translations_unverify_collection: #{e}"
|
1061
1061
|
end
|
1062
1062
|
```
|
1063
1063
|
|
@@ -1084,9 +1084,9 @@ Response<([**AffectedCount**](AffectedCount.md))>
|
|
1084
1084
|
- **Accept**: application/json
|
1085
1085
|
|
1086
1086
|
|
1087
|
-
##
|
1087
|
+
## translations_verify_collection
|
1088
1088
|
|
1089
|
-
> AffectedCount
|
1089
|
+
> AffectedCount translations_verify_collection(project_id, translations_verify_parameters, opts)
|
1090
1090
|
|
1091
1091
|
Verify translations selected by query
|
1092
1092
|
|
@@ -1117,10 +1117,10 @@ opts = {
|
|
1117
1117
|
|
1118
1118
|
begin
|
1119
1119
|
#Verify translations selected by query
|
1120
|
-
result = api_instance.
|
1120
|
+
result = api_instance.translations_verify_collection(project_id, translations_verify_parameters, opts)
|
1121
1121
|
pp result
|
1122
1122
|
rescue Phrase::ApiError => e
|
1123
|
-
puts "Exception when calling TranslationsApi->
|
1123
|
+
puts "Exception when calling TranslationsApi->translations_verify_collection: #{e}"
|
1124
1124
|
end
|
1125
1125
|
```
|
1126
1126
|
|
data/docs/UsersApi.md
CHANGED
@@ -10,7 +10,7 @@ Method | HTTP request | Description
|
|
10
10
|
|
11
11
|
## show_user
|
12
12
|
|
13
|
-
>
|
13
|
+
> CurrentUser show_user(opts)
|
14
14
|
|
15
15
|
Show current User
|
16
16
|
|
@@ -55,7 +55,7 @@ Name | Type | Description | Notes
|
|
55
55
|
|
56
56
|
### Return type
|
57
57
|
|
58
|
-
Response<([**
|
58
|
+
Response<([**CurrentUser**](CurrentUser.md))>
|
59
59
|
|
60
60
|
### Authorization
|
61
61
|
|
data/lib/phrase.rb
CHANGED
@@ -34,6 +34,7 @@ require 'phrase/models/comment'
|
|
34
34
|
require 'phrase/models/comment_create_parameters'
|
35
35
|
require 'phrase/models/comment_mark_read_parameters'
|
36
36
|
require 'phrase/models/comment_update_parameters'
|
37
|
+
require 'phrase/models/current_user'
|
37
38
|
require 'phrase/models/distribution'
|
38
39
|
require 'phrase/models/distribution_create_parameters'
|
39
40
|
require 'phrase/models/distribution_preview'
|
data/lib/phrase/api/keys_api.rb
CHANGED
@@ -318,8 +318,8 @@ module Phrase
|
|
318
318
|
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
319
319
|
# @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
320
320
|
# @return [AffectedResources]
|
321
|
-
def
|
322
|
-
data, _status_code, _headers =
|
321
|
+
def keys_delete_collection(project_id, opts = {})
|
322
|
+
data, _status_code, _headers = keys_delete_collection_with_http_info(project_id, opts)
|
323
323
|
data
|
324
324
|
end
|
325
325
|
|
@@ -332,13 +332,13 @@ module Phrase
|
|
332
332
|
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
333
333
|
# @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
334
334
|
# @return [Array<(Response<(AffectedResources)>, Integer, Hash)>] Response<(AffectedResources)> data, response status code and response headers
|
335
|
-
def
|
335
|
+
def keys_delete_collection_with_http_info(project_id, opts = {})
|
336
336
|
if @api_client.config.debugging
|
337
|
-
@api_client.config.logger.debug 'Calling API: KeysApi.
|
337
|
+
@api_client.config.logger.debug 'Calling API: KeysApi.keys_delete_collection ...'
|
338
338
|
end
|
339
339
|
# verify the required parameter 'project_id' is set
|
340
340
|
if @api_client.config.client_side_validation && project_id.nil?
|
341
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.
|
341
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.keys_delete_collection"
|
342
342
|
end
|
343
343
|
# resource path
|
344
344
|
local_var_path = '/projects/{project_id}/keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -378,7 +378,7 @@ module Phrase
|
|
378
378
|
|
379
379
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
380
380
|
if @api_client.config.debugging
|
381
|
-
@api_client.config.logger.debug "API called: KeysApi#
|
381
|
+
@api_client.config.logger.debug "API called: KeysApi#keys_delete_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
382
382
|
end
|
383
383
|
response = ::Phrase::Response.new(data, headers)
|
384
384
|
return response, status_code, headers
|
@@ -175,7 +175,7 @@ module Phrase
|
|
175
175
|
# @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
|
176
176
|
# @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.
|
177
177
|
# @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 <code>true</code>.
|
178
|
-
# @return [
|
178
|
+
# @return [File]
|
179
179
|
def locale_download(project_id, id, opts = {})
|
180
180
|
data, _status_code, _headers = locale_download_with_http_info(project_id, id, opts)
|
181
181
|
data
|
@@ -202,7 +202,7 @@ module Phrase
|
|
202
202
|
# @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
|
203
203
|
# @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.
|
204
204
|
# @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 <code>true</code>.
|
205
|
-
# @return [Array<(Response
|
205
|
+
# @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
|
206
206
|
def locale_download_with_http_info(project_id, id, opts = {})
|
207
207
|
if @api_client.config.debugging
|
208
208
|
@api_client.config.logger.debug 'Calling API: LocalesApi.locale_download ...'
|
@@ -238,6 +238,8 @@ module Phrase
|
|
238
238
|
|
239
239
|
# header parameters
|
240
240
|
header_params = opts[:header_params] || {}
|
241
|
+
# HTTP header 'Accept' (if needed)
|
242
|
+
header_params['Accept'] = @api_client.select_header_accept(['*'])
|
241
243
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
242
244
|
|
243
245
|
# form parameters
|
@@ -247,7 +249,7 @@ module Phrase
|
|
247
249
|
post_body = opts[:body]
|
248
250
|
|
249
251
|
# return_type
|
250
|
-
return_type = opts[:return_type]
|
252
|
+
return_type = opts[:return_type] || 'File'
|
251
253
|
|
252
254
|
# auth_names
|
253
255
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
@@ -823,8 +823,8 @@ module Phrase
|
|
823
823
|
# @param [Hash] opts the optional parameters
|
824
824
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
825
825
|
# @return [AffectedCount]
|
826
|
-
def
|
827
|
-
data, _status_code, _headers =
|
826
|
+
def translations_exclude_collection(project_id, translations_exclude_parameters, opts = {})
|
827
|
+
data, _status_code, _headers = translations_exclude_collection_with_http_info(project_id, translations_exclude_parameters, opts)
|
828
828
|
data
|
829
829
|
end
|
830
830
|
|
@@ -835,17 +835,17 @@ module Phrase
|
|
835
835
|
# @param [Hash] opts the optional parameters
|
836
836
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
837
837
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
838
|
-
def
|
838
|
+
def translations_exclude_collection_with_http_info(project_id, translations_exclude_parameters, opts = {})
|
839
839
|
if @api_client.config.debugging
|
840
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
840
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_exclude_collection ...'
|
841
841
|
end
|
842
842
|
# verify the required parameter 'project_id' is set
|
843
843
|
if @api_client.config.client_side_validation && project_id.nil?
|
844
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
844
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_exclude_collection"
|
845
845
|
end
|
846
846
|
# verify the required parameter 'translations_exclude_parameters' is set
|
847
847
|
if @api_client.config.client_side_validation && translations_exclude_parameters.nil?
|
848
|
-
fail ArgumentError, "Missing the required parameter 'translations_exclude_parameters' when calling TranslationsApi.
|
848
|
+
fail ArgumentError, "Missing the required parameter 'translations_exclude_parameters' when calling TranslationsApi.translations_exclude_collection"
|
849
849
|
end
|
850
850
|
# resource path
|
851
851
|
local_var_path = '/projects/{project_id}/translations/exclude'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -884,7 +884,7 @@ module Phrase
|
|
884
884
|
|
885
885
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
886
886
|
if @api_client.config.debugging
|
887
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
887
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_exclude_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
888
888
|
end
|
889
889
|
response = ::Phrase::Response.new(data, headers)
|
890
890
|
return response, status_code, headers
|
@@ -897,8 +897,8 @@ module Phrase
|
|
897
897
|
# @param [Hash] opts the optional parameters
|
898
898
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
899
899
|
# @return [AffectedCount]
|
900
|
-
def
|
901
|
-
data, _status_code, _headers =
|
900
|
+
def translations_include_collection(project_id, translations_include_parameters, opts = {})
|
901
|
+
data, _status_code, _headers = translations_include_collection_with_http_info(project_id, translations_include_parameters, opts)
|
902
902
|
data
|
903
903
|
end
|
904
904
|
|
@@ -909,17 +909,17 @@ module Phrase
|
|
909
909
|
# @param [Hash] opts the optional parameters
|
910
910
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
911
911
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
912
|
-
def
|
912
|
+
def translations_include_collection_with_http_info(project_id, translations_include_parameters, opts = {})
|
913
913
|
if @api_client.config.debugging
|
914
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
914
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_include_collection ...'
|
915
915
|
end
|
916
916
|
# verify the required parameter 'project_id' is set
|
917
917
|
if @api_client.config.client_side_validation && project_id.nil?
|
918
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
918
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_include_collection"
|
919
919
|
end
|
920
920
|
# verify the required parameter 'translations_include_parameters' is set
|
921
921
|
if @api_client.config.client_side_validation && translations_include_parameters.nil?
|
922
|
-
fail ArgumentError, "Missing the required parameter 'translations_include_parameters' when calling TranslationsApi.
|
922
|
+
fail ArgumentError, "Missing the required parameter 'translations_include_parameters' when calling TranslationsApi.translations_include_collection"
|
923
923
|
end
|
924
924
|
# resource path
|
925
925
|
local_var_path = '/projects/{project_id}/translations/include'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -958,7 +958,7 @@ module Phrase
|
|
958
958
|
|
959
959
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
960
960
|
if @api_client.config.debugging
|
961
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
961
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_include_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
962
962
|
end
|
963
963
|
response = ::Phrase::Response.new(data, headers)
|
964
964
|
return response, status_code, headers
|
@@ -1055,8 +1055,8 @@ module Phrase
|
|
1055
1055
|
# @param [Hash] opts the optional parameters
|
1056
1056
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1057
1057
|
# @return [AffectedCount]
|
1058
|
-
def
|
1059
|
-
data, _status_code, _headers =
|
1058
|
+
def translations_review_collection(project_id, translations_review_parameters, opts = {})
|
1059
|
+
data, _status_code, _headers = translations_review_collection_with_http_info(project_id, translations_review_parameters, opts)
|
1060
1060
|
data
|
1061
1061
|
end
|
1062
1062
|
|
@@ -1067,17 +1067,17 @@ module Phrase
|
|
1067
1067
|
# @param [Hash] opts the optional parameters
|
1068
1068
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1069
1069
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
1070
|
-
def
|
1070
|
+
def translations_review_collection_with_http_info(project_id, translations_review_parameters, opts = {})
|
1071
1071
|
if @api_client.config.debugging
|
1072
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
1072
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_review_collection ...'
|
1073
1073
|
end
|
1074
1074
|
# verify the required parameter 'project_id' is set
|
1075
1075
|
if @api_client.config.client_side_validation && project_id.nil?
|
1076
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
1076
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_review_collection"
|
1077
1077
|
end
|
1078
1078
|
# verify the required parameter 'translations_review_parameters' is set
|
1079
1079
|
if @api_client.config.client_side_validation && translations_review_parameters.nil?
|
1080
|
-
fail ArgumentError, "Missing the required parameter 'translations_review_parameters' when calling TranslationsApi.
|
1080
|
+
fail ArgumentError, "Missing the required parameter 'translations_review_parameters' when calling TranslationsApi.translations_review_collection"
|
1081
1081
|
end
|
1082
1082
|
# resource path
|
1083
1083
|
local_var_path = '/projects/{project_id}/translations/review'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -1116,7 +1116,7 @@ module Phrase
|
|
1116
1116
|
|
1117
1117
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1118
1118
|
if @api_client.config.debugging
|
1119
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
1119
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_review_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1120
1120
|
end
|
1121
1121
|
response = ::Phrase::Response.new(data, headers)
|
1122
1122
|
return response, status_code, headers
|
@@ -1209,8 +1209,8 @@ module Phrase
|
|
1209
1209
|
# @param [Hash] opts the optional parameters
|
1210
1210
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1211
1211
|
# @return [AffectedCount]
|
1212
|
-
def
|
1213
|
-
data, _status_code, _headers =
|
1212
|
+
def translations_unverify_collection(project_id, translations_unverify_parameters, opts = {})
|
1213
|
+
data, _status_code, _headers = translations_unverify_collection_with_http_info(project_id, translations_unverify_parameters, opts)
|
1214
1214
|
data
|
1215
1215
|
end
|
1216
1216
|
|
@@ -1221,17 +1221,17 @@ module Phrase
|
|
1221
1221
|
# @param [Hash] opts the optional parameters
|
1222
1222
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1223
1223
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
1224
|
-
def
|
1224
|
+
def translations_unverify_collection_with_http_info(project_id, translations_unverify_parameters, opts = {})
|
1225
1225
|
if @api_client.config.debugging
|
1226
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
1226
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_unverify_collection ...'
|
1227
1227
|
end
|
1228
1228
|
# verify the required parameter 'project_id' is set
|
1229
1229
|
if @api_client.config.client_side_validation && project_id.nil?
|
1230
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
1230
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_unverify_collection"
|
1231
1231
|
end
|
1232
1232
|
# verify the required parameter 'translations_unverify_parameters' is set
|
1233
1233
|
if @api_client.config.client_side_validation && translations_unverify_parameters.nil?
|
1234
|
-
fail ArgumentError, "Missing the required parameter 'translations_unverify_parameters' when calling TranslationsApi.
|
1234
|
+
fail ArgumentError, "Missing the required parameter 'translations_unverify_parameters' when calling TranslationsApi.translations_unverify_collection"
|
1235
1235
|
end
|
1236
1236
|
# resource path
|
1237
1237
|
local_var_path = '/projects/{project_id}/translations/unverify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -1270,7 +1270,7 @@ module Phrase
|
|
1270
1270
|
|
1271
1271
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1272
1272
|
if @api_client.config.debugging
|
1273
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
1273
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_unverify_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1274
1274
|
end
|
1275
1275
|
response = ::Phrase::Response.new(data, headers)
|
1276
1276
|
return response, status_code, headers
|
@@ -1283,8 +1283,8 @@ module Phrase
|
|
1283
1283
|
# @param [Hash] opts the optional parameters
|
1284
1284
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1285
1285
|
# @return [AffectedCount]
|
1286
|
-
def
|
1287
|
-
data, _status_code, _headers =
|
1286
|
+
def translations_verify_collection(project_id, translations_verify_parameters, opts = {})
|
1287
|
+
data, _status_code, _headers = translations_verify_collection_with_http_info(project_id, translations_verify_parameters, opts)
|
1288
1288
|
data
|
1289
1289
|
end
|
1290
1290
|
|
@@ -1295,17 +1295,17 @@ module Phrase
|
|
1295
1295
|
# @param [Hash] opts the optional parameters
|
1296
1296
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1297
1297
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
1298
|
-
def
|
1298
|
+
def translations_verify_collection_with_http_info(project_id, translations_verify_parameters, opts = {})
|
1299
1299
|
if @api_client.config.debugging
|
1300
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
1300
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_verify_collection ...'
|
1301
1301
|
end
|
1302
1302
|
# verify the required parameter 'project_id' is set
|
1303
1303
|
if @api_client.config.client_side_validation && project_id.nil?
|
1304
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
1304
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_verify_collection"
|
1305
1305
|
end
|
1306
1306
|
# verify the required parameter 'translations_verify_parameters' is set
|
1307
1307
|
if @api_client.config.client_side_validation && translations_verify_parameters.nil?
|
1308
|
-
fail ArgumentError, "Missing the required parameter 'translations_verify_parameters' when calling TranslationsApi.
|
1308
|
+
fail ArgumentError, "Missing the required parameter 'translations_verify_parameters' when calling TranslationsApi.translations_verify_collection"
|
1309
1309
|
end
|
1310
1310
|
# resource path
|
1311
1311
|
local_var_path = '/projects/{project_id}/translations/verify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -1344,7 +1344,7 @@ module Phrase
|
|
1344
1344
|
|
1345
1345
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1346
1346
|
if @api_client.config.debugging
|
1347
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
1347
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_verify_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1348
1348
|
end
|
1349
1349
|
response = ::Phrase::Response.new(data, headers)
|
1350
1350
|
return response, status_code, headers
|