phrase 2.0.0 → 2.3.1
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 +41 -3
- 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/JobCreateParameters.md +2 -0
- data/docs/JobDetails.md +2 -0
- data/docs/JobDetails1.md +2 -0
- 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 +132 -4
- 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 -3
- 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/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/TranslationsVerifyParameters.md +3 -5
- data/docs/User.md +0 -2
- 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 +152 -4
- data/lib/phrase/api/locales_api.rb +80 -2
- 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/search_api.rb +84 -0
- 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/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_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/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/translations_verify_parameters.rb +14 -24
- data/lib/phrase/models/user.rb +1 -10
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +23 -0
- 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 +30 -2
- data/spec/api/locales_api_spec.rb +18 -1
- 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/search_api_spec.rb +37 -0
- 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/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_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/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/translations_verify_parameters_spec.rb +2 -8
- data/spec/models/user_spec.rb +0 -6
- metadata +262 -170
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,
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**branch** | **String** | specify the branch to use | [optional]
|
|
8
|
+
**locale_id** | **String** | specify the locale of the translations to be verified | [optional]
|
|
8
9
|
**q** | **String** | Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>. | [optional]
|
|
9
|
-
**sort** | **String** | Sort criteria. Can be one of: key_name, created_at, updated_at. | [optional]
|
|
10
|
-
**order** | **String** | Order direction. Can be one of: asc, desc. | [optional]
|
|
11
10
|
|
|
12
11
|
## Code Sample
|
|
13
12
|
|
|
@@ -15,9 +14,8 @@ Name | Type | Description | Notes
|
|
|
15
14
|
require 'Phrase'
|
|
16
15
|
|
|
17
16
|
instance = Phrase::TranslationsVerifyParameters.new(branch: my-feature-branch,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
order: desc)
|
|
17
|
+
locale_id: fc2f11dd6a658fa9652f6f0a9ebee688,
|
|
18
|
+
q: PhraseApp*%20unverified:true%20tags:feature,center)
|
|
21
19
|
```
|
|
22
20
|
|
|
23
21
|
|
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)
|
|
@@ -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
|