phrase 1.0.13 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +48 -9
- data/docs/Account.md +3 -1
- data/docs/AccountDetails.md +5 -1
- data/docs/AccountDetails1.md +3 -1
- data/docs/AccountSearchResult.md +29 -0
- data/docs/Branch.md +5 -1
- data/docs/Comment.md +3 -1
- data/docs/CurrentUser.md +31 -0
- data/docs/JobCreateParameters.md +2 -0
- data/docs/JobDetails.md +2 -0
- data/docs/JobDetails1.md +2 -0
- data/docs/JobLocale.md +5 -1
- data/docs/JobTemplate.md +29 -0
- data/docs/JobTemplateCreateParameters.md +21 -0
- data/docs/JobTemplateLocale.md +23 -0
- data/docs/JobTemplateLocaleUpdateParameters.md +23 -0
- data/docs/JobTemplateLocalesApi.md +347 -0
- data/docs/JobTemplateLocalesCreateParameters.md +23 -0
- data/docs/JobTemplatePreview.md +19 -0
- data/docs/JobTemplateUpdateParameters.md +21 -0
- data/docs/JobTemplateUserPreview.md +23 -0
- data/docs/JobTemplatesApi.md +337 -0
- data/docs/KeysApi.md +137 -9
- data/docs/KeysExcludeParameters.md +23 -0
- data/docs/KeysIncludeParameters.md +23 -0
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/LocalePreview1.md +23 -0
- data/docs/LocalesApi.md +73 -6
- data/docs/MemberSpaces.md +2 -2
- data/docs/MemberUpdateParameters.md +4 -2
- data/docs/Notification.md +41 -0
- data/docs/NotificationGroup.md +23 -0
- data/docs/NotificationGroupDetail.md +27 -0
- data/docs/NotificationGroupsApi.md +194 -0
- data/docs/NotificationsApi.md +194 -0
- data/docs/OrderCreateParameters.md +2 -0
- data/docs/Project.md +2 -0
- data/docs/ProjectCreateParameters.md +35 -1
- data/docs/ProjectDetails.md +2 -0
- data/docs/ProjectsApi.md +7 -1
- data/docs/ScreenshotCreateParameters.md +3 -1
- data/docs/ScreenshotMarkerCreateParameters.md +3 -1
- data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
- data/docs/ScreenshotMarkersApi.md +9 -3
- data/docs/ScreenshotUpdateParameters.md +3 -1
- data/docs/ScreenshotsApi.md +8 -2
- data/docs/SearchApi.md +72 -0
- data/docs/SearchInAccountParameters.md +23 -0
- data/docs/Space1.md +25 -0
- data/docs/Subscription.md +19 -0
- data/docs/TranslationOrder.md +2 -0
- data/docs/TranslationsApi.md +25 -25
- data/docs/User.md +0 -2
- data/docs/UsersApi.md +2 -2
- data/lib/phrase.rb +24 -0
- data/lib/phrase/api/job_template_locales_api.rb +417 -0
- data/lib/phrase/api/job_templates_api.rb +387 -0
- data/lib/phrase/api/keys_api.rb +158 -10
- data/lib/phrase/api/locales_api.rb +76 -5
- data/lib/phrase/api/notification_groups_api.rb +202 -0
- data/lib/phrase/api/notifications_api.rb +202 -0
- data/lib/phrase/api/projects_api.rb +9 -0
- data/lib/phrase/api/screenshot_markers_api.rb +9 -0
- data/lib/phrase/api/screenshots_api.rb +9 -0
- data/lib/phrase/api/search_api.rb +84 -0
- data/lib/phrase/api/translations_api.rb +35 -35
- data/lib/phrase/api/users_api.rb +3 -3
- data/lib/phrase/models/account.rb +13 -4
- data/lib/phrase/models/account_details.rb +22 -4
- data/lib/phrase/models/account_details1.rb +10 -1
- data/lib/phrase/models/account_search_result.rb +250 -0
- data/lib/phrase/models/branch.rb +19 -1
- data/lib/phrase/models/comment.rb +15 -4
- data/lib/phrase/models/current_user.rb +257 -0
- data/lib/phrase/models/job_create_parameters.rb +11 -1
- data/lib/phrase/models/job_details.rb +10 -1
- data/lib/phrase/models/job_details1.rb +10 -1
- data/lib/phrase/models/job_locale.rb +22 -4
- data/lib/phrase/models/job_template.rb +248 -0
- data/lib/phrase/models/job_template_create_parameters.rb +220 -0
- data/lib/phrase/models/job_template_locale.rb +223 -0
- data/lib/phrase/models/job_template_locale_update_parameters.rb +234 -0
- data/lib/phrase/models/job_template_locales_create_parameters.rb +234 -0
- data/lib/phrase/models/job_template_preview.rb +203 -0
- data/lib/phrase/models/job_template_update_parameters.rb +220 -0
- data/lib/phrase/models/job_template_user_preview.rb +221 -0
- data/lib/phrase/models/keys_exclude_parameters.rb +225 -0
- data/lib/phrase/models/keys_include_parameters.rb +225 -0
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/keys_tag_parameters.rb +1 -1
- data/lib/phrase/models/keys_untag_parameters.rb +1 -1
- data/lib/phrase/models/locale_preview1.rb +221 -0
- data/lib/phrase/models/member_spaces.rb +2 -2
- data/lib/phrase/models/member_update_parameters.rb +12 -2
- data/lib/phrase/models/notification.rb +302 -0
- data/lib/phrase/models/notification_group.rb +221 -0
- data/lib/phrase/models/notification_group_detail.rb +239 -0
- data/lib/phrase/models/order_create_parameters.rb +11 -1
- data/lib/phrase/models/project.rb +10 -1
- data/lib/phrase/models/project_create_parameters.rb +174 -4
- data/lib/phrase/models/project_details.rb +10 -1
- data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
- data/lib/phrase/models/search_in_account_parameters.rb +225 -0
- data/lib/phrase/models/space1.rb +230 -0
- data/lib/phrase/models/subscription.rb +203 -0
- data/lib/phrase/models/translation_order.rb +10 -1
- data/lib/phrase/models/user.rb +1 -10
- data/lib/phrase/version.rb +1 -1
- data/spec/api/job_template_locales_api_spec.rb +103 -0
- data/spec/api/job_templates_api_spec.rb +98 -0
- data/spec/api/keys_api_spec.rb +32 -4
- data/spec/api/locales_api_spec.rb +17 -2
- data/spec/api/notification_groups_api_spec.rb +62 -0
- data/spec/api/notifications_api_spec.rb +62 -0
- data/spec/api/projects_api_spec.rb +3 -0
- data/spec/api/screenshot_markers_api_spec.rb +3 -0
- data/spec/api/screenshots_api_spec.rb +3 -0
- data/spec/api/search_api_spec.rb +37 -0
- data/spec/api/translations_api_spec.rb +10 -10
- data/spec/api/users_api_spec.rb +1 -1
- data/spec/models/account_details1_spec.rb +6 -0
- data/spec/models/account_details_spec.rb +12 -0
- data/spec/models/account_search_result_spec.rb +65 -0
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/branch_spec.rb +12 -0
- data/spec/models/comment_spec.rb +6 -0
- data/spec/models/current_user_spec.rb +71 -0
- data/spec/models/job_create_parameters_spec.rb +6 -0
- data/spec/models/job_details1_spec.rb +6 -0
- data/spec/models/job_details_spec.rb +6 -0
- data/spec/models/job_locale_spec.rb +12 -0
- data/spec/models/job_template_create_parameters_spec.rb +41 -0
- data/spec/models/job_template_locale_spec.rb +47 -0
- data/spec/models/job_template_locale_update_parameters_spec.rb +47 -0
- data/spec/models/job_template_locales_create_parameters_spec.rb +47 -0
- data/spec/models/job_template_preview_spec.rb +35 -0
- data/spec/models/job_template_spec.rb +65 -0
- data/spec/models/job_template_update_parameters_spec.rb +41 -0
- data/spec/models/job_template_user_preview_spec.rb +47 -0
- data/spec/models/keys_exclude_parameters_spec.rb +47 -0
- data/spec/models/keys_include_parameters_spec.rb +47 -0
- data/spec/models/locale_preview1_spec.rb +47 -0
- data/spec/models/member_update_parameters_spec.rb +6 -0
- data/spec/models/notification_group_detail_spec.rb +59 -0
- data/spec/models/notification_group_spec.rb +47 -0
- data/spec/models/notification_spec.rb +101 -0
- data/spec/models/order_create_parameters_spec.rb +6 -0
- data/spec/models/project_create_parameters_spec.rb +102 -0
- data/spec/models/project_details_spec.rb +6 -0
- data/spec/models/project_spec.rb +6 -0
- data/spec/models/screenshot_create_parameters_spec.rb +6 -0
- data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
- data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
- data/spec/models/screenshot_update_parameters_spec.rb +6 -0
- data/spec/models/search_in_account_parameters_spec.rb +47 -0
- data/spec/models/space1_spec.rb +53 -0
- data/spec/models/subscription_spec.rb +35 -0
- data/spec/models/translation_order_spec.rb +6 -0
- data/spec/models/user_spec.rb +0 -6
- metadata +263 -167
data/docs/SearchApi.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Phrase::SearchApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**search_in_account**](SearchApi.md#search_in_account) | **POST** /accounts/{account_id}/search | Search across projects
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## search_in_account
|
|
12
|
+
|
|
13
|
+
> AccountSearchResult search_in_account(account_id, search_in_account_parameters, opts)
|
|
14
|
+
|
|
15
|
+
Search across projects
|
|
16
|
+
|
|
17
|
+
Search for keys and translations in all account projects
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
# load the gem
|
|
23
|
+
require 'phrase'
|
|
24
|
+
# setup authorization
|
|
25
|
+
Phrase.configure do |config|
|
|
26
|
+
# Configure HTTP basic authorization: Basic
|
|
27
|
+
config.username = 'YOUR USERNAME'
|
|
28
|
+
config.password = 'YOUR PASSWORD'
|
|
29
|
+
|
|
30
|
+
# Configure API key authorization: Token
|
|
31
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
32
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
api_instance = Phrase::SearchApi.new
|
|
36
|
+
account_id = 'account_id_example' # String | Account ID
|
|
37
|
+
search_in_account_parameters = Phrase::SearchInAccountParameters.new # SearchInAccountParameters |
|
|
38
|
+
opts = {
|
|
39
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
#Search across projects
|
|
44
|
+
result = api_instance.search_in_account(account_id, search_in_account_parameters, opts)
|
|
45
|
+
pp result
|
|
46
|
+
rescue Phrase::ApiError => e
|
|
47
|
+
puts "Exception when calling SearchApi->search_in_account: #{e}"
|
|
48
|
+
end
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Name | Type | Description | Notes
|
|
55
|
+
------------- | ------------- | ------------- | -------------
|
|
56
|
+
**account_id** | **String**| Account ID |
|
|
57
|
+
**search_in_account_parameters** | [**SearchInAccountParameters**](SearchInAccountParameters.md)| |
|
|
58
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
Response<([**AccountSearchResult**](AccountSearchResult.md))>
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: application/json
|
|
71
|
+
- **Accept**: application/json
|
|
72
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Phrase::SearchInAccountParameters
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**query** | **String** | Search query | [optional]
|
|
8
|
+
**locale_code** | **String** | Locale code | [optional]
|
|
9
|
+
**page** | **Integer** | Page | [optional]
|
|
10
|
+
**per_page** | **Integer** | Number of results per page | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'Phrase'
|
|
16
|
+
|
|
17
|
+
instance = Phrase::SearchInAccountParameters.new(query: keyword,
|
|
18
|
+
locale_code: de_DE,
|
|
19
|
+
page: 1,
|
|
20
|
+
per_page: 25)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
data/docs/Space1.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Phrase::Space1
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**id** | **String** | | [optional]
|
|
8
|
+
**name** | **String** | | [optional]
|
|
9
|
+
**created_at** | **DateTime** | | [optional]
|
|
10
|
+
**updated_at** | **DateTime** | | [optional]
|
|
11
|
+
**projects_count** | **Integer** | | [optional]
|
|
12
|
+
|
|
13
|
+
## Code Sample
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'Phrase'
|
|
17
|
+
|
|
18
|
+
instance = Phrase::Space1.new(id: null,
|
|
19
|
+
name: null,
|
|
20
|
+
created_at: null,
|
|
21
|
+
updated_at: null,
|
|
22
|
+
projects_count: null)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Phrase::Subscription
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**is_current** | **Boolean** | | [optional]
|
|
8
|
+
**trial_expired** | **Boolean** | | [optional]
|
|
9
|
+
|
|
10
|
+
## Code Sample
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'Phrase'
|
|
14
|
+
|
|
15
|
+
instance = Phrase::Subscription.new(is_current: null,
|
|
16
|
+
trial_expired: null)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
data/docs/TranslationOrder.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**id** | **String** | | [optional]
|
|
8
|
+
**name** | **String** | | [optional]
|
|
8
9
|
**lsp** | **String** | | [optional]
|
|
9
10
|
**amount_in_cents** | **Integer** | | [optional]
|
|
10
11
|
**currency** | **String** | | [optional]
|
|
@@ -28,6 +29,7 @@ Name | Type | Description | Notes
|
|
|
28
29
|
require 'Phrase'
|
|
29
30
|
|
|
30
31
|
instance = Phrase::TranslationOrder.new(id: null,
|
|
32
|
+
name: null,
|
|
31
33
|
lsp: null,
|
|
32
34
|
amount_in_cents: null,
|
|
33
35
|
currency: null,
|
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/User.md
CHANGED
|
@@ -7,7 +7,6 @@ Name | Type | Description | Notes
|
|
|
7
7
|
**id** | **String** | | [optional]
|
|
8
8
|
**username** | **String** | | [optional]
|
|
9
9
|
**name** | **String** | | [optional]
|
|
10
|
-
**email** | **String** | | [optional]
|
|
11
10
|
**position** | **String** | | [optional]
|
|
12
11
|
**created_at** | **DateTime** | | [optional]
|
|
13
12
|
**updated_at** | **DateTime** | | [optional]
|
|
@@ -20,7 +19,6 @@ require 'Phrase'
|
|
|
20
19
|
instance = Phrase::User.new(id: null,
|
|
21
20
|
username: null,
|
|
22
21
|
name: null,
|
|
23
|
-
email: null,
|
|
24
22
|
position: null,
|
|
25
23
|
created_at: null,
|
|
26
24
|
updated_at: null)
|
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
|
@@ -11,6 +11,7 @@ require 'phrase/configuration'
|
|
|
11
11
|
require 'phrase/models/account'
|
|
12
12
|
require 'phrase/models/account_details'
|
|
13
13
|
require 'phrase/models/account_details1'
|
|
14
|
+
require 'phrase/models/account_search_result'
|
|
14
15
|
require 'phrase/models/affected_count'
|
|
15
16
|
require 'phrase/models/affected_resources'
|
|
16
17
|
require 'phrase/models/authorization'
|
|
@@ -34,6 +35,7 @@ require 'phrase/models/comment'
|
|
|
34
35
|
require 'phrase/models/comment_create_parameters'
|
|
35
36
|
require 'phrase/models/comment_mark_read_parameters'
|
|
36
37
|
require 'phrase/models/comment_update_parameters'
|
|
38
|
+
require 'phrase/models/current_user'
|
|
37
39
|
require 'phrase/models/distribution'
|
|
38
40
|
require 'phrase/models/distribution_create_parameters'
|
|
39
41
|
require 'phrase/models/distribution_preview'
|
|
@@ -76,10 +78,20 @@ require 'phrase/models/job_locales_create_parameters'
|
|
|
76
78
|
require 'phrase/models/job_preview'
|
|
77
79
|
require 'phrase/models/job_reopen_parameters'
|
|
78
80
|
require 'phrase/models/job_start_parameters'
|
|
81
|
+
require 'phrase/models/job_template'
|
|
82
|
+
require 'phrase/models/job_template_create_parameters'
|
|
83
|
+
require 'phrase/models/job_template_locale'
|
|
84
|
+
require 'phrase/models/job_template_locale_update_parameters'
|
|
85
|
+
require 'phrase/models/job_template_locales_create_parameters'
|
|
86
|
+
require 'phrase/models/job_template_preview'
|
|
87
|
+
require 'phrase/models/job_template_update_parameters'
|
|
88
|
+
require 'phrase/models/job_template_user_preview'
|
|
79
89
|
require 'phrase/models/job_update_parameters'
|
|
80
90
|
require 'phrase/models/key_create_parameters'
|
|
81
91
|
require 'phrase/models/key_preview'
|
|
82
92
|
require 'phrase/models/key_update_parameters'
|
|
93
|
+
require 'phrase/models/keys_exclude_parameters'
|
|
94
|
+
require 'phrase/models/keys_include_parameters'
|
|
83
95
|
require 'phrase/models/keys_search_parameters'
|
|
84
96
|
require 'phrase/models/keys_tag_parameters'
|
|
85
97
|
require 'phrase/models/keys_untag_parameters'
|
|
@@ -88,6 +100,7 @@ require 'phrase/models/locale_create_parameters'
|
|
|
88
100
|
require 'phrase/models/locale_details'
|
|
89
101
|
require 'phrase/models/locale_details1'
|
|
90
102
|
require 'phrase/models/locale_preview'
|
|
103
|
+
require 'phrase/models/locale_preview1'
|
|
91
104
|
require 'phrase/models/locale_statistics'
|
|
92
105
|
require 'phrase/models/locale_update_parameters'
|
|
93
106
|
require 'phrase/models/member'
|
|
@@ -96,6 +109,9 @@ require 'phrase/models/member_project_detail_project_roles'
|
|
|
96
109
|
require 'phrase/models/member_spaces'
|
|
97
110
|
require 'phrase/models/member_update_parameters'
|
|
98
111
|
require 'phrase/models/member_update_settings_parameters'
|
|
112
|
+
require 'phrase/models/notification'
|
|
113
|
+
require 'phrase/models/notification_group'
|
|
114
|
+
require 'phrase/models/notification_group_detail'
|
|
99
115
|
require 'phrase/models/order_confirm_parameters'
|
|
100
116
|
require 'phrase/models/order_create_parameters'
|
|
101
117
|
require 'phrase/models/project'
|
|
@@ -116,7 +132,9 @@ require 'phrase/models/screenshot_marker'
|
|
|
116
132
|
require 'phrase/models/screenshot_marker_create_parameters'
|
|
117
133
|
require 'phrase/models/screenshot_marker_update_parameters'
|
|
118
134
|
require 'phrase/models/screenshot_update_parameters'
|
|
135
|
+
require 'phrase/models/search_in_account_parameters'
|
|
119
136
|
require 'phrase/models/space'
|
|
137
|
+
require 'phrase/models/space1'
|
|
120
138
|
require 'phrase/models/space_create_parameters'
|
|
121
139
|
require 'phrase/models/space_update_parameters'
|
|
122
140
|
require 'phrase/models/spaces_projects_create_parameters'
|
|
@@ -126,6 +144,7 @@ require 'phrase/models/styleguide_details'
|
|
|
126
144
|
require 'phrase/models/styleguide_details1'
|
|
127
145
|
require 'phrase/models/styleguide_preview'
|
|
128
146
|
require 'phrase/models/styleguide_update_parameters'
|
|
147
|
+
require 'phrase/models/subscription'
|
|
129
148
|
require 'phrase/models/tag'
|
|
130
149
|
require 'phrase/models/tag_create_parameters'
|
|
131
150
|
require 'phrase/models/tag_with_stats'
|
|
@@ -191,15 +210,20 @@ require 'phrase/api/glossary_term_translations_api'
|
|
|
191
210
|
require 'phrase/api/glossary_terms_api'
|
|
192
211
|
require 'phrase/api/invitations_api'
|
|
193
212
|
require 'phrase/api/job_locales_api'
|
|
213
|
+
require 'phrase/api/job_template_locales_api'
|
|
214
|
+
require 'phrase/api/job_templates_api'
|
|
194
215
|
require 'phrase/api/jobs_api'
|
|
195
216
|
require 'phrase/api/keys_api'
|
|
196
217
|
require 'phrase/api/locales_api'
|
|
197
218
|
require 'phrase/api/members_api'
|
|
219
|
+
require 'phrase/api/notification_groups_api'
|
|
220
|
+
require 'phrase/api/notifications_api'
|
|
198
221
|
require 'phrase/api/orders_api'
|
|
199
222
|
require 'phrase/api/projects_api'
|
|
200
223
|
require 'phrase/api/releases_api'
|
|
201
224
|
require 'phrase/api/screenshot_markers_api'
|
|
202
225
|
require 'phrase/api/screenshots_api'
|
|
226
|
+
require 'phrase/api/search_api'
|
|
203
227
|
require 'phrase/api/spaces_api'
|
|
204
228
|
require 'phrase/api/style_guides_api'
|
|
205
229
|
require 'phrase/api/tags_api'
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class JobTemplateLocalesApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Delete a job template locale
|
|
11
|
+
# Delete an existing job template locale.
|
|
12
|
+
# @param project_id [String] Project ID
|
|
13
|
+
# @param job_template_id [String] Job Template ID
|
|
14
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
|
15
|
+
# @param [Hash] opts the optional parameters
|
|
16
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
17
|
+
# @option opts [String] :branch specify the branch to use
|
|
18
|
+
# @return [nil]
|
|
19
|
+
def job_template_locale_delete(project_id, job_template_id, job_template_locale_id, opts = {})
|
|
20
|
+
data, _status_code, _headers = job_template_locale_delete_with_http_info(project_id, job_template_id, job_template_locale_id, opts)
|
|
21
|
+
data
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Delete a job template locale
|
|
25
|
+
# Delete an existing job template locale.
|
|
26
|
+
# @param project_id [String] Project ID
|
|
27
|
+
# @param job_template_id [String] Job Template ID
|
|
28
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
|
29
|
+
# @param [Hash] opts the optional parameters
|
|
30
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
31
|
+
# @option opts [String] :branch specify the branch to use
|
|
32
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
33
|
+
def job_template_locale_delete_with_http_info(project_id, job_template_id, job_template_locale_id, opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: JobTemplateLocalesApi.job_template_locale_delete ...'
|
|
36
|
+
end
|
|
37
|
+
# verify the required parameter 'project_id' is set
|
|
38
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
39
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobTemplateLocalesApi.job_template_locale_delete"
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'job_template_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling JobTemplateLocalesApi.job_template_locale_delete"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'job_template_locale_id' is set
|
|
46
|
+
if @api_client.config.client_side_validation && job_template_locale_id.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locale_id' when calling JobTemplateLocalesApi.job_template_locale_delete"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/projects/{project_id}/job_templates/{job_template_id}/locales/{job_template_locale_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s)).sub('{' + 'job_template_locale_id' + '}', CGI.escape(job_template_locale_id.to_s))
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
55
|
+
|
|
56
|
+
# header parameters
|
|
57
|
+
header_params = opts[:header_params] || {}
|
|
58
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
59
|
+
|
|
60
|
+
# form parameters
|
|
61
|
+
form_params = opts[:form_params] || {}
|
|
62
|
+
|
|
63
|
+
# http body (model)
|
|
64
|
+
post_body = opts[:body]
|
|
65
|
+
|
|
66
|
+
# return_type
|
|
67
|
+
return_type = opts[:return_type]
|
|
68
|
+
|
|
69
|
+
# auth_names
|
|
70
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
71
|
+
|
|
72
|
+
new_options = opts.merge(
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: JobTemplateLocalesApi#job_template_locale_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
response = ::Phrase::Response.new(data, headers)
|
|
86
|
+
return response, status_code, headers
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Get a single job template locale
|
|
90
|
+
# Get a single job template locale for a given job template.
|
|
91
|
+
# @param project_id [String] Project ID
|
|
92
|
+
# @param job_template_id [String] Job Template ID
|
|
93
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
|
94
|
+
# @param [Hash] opts the optional parameters
|
|
95
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
96
|
+
# @option opts [String] :branch specify the branch to use
|
|
97
|
+
# @return [Object]
|
|
98
|
+
def job_template_locale_show(project_id, job_template_id, job_template_locale_id, opts = {})
|
|
99
|
+
data, _status_code, _headers = job_template_locale_show_with_http_info(project_id, job_template_id, job_template_locale_id, opts)
|
|
100
|
+
data
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Get a single job template locale
|
|
104
|
+
# Get a single job template locale for a given job template.
|
|
105
|
+
# @param project_id [String] Project ID
|
|
106
|
+
# @param job_template_id [String] Job Template ID
|
|
107
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
|
108
|
+
# @param [Hash] opts the optional parameters
|
|
109
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
110
|
+
# @option opts [String] :branch specify the branch to use
|
|
111
|
+
# @return [Array<(Response<(Object)>, Integer, Hash)>] Response<(Object)> data, response status code and response headers
|
|
112
|
+
def job_template_locale_show_with_http_info(project_id, job_template_id, job_template_locale_id, opts = {})
|
|
113
|
+
if @api_client.config.debugging
|
|
114
|
+
@api_client.config.logger.debug 'Calling API: JobTemplateLocalesApi.job_template_locale_show ...'
|
|
115
|
+
end
|
|
116
|
+
# verify the required parameter 'project_id' is set
|
|
117
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
118
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobTemplateLocalesApi.job_template_locale_show"
|
|
119
|
+
end
|
|
120
|
+
# verify the required parameter 'job_template_id' is set
|
|
121
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling JobTemplateLocalesApi.job_template_locale_show"
|
|
123
|
+
end
|
|
124
|
+
# verify the required parameter 'job_template_locale_id' is set
|
|
125
|
+
if @api_client.config.client_side_validation && job_template_locale_id.nil?
|
|
126
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locale_id' when calling JobTemplateLocalesApi.job_template_locale_show"
|
|
127
|
+
end
|
|
128
|
+
# resource path
|
|
129
|
+
local_var_path = '/projects/{project_id}/job_templates/{job_template_id}/locales/{job_template_locale_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s)).sub('{' + 'job_template_locale_id' + '}', CGI.escape(job_template_locale_id.to_s))
|
|
130
|
+
|
|
131
|
+
# query parameters
|
|
132
|
+
query_params = opts[:query_params] || {}
|
|
133
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
134
|
+
|
|
135
|
+
# header parameters
|
|
136
|
+
header_params = opts[:header_params] || {}
|
|
137
|
+
# HTTP header 'Accept' (if needed)
|
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
139
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = opts[:form_params] || {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = opts[:body]
|
|
146
|
+
|
|
147
|
+
# return_type
|
|
148
|
+
return_type = opts[:return_type] || 'Object'
|
|
149
|
+
|
|
150
|
+
# auth_names
|
|
151
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
152
|
+
|
|
153
|
+
new_options = opts.merge(
|
|
154
|
+
:header_params => header_params,
|
|
155
|
+
:query_params => query_params,
|
|
156
|
+
:form_params => form_params,
|
|
157
|
+
:body => post_body,
|
|
158
|
+
:auth_names => auth_names,
|
|
159
|
+
:return_type => return_type
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
163
|
+
if @api_client.config.debugging
|
|
164
|
+
@api_client.config.logger.debug "API called: JobTemplateLocalesApi#job_template_locale_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
165
|
+
end
|
|
166
|
+
response = ::Phrase::Response.new(data, headers)
|
|
167
|
+
return response, status_code, headers
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Update a job template locale
|
|
171
|
+
# Update an existing job template locale.
|
|
172
|
+
# @param project_id [String] Project ID
|
|
173
|
+
# @param job_template_id [String] Job Template ID
|
|
174
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
|
175
|
+
# @param job_template_locale_update_parameters [JobTemplateLocaleUpdateParameters]
|
|
176
|
+
# @param [Hash] opts the optional parameters
|
|
177
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
178
|
+
# @return [Object]
|
|
179
|
+
def job_template_locale_update(project_id, job_template_id, job_template_locale_id, job_template_locale_update_parameters, opts = {})
|
|
180
|
+
data, _status_code, _headers = job_template_locale_update_with_http_info(project_id, job_template_id, job_template_locale_id, job_template_locale_update_parameters, opts)
|
|
181
|
+
data
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Update a job template locale
|
|
185
|
+
# Update an existing job template locale.
|
|
186
|
+
# @param project_id [String] Project ID
|
|
187
|
+
# @param job_template_id [String] Job Template ID
|
|
188
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
|
189
|
+
# @param job_template_locale_update_parameters [JobTemplateLocaleUpdateParameters]
|
|
190
|
+
# @param [Hash] opts the optional parameters
|
|
191
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
192
|
+
# @return [Array<(Response<(Object)>, Integer, Hash)>] Response<(Object)> data, response status code and response headers
|
|
193
|
+
def job_template_locale_update_with_http_info(project_id, job_template_id, job_template_locale_id, job_template_locale_update_parameters, opts = {})
|
|
194
|
+
if @api_client.config.debugging
|
|
195
|
+
@api_client.config.logger.debug 'Calling API: JobTemplateLocalesApi.job_template_locale_update ...'
|
|
196
|
+
end
|
|
197
|
+
# verify the required parameter 'project_id' is set
|
|
198
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
199
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobTemplateLocalesApi.job_template_locale_update"
|
|
200
|
+
end
|
|
201
|
+
# verify the required parameter 'job_template_id' is set
|
|
202
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
|
203
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling JobTemplateLocalesApi.job_template_locale_update"
|
|
204
|
+
end
|
|
205
|
+
# verify the required parameter 'job_template_locale_id' is set
|
|
206
|
+
if @api_client.config.client_side_validation && job_template_locale_id.nil?
|
|
207
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locale_id' when calling JobTemplateLocalesApi.job_template_locale_update"
|
|
208
|
+
end
|
|
209
|
+
# verify the required parameter 'job_template_locale_update_parameters' is set
|
|
210
|
+
if @api_client.config.client_side_validation && job_template_locale_update_parameters.nil?
|
|
211
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locale_update_parameters' when calling JobTemplateLocalesApi.job_template_locale_update"
|
|
212
|
+
end
|
|
213
|
+
# resource path
|
|
214
|
+
local_var_path = '/projects/{project_id}/job_templates/{job_template_id}/locales/{job_template_locale_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s)).sub('{' + 'job_template_locale_id' + '}', CGI.escape(job_template_locale_id.to_s))
|
|
215
|
+
|
|
216
|
+
# query parameters
|
|
217
|
+
query_params = opts[:query_params] || {}
|
|
218
|
+
|
|
219
|
+
# header parameters
|
|
220
|
+
header_params = opts[:header_params] || {}
|
|
221
|
+
# HTTP header 'Accept' (if needed)
|
|
222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
223
|
+
# HTTP header 'Content-Type'
|
|
224
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
225
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
226
|
+
|
|
227
|
+
# form parameters
|
|
228
|
+
form_params = opts[:form_params] || {}
|
|
229
|
+
|
|
230
|
+
# http body (model)
|
|
231
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_template_locale_update_parameters)
|
|
232
|
+
|
|
233
|
+
# return_type
|
|
234
|
+
return_type = opts[:return_type] || 'Object'
|
|
235
|
+
|
|
236
|
+
# auth_names
|
|
237
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
238
|
+
|
|
239
|
+
new_options = opts.merge(
|
|
240
|
+
:header_params => header_params,
|
|
241
|
+
:query_params => query_params,
|
|
242
|
+
:form_params => form_params,
|
|
243
|
+
:body => post_body,
|
|
244
|
+
:auth_names => auth_names,
|
|
245
|
+
:return_type => return_type
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug "API called: JobTemplateLocalesApi#job_template_locale_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
251
|
+
end
|
|
252
|
+
response = ::Phrase::Response.new(data, headers)
|
|
253
|
+
return response, status_code, headers
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Create a job template locale
|
|
257
|
+
# Create a new job template locale.
|
|
258
|
+
# @param project_id [String] Project ID
|
|
259
|
+
# @param job_template_id [String] Job Template ID
|
|
260
|
+
# @param job_template_locales_create_parameters [JobTemplateLocalesCreateParameters]
|
|
261
|
+
# @param [Hash] opts the optional parameters
|
|
262
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
263
|
+
# @return [JobTemplateLocale]
|
|
264
|
+
def job_template_locales_create(project_id, job_template_id, job_template_locales_create_parameters, opts = {})
|
|
265
|
+
data, _status_code, _headers = job_template_locales_create_with_http_info(project_id, job_template_id, job_template_locales_create_parameters, opts)
|
|
266
|
+
data
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Create a job template locale
|
|
270
|
+
# Create a new job template locale.
|
|
271
|
+
# @param project_id [String] Project ID
|
|
272
|
+
# @param job_template_id [String] Job Template ID
|
|
273
|
+
# @param job_template_locales_create_parameters [JobTemplateLocalesCreateParameters]
|
|
274
|
+
# @param [Hash] opts the optional parameters
|
|
275
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
276
|
+
# @return [Array<(Response<(JobTemplateLocale)>, Integer, Hash)>] Response<(JobTemplateLocale)> data, response status code and response headers
|
|
277
|
+
def job_template_locales_create_with_http_info(project_id, job_template_id, job_template_locales_create_parameters, opts = {})
|
|
278
|
+
if @api_client.config.debugging
|
|
279
|
+
@api_client.config.logger.debug 'Calling API: JobTemplateLocalesApi.job_template_locales_create ...'
|
|
280
|
+
end
|
|
281
|
+
# verify the required parameter 'project_id' is set
|
|
282
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
283
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobTemplateLocalesApi.job_template_locales_create"
|
|
284
|
+
end
|
|
285
|
+
# verify the required parameter 'job_template_id' is set
|
|
286
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
|
287
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling JobTemplateLocalesApi.job_template_locales_create"
|
|
288
|
+
end
|
|
289
|
+
# verify the required parameter 'job_template_locales_create_parameters' is set
|
|
290
|
+
if @api_client.config.client_side_validation && job_template_locales_create_parameters.nil?
|
|
291
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locales_create_parameters' when calling JobTemplateLocalesApi.job_template_locales_create"
|
|
292
|
+
end
|
|
293
|
+
# resource path
|
|
294
|
+
local_var_path = '/projects/{project_id}/job_templates/{job_template_id}/locales'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s))
|
|
295
|
+
|
|
296
|
+
# query parameters
|
|
297
|
+
query_params = opts[:query_params] || {}
|
|
298
|
+
|
|
299
|
+
# header parameters
|
|
300
|
+
header_params = opts[:header_params] || {}
|
|
301
|
+
# HTTP header 'Accept' (if needed)
|
|
302
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
303
|
+
# HTTP header 'Content-Type'
|
|
304
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
305
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
306
|
+
|
|
307
|
+
# form parameters
|
|
308
|
+
form_params = opts[:form_params] || {}
|
|
309
|
+
|
|
310
|
+
# http body (model)
|
|
311
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_template_locales_create_parameters)
|
|
312
|
+
|
|
313
|
+
# return_type
|
|
314
|
+
return_type = opts[:return_type] || 'JobTemplateLocale'
|
|
315
|
+
|
|
316
|
+
# auth_names
|
|
317
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
318
|
+
|
|
319
|
+
new_options = opts.merge(
|
|
320
|
+
:header_params => header_params,
|
|
321
|
+
:query_params => query_params,
|
|
322
|
+
:form_params => form_params,
|
|
323
|
+
:body => post_body,
|
|
324
|
+
:auth_names => auth_names,
|
|
325
|
+
:return_type => return_type
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
329
|
+
if @api_client.config.debugging
|
|
330
|
+
@api_client.config.logger.debug "API called: JobTemplateLocalesApi#job_template_locales_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
331
|
+
end
|
|
332
|
+
response = ::Phrase::Response.new(data, headers)
|
|
333
|
+
return response, status_code, headers
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# List job template locales
|
|
337
|
+
# List all job template locales for a given job template.
|
|
338
|
+
# @param project_id [String] Project ID
|
|
339
|
+
# @param job_template_id [String] Job Template ID
|
|
340
|
+
# @param [Hash] opts the optional parameters
|
|
341
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
342
|
+
# @option opts [Integer] :page Page number
|
|
343
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
344
|
+
# @option opts [String] :branch specify the branch to use
|
|
345
|
+
# @return [Array<Object>]
|
|
346
|
+
def job_template_locales_list(project_id, job_template_id, opts = {})
|
|
347
|
+
data, _status_code, _headers = job_template_locales_list_with_http_info(project_id, job_template_id, opts)
|
|
348
|
+
data
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# List job template locales
|
|
352
|
+
# List all job template locales for a given job template.
|
|
353
|
+
# @param project_id [String] Project ID
|
|
354
|
+
# @param job_template_id [String] Job Template ID
|
|
355
|
+
# @param [Hash] opts the optional parameters
|
|
356
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
357
|
+
# @option opts [Integer] :page Page number
|
|
358
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
359
|
+
# @option opts [String] :branch specify the branch to use
|
|
360
|
+
# @return [Array<(Response<(Array<Object>)>, Integer, Hash)>] Response<(Array<Object>)> data, response status code and response headers
|
|
361
|
+
def job_template_locales_list_with_http_info(project_id, job_template_id, opts = {})
|
|
362
|
+
if @api_client.config.debugging
|
|
363
|
+
@api_client.config.logger.debug 'Calling API: JobTemplateLocalesApi.job_template_locales_list ...'
|
|
364
|
+
end
|
|
365
|
+
# verify the required parameter 'project_id' is set
|
|
366
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
367
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobTemplateLocalesApi.job_template_locales_list"
|
|
368
|
+
end
|
|
369
|
+
# verify the required parameter 'job_template_id' is set
|
|
370
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
|
371
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling JobTemplateLocalesApi.job_template_locales_list"
|
|
372
|
+
end
|
|
373
|
+
# resource path
|
|
374
|
+
local_var_path = '/projects/{project_id}/job_templates/{job_template_id}/locales'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s))
|
|
375
|
+
|
|
376
|
+
# query parameters
|
|
377
|
+
query_params = opts[:query_params] || {}
|
|
378
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
379
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
380
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
381
|
+
|
|
382
|
+
# header parameters
|
|
383
|
+
header_params = opts[:header_params] || {}
|
|
384
|
+
# HTTP header 'Accept' (if needed)
|
|
385
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
386
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
387
|
+
|
|
388
|
+
# form parameters
|
|
389
|
+
form_params = opts[:form_params] || {}
|
|
390
|
+
|
|
391
|
+
# http body (model)
|
|
392
|
+
post_body = opts[:body]
|
|
393
|
+
|
|
394
|
+
# return_type
|
|
395
|
+
return_type = opts[:return_type] || 'Array<Object>'
|
|
396
|
+
|
|
397
|
+
# auth_names
|
|
398
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
399
|
+
|
|
400
|
+
new_options = opts.merge(
|
|
401
|
+
:header_params => header_params,
|
|
402
|
+
:query_params => query_params,
|
|
403
|
+
:form_params => form_params,
|
|
404
|
+
:body => post_body,
|
|
405
|
+
:auth_names => auth_names,
|
|
406
|
+
:return_type => return_type
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
410
|
+
if @api_client.config.debugging
|
|
411
|
+
@api_client.config.logger.debug "API called: JobTemplateLocalesApi#job_template_locales_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
412
|
+
end
|
|
413
|
+
response = ::Phrase::Response.new(data, headers)
|
|
414
|
+
return response, status_code, headers
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
end
|