phrase 1.0.1 → 1.0.2
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 +50 -387
- data/docs/AccountsApi.md +2 -4
- data/docs/AuthorizationsApi.md +10 -14
- data/docs/BitbucketSyncApi.md +3 -6
- data/docs/BlacklistedKeysApi.md +10 -14
- data/docs/BranchesApi.md +12 -18
- data/docs/CommentsApi.md +13 -20
- data/docs/DistributionsApi.md +10 -14
- data/docs/FormatsApi.md +1 -2
- data/docs/GitLabSyncApi.md +7 -14
- data/docs/{GlossaryApi.md → GlossariesApi.md} +26 -30
- data/docs/GlossaryTermTranslationsApi.md +8 -10
- data/docs/GlossaryTermsApi.md +10 -14
- data/docs/InvitationsApi.md +11 -16
- data/docs/JobLocalesApi.md +12 -18
- data/docs/JobsApi.md +15 -24
- data/docs/KeysApi.md +18 -26
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/LocalesApi.md +13 -18
- data/docs/MembersApi.md +4 -8
- data/docs/OrdersApi.md +10 -14
- data/docs/ProjectCreateParameters.md +3 -1
- data/docs/ProjectsApi.md +10 -14
- data/docs/ReleasesApi.md +11 -16
- data/docs/ScreenshotMarkersApi.md +10 -14
- data/docs/ScreenshotsApi.md +10 -14
- data/docs/SpacesApi.md +13 -20
- data/docs/StyleGuidesApi.md +10 -14
- data/docs/TagsApi.md +9 -12
- data/docs/Team.md +29 -0
- data/docs/TeamCreateParameters.md +17 -0
- data/docs/TeamDetail.md +29 -0
- data/docs/TeamUpdateParameters.md +17 -0
- data/docs/TeamsApi.md +721 -0
- data/docs/TeamsProjectsCreateParameters.md +17 -0
- data/docs/TeamsSpacesCreateParameters.md +17 -0
- data/docs/TeamsUsersCreateParameters.md +17 -0
- data/docs/TranslationsApi.md +28 -44
- data/docs/TranslationsExcludeParameters.md +1 -1
- data/docs/TranslationsIncludeParameters.md +1 -1
- data/docs/TranslationsReviewParameters.md +1 -1
- data/docs/TranslationsSearchParameters.md +1 -1
- data/docs/TranslationsUnverifyParameters.md +1 -1
- data/docs/TranslationsVerifyParameters.md +1 -1
- data/docs/UploadCreateParameters.md +2 -2
- data/docs/UploadsApi.md +12 -10
- data/docs/UsersApi.md +1 -2
- data/docs/VersionsHistoryApi.md +2 -4
- data/docs/WebhooksApi.md +11 -16
- data/git_push.sh +2 -2
- data/lib/phrase.rb +9 -1
- data/lib/phrase/api/authorizations_api.rb +10 -8
- data/lib/phrase/api/bitbucket_sync_api.rb +3 -3
- data/lib/phrase/api/blacklisted_keys_api.rb +10 -8
- data/lib/phrase/api/branches_api.rb +16 -14
- data/lib/phrase/api/comments_api.rb +19 -17
- data/lib/phrase/api/distributions_api.rb +10 -8
- data/lib/phrase/api/git_lab_sync_api.rb +3 -3
- data/lib/phrase/api/{glossary_api.rb → glossaries_api.rb} +31 -29
- data/lib/phrase/api/glossary_term_translations_api.rb +10 -8
- data/lib/phrase/api/glossary_terms_api.rb +10 -8
- data/lib/phrase/api/invitations_api.rb +10 -8
- data/lib/phrase/api/job_locales_api.rb +10 -8
- data/lib/phrase/api/jobs_api.rb +13 -11
- data/lib/phrase/api/keys_api.rb +14 -12
- data/lib/phrase/api/locales_api.rb +15 -13
- data/lib/phrase/api/members_api.rb +3 -3
- data/lib/phrase/api/orders_api.rb +10 -8
- data/lib/phrase/api/projects_api.rb +10 -8
- data/lib/phrase/api/releases_api.rb +10 -8
- data/lib/phrase/api/screenshot_markers_api.rb +10 -8
- data/lib/phrase/api/screenshots_api.rb +10 -8
- data/lib/phrase/api/spaces_api.rb +16 -14
- data/lib/phrase/api/style_guides_api.rb +10 -8
- data/lib/phrase/api/tags_api.rb +10 -8
- data/lib/phrase/api/teams_api.rb +840 -0
- data/lib/phrase/api/translations_api.rb +13 -11
- data/lib/phrase/api/uploads_api.rb +13 -5
- data/lib/phrase/api/webhooks_api.rb +13 -11
- 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/project_create_parameters.rb +14 -4
- data/lib/phrase/models/team.rb +254 -0
- data/lib/phrase/models/team_create_parameters.rb +195 -0
- data/lib/phrase/models/team_detail.rb +254 -0
- data/lib/phrase/models/team_update_parameters.rb +195 -0
- data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
- data/lib/phrase/models/translations_exclude_parameters.rb +1 -1
- data/lib/phrase/models/translations_include_parameters.rb +1 -1
- data/lib/phrase/models/translations_review_parameters.rb +1 -1
- data/lib/phrase/models/translations_search_parameters.rb +1 -1
- data/lib/phrase/models/translations_unverify_parameters.rb +1 -1
- data/lib/phrase/models/translations_verify_parameters.rb +1 -1
- data/lib/phrase/models/upload_create_parameters.rb +4 -8
- data/lib/phrase/version.rb +1 -1
- data/spec/api/authorizations_api_spec.rb +1 -1
- data/spec/api/blacklisted_keys_api_spec.rb +1 -1
- data/spec/api/branches_api_spec.rb +1 -1
- data/spec/api/comments_api_spec.rb +1 -1
- data/spec/api/distributions_api_spec.rb +1 -1
- data/spec/api/{glossary_api_spec.rb → glossaries_api_spec.rb} +7 -7
- data/spec/api/glossary_term_translations_api_spec.rb +1 -1
- data/spec/api/glossary_terms_api_spec.rb +1 -1
- data/spec/api/invitations_api_spec.rb +1 -1
- data/spec/api/job_locales_api_spec.rb +1 -1
- data/spec/api/jobs_api_spec.rb +1 -1
- data/spec/api/keys_api_spec.rb +3 -3
- data/spec/api/locales_api_spec.rb +2 -2
- data/spec/api/orders_api_spec.rb +1 -1
- data/spec/api/projects_api_spec.rb +1 -1
- data/spec/api/releases_api_spec.rb +1 -1
- data/spec/api/screenshot_markers_api_spec.rb +1 -1
- data/spec/api/screenshots_api_spec.rb +1 -1
- data/spec/api/spaces_api_spec.rb +1 -1
- data/spec/api/style_guides_api_spec.rb +1 -1
- data/spec/api/tags_api_spec.rb +1 -1
- data/spec/api/teams_api_spec.rb +185 -0
- data/spec/api/translations_api_spec.rb +4 -4
- data/spec/api/uploads_api_spec.rb +3 -1
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/project_create_parameters_spec.rb +6 -0
- data/spec/models/team_create_parameters_spec.rb +29 -0
- data/spec/models/team_detail_spec.rb +65 -0
- data/spec/models/team_spec.rb +65 -0
- data/spec/models/team_update_parameters_spec.rb +29 -0
- data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
- data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
- data/spec/models/teams_users_create_parameters_spec.rb +29 -0
- metadata +183 -151
|
@@ -13,10 +13,10 @@ module Phrase
|
|
|
13
13
|
# @param distribution_create_parameters [DistributionCreateParameters]
|
|
14
14
|
# @param [Hash] opts the optional parameters
|
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
-
# @return [
|
|
16
|
+
# @return [Distribution]
|
|
17
17
|
def distribution_create(account_id, distribution_create_parameters, opts = {})
|
|
18
|
-
distribution_create_with_http_info(account_id, distribution_create_parameters, opts)
|
|
19
|
-
|
|
18
|
+
data, _status_code, _headers = distribution_create_with_http_info(account_id, distribution_create_parameters, opts)
|
|
19
|
+
data
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Create a distribution
|
|
@@ -25,7 +25,7 @@ module Phrase
|
|
|
25
25
|
# @param distribution_create_parameters [DistributionCreateParameters]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
-
# @return [Array<(Response<(
|
|
28
|
+
# @return [Array<(Response<(Distribution)>, Integer, Hash)>] Response<(Distribution)> data, response status code and response headers
|
|
29
29
|
def distribution_create_with_http_info(account_id, distribution_create_parameters, opts = {})
|
|
30
30
|
if @api_client.config.debugging
|
|
31
31
|
@api_client.config.logger.debug 'Calling API: DistributionsApi.distribution_create ...'
|
|
@@ -46,6 +46,8 @@ module Phrase
|
|
|
46
46
|
|
|
47
47
|
# header parameters
|
|
48
48
|
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
51
|
# HTTP header 'Content-Type'
|
|
50
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
51
53
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -57,7 +59,7 @@ module Phrase
|
|
|
57
59
|
post_body = opts[:body] || @api_client.object_to_http_body(distribution_create_parameters)
|
|
58
60
|
|
|
59
61
|
# return_type
|
|
60
|
-
return_type = opts[:return_type]
|
|
62
|
+
return_type = opts[:return_type] || 'Distribution'
|
|
61
63
|
|
|
62
64
|
# auth_names
|
|
63
65
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -87,8 +89,8 @@ module Phrase
|
|
|
87
89
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
88
90
|
# @return [nil]
|
|
89
91
|
def distribution_delete(account_id, id, opts = {})
|
|
90
|
-
distribution_delete_with_http_info(account_id, id, opts)
|
|
91
|
-
|
|
92
|
+
data, _status_code, _headers = distribution_delete_with_http_info(account_id, id, opts)
|
|
93
|
+
data
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
# Delete a distribution
|
|
@@ -97,7 +99,7 @@ module Phrase
|
|
|
97
99
|
# @param id [String] ID
|
|
98
100
|
# @param [Hash] opts the optional parameters
|
|
99
101
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
100
|
-
# @return [Array<(Response
|
|
102
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
101
103
|
def distribution_delete_with_http_info(account_id, id, opts = {})
|
|
102
104
|
if @api_client.config.debugging
|
|
103
105
|
@api_client.config.logger.debug 'Calling API: DistributionsApi.distribution_delete ...'
|
|
@@ -15,8 +15,8 @@ module Phrase
|
|
|
15
15
|
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
16
16
|
# @return [nil]
|
|
17
17
|
def gitlab_sync_delete(id, opts = {})
|
|
18
|
-
gitlab_sync_delete_with_http_info(id, opts)
|
|
19
|
-
|
|
18
|
+
data, _status_code, _headers = gitlab_sync_delete_with_http_info(id, opts)
|
|
19
|
+
data
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Delete single Sync Setting
|
|
@@ -25,7 +25,7 @@ module Phrase
|
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
27
27
|
# @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
|
|
28
|
-
# @return [Array<(Response
|
|
28
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
29
29
|
def gitlab_sync_delete_with_http_info(id, opts = {})
|
|
30
30
|
if @api_client.config.debugging
|
|
31
31
|
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_delete ...'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'cgi'
|
|
2
2
|
|
|
3
3
|
module Phrase
|
|
4
|
-
class
|
|
4
|
+
class GlossariesApi
|
|
5
5
|
attr_accessor :api_client
|
|
6
6
|
|
|
7
7
|
def initialize(api_client = ApiClient.default)
|
|
@@ -30,11 +30,11 @@ module Phrase
|
|
|
30
30
|
# @return [Array<(Response<(Array<Glossary>)>, Integer, Hash)>] Response<(Array<Glossary>)> data, response status code and response headers
|
|
31
31
|
def glossaries_list_with_http_info(account_id, opts = {})
|
|
32
32
|
if @api_client.config.debugging
|
|
33
|
-
@api_client.config.logger.debug 'Calling API:
|
|
33
|
+
@api_client.config.logger.debug 'Calling API: GlossariesApi.glossaries_list ...'
|
|
34
34
|
end
|
|
35
35
|
# verify the required parameter 'account_id' is set
|
|
36
36
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
37
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling
|
|
37
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossaries_list"
|
|
38
38
|
end
|
|
39
39
|
# resource path
|
|
40
40
|
local_var_path = '/accounts/{account_id}/glossaries'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
|
|
@@ -73,7 +73,7 @@ module Phrase
|
|
|
73
73
|
|
|
74
74
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
75
75
|
if @api_client.config.debugging
|
|
76
|
-
@api_client.config.logger.debug "API called:
|
|
76
|
+
@api_client.config.logger.debug "API called: GlossariesApi#glossaries_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
77
77
|
end
|
|
78
78
|
response = ::Phrase::Response.new(data, headers)
|
|
79
79
|
return response, status_code, headers
|
|
@@ -85,10 +85,10 @@ module Phrase
|
|
|
85
85
|
# @param glossary_create_parameters [GlossaryCreateParameters]
|
|
86
86
|
# @param [Hash] opts the optional parameters
|
|
87
87
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
88
|
-
# @return [
|
|
88
|
+
# @return [Glossary]
|
|
89
89
|
def glossary_create(account_id, glossary_create_parameters, opts = {})
|
|
90
|
-
glossary_create_with_http_info(account_id, glossary_create_parameters, opts)
|
|
91
|
-
|
|
90
|
+
data, _status_code, _headers = glossary_create_with_http_info(account_id, glossary_create_parameters, opts)
|
|
91
|
+
data
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
# Create a glossary
|
|
@@ -97,18 +97,18 @@ module Phrase
|
|
|
97
97
|
# @param glossary_create_parameters [GlossaryCreateParameters]
|
|
98
98
|
# @param [Hash] opts the optional parameters
|
|
99
99
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
100
|
-
# @return [Array<(Response<(
|
|
100
|
+
# @return [Array<(Response<(Glossary)>, Integer, Hash)>] Response<(Glossary)> data, response status code and response headers
|
|
101
101
|
def glossary_create_with_http_info(account_id, glossary_create_parameters, opts = {})
|
|
102
102
|
if @api_client.config.debugging
|
|
103
|
-
@api_client.config.logger.debug 'Calling API:
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_create ...'
|
|
104
104
|
end
|
|
105
105
|
# verify the required parameter 'account_id' is set
|
|
106
106
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
107
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_create"
|
|
108
108
|
end
|
|
109
109
|
# verify the required parameter 'glossary_create_parameters' is set
|
|
110
110
|
if @api_client.config.client_side_validation && glossary_create_parameters.nil?
|
|
111
|
-
fail ArgumentError, "Missing the required parameter 'glossary_create_parameters' when calling
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'glossary_create_parameters' when calling GlossariesApi.glossary_create"
|
|
112
112
|
end
|
|
113
113
|
# resource path
|
|
114
114
|
local_var_path = '/accounts/{account_id}/glossaries'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
|
|
@@ -118,6 +118,8 @@ module Phrase
|
|
|
118
118
|
|
|
119
119
|
# header parameters
|
|
120
120
|
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
121
123
|
# HTTP header 'Content-Type'
|
|
122
124
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
123
125
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -129,7 +131,7 @@ module Phrase
|
|
|
129
131
|
post_body = opts[:body] || @api_client.object_to_http_body(glossary_create_parameters)
|
|
130
132
|
|
|
131
133
|
# return_type
|
|
132
|
-
return_type = opts[:return_type]
|
|
134
|
+
return_type = opts[:return_type] || 'Glossary'
|
|
133
135
|
|
|
134
136
|
# auth_names
|
|
135
137
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -145,7 +147,7 @@ module Phrase
|
|
|
145
147
|
|
|
146
148
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
147
149
|
if @api_client.config.debugging
|
|
148
|
-
@api_client.config.logger.debug "API called:
|
|
150
|
+
@api_client.config.logger.debug "API called: GlossariesApi#glossary_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
151
|
end
|
|
150
152
|
response = ::Phrase::Response.new(data, headers)
|
|
151
153
|
return response, status_code, headers
|
|
@@ -159,8 +161,8 @@ module Phrase
|
|
|
159
161
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
160
162
|
# @return [nil]
|
|
161
163
|
def glossary_delete(account_id, id, opts = {})
|
|
162
|
-
glossary_delete_with_http_info(account_id, id, opts)
|
|
163
|
-
|
|
164
|
+
data, _status_code, _headers = glossary_delete_with_http_info(account_id, id, opts)
|
|
165
|
+
data
|
|
164
166
|
end
|
|
165
167
|
|
|
166
168
|
# Delete a glossary
|
|
@@ -169,18 +171,18 @@ module Phrase
|
|
|
169
171
|
# @param id [String] ID
|
|
170
172
|
# @param [Hash] opts the optional parameters
|
|
171
173
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
172
|
-
# @return [Array<(Response
|
|
174
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
173
175
|
def glossary_delete_with_http_info(account_id, id, opts = {})
|
|
174
176
|
if @api_client.config.debugging
|
|
175
|
-
@api_client.config.logger.debug 'Calling API:
|
|
177
|
+
@api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_delete ...'
|
|
176
178
|
end
|
|
177
179
|
# verify the required parameter 'account_id' is set
|
|
178
180
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
179
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling
|
|
181
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_delete"
|
|
180
182
|
end
|
|
181
183
|
# verify the required parameter 'id' is set
|
|
182
184
|
if @api_client.config.client_side_validation && id.nil?
|
|
183
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling GlossariesApi.glossary_delete"
|
|
184
186
|
end
|
|
185
187
|
# resource path
|
|
186
188
|
local_var_path = '/accounts/{account_id}/glossaries/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
@@ -215,7 +217,7 @@ module Phrase
|
|
|
215
217
|
|
|
216
218
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
217
219
|
if @api_client.config.debugging
|
|
218
|
-
@api_client.config.logger.debug "API called:
|
|
220
|
+
@api_client.config.logger.debug "API called: GlossariesApi#glossary_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
221
|
end
|
|
220
222
|
response = ::Phrase::Response.new(data, headers)
|
|
221
223
|
return response, status_code, headers
|
|
@@ -242,15 +244,15 @@ module Phrase
|
|
|
242
244
|
# @return [Array<(Response<(Glossary)>, Integer, Hash)>] Response<(Glossary)> data, response status code and response headers
|
|
243
245
|
def glossary_show_with_http_info(account_id, id, opts = {})
|
|
244
246
|
if @api_client.config.debugging
|
|
245
|
-
@api_client.config.logger.debug 'Calling API:
|
|
247
|
+
@api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_show ...'
|
|
246
248
|
end
|
|
247
249
|
# verify the required parameter 'account_id' is set
|
|
248
250
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
249
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling
|
|
251
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_show"
|
|
250
252
|
end
|
|
251
253
|
# verify the required parameter 'id' is set
|
|
252
254
|
if @api_client.config.client_side_validation && id.nil?
|
|
253
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
255
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling GlossariesApi.glossary_show"
|
|
254
256
|
end
|
|
255
257
|
# resource path
|
|
256
258
|
local_var_path = '/accounts/{account_id}/glossaries/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
@@ -287,7 +289,7 @@ module Phrase
|
|
|
287
289
|
|
|
288
290
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
289
291
|
if @api_client.config.debugging
|
|
290
|
-
@api_client.config.logger.debug "API called:
|
|
292
|
+
@api_client.config.logger.debug "API called: GlossariesApi#glossary_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
291
293
|
end
|
|
292
294
|
response = ::Phrase::Response.new(data, headers)
|
|
293
295
|
return response, status_code, headers
|
|
@@ -316,19 +318,19 @@ module Phrase
|
|
|
316
318
|
# @return [Array<(Response<(Glossary)>, Integer, Hash)>] Response<(Glossary)> data, response status code and response headers
|
|
317
319
|
def glossary_update_with_http_info(account_id, id, glossary_update_parameters, opts = {})
|
|
318
320
|
if @api_client.config.debugging
|
|
319
|
-
@api_client.config.logger.debug 'Calling API:
|
|
321
|
+
@api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_update ...'
|
|
320
322
|
end
|
|
321
323
|
# verify the required parameter 'account_id' is set
|
|
322
324
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
323
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling
|
|
325
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_update"
|
|
324
326
|
end
|
|
325
327
|
# verify the required parameter 'id' is set
|
|
326
328
|
if @api_client.config.client_side_validation && id.nil?
|
|
327
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
329
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling GlossariesApi.glossary_update"
|
|
328
330
|
end
|
|
329
331
|
# verify the required parameter 'glossary_update_parameters' is set
|
|
330
332
|
if @api_client.config.client_side_validation && glossary_update_parameters.nil?
|
|
331
|
-
fail ArgumentError, "Missing the required parameter 'glossary_update_parameters' when calling
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'glossary_update_parameters' when calling GlossariesApi.glossary_update"
|
|
332
334
|
end
|
|
333
335
|
# resource path
|
|
334
336
|
local_var_path = '/accounts/{account_id}/glossaries/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
@@ -367,7 +369,7 @@ module Phrase
|
|
|
367
369
|
|
|
368
370
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
369
371
|
if @api_client.config.debugging
|
|
370
|
-
@api_client.config.logger.debug "API called:
|
|
372
|
+
@api_client.config.logger.debug "API called: GlossariesApi#glossary_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
371
373
|
end
|
|
372
374
|
response = ::Phrase::Response.new(data, headers)
|
|
373
375
|
return response, status_code, headers
|
|
@@ -15,10 +15,10 @@ module Phrase
|
|
|
15
15
|
# @param glossary_term_translation_create_parameters [GlossaryTermTranslationCreateParameters]
|
|
16
16
|
# @param [Hash] opts the optional parameters
|
|
17
17
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
18
|
-
# @return [
|
|
18
|
+
# @return [GlossaryTermTranslation]
|
|
19
19
|
def glossary_term_translation_create(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts = {})
|
|
20
|
-
glossary_term_translation_create_with_http_info(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts)
|
|
21
|
-
|
|
20
|
+
data, _status_code, _headers = glossary_term_translation_create_with_http_info(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts)
|
|
21
|
+
data
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
# Create a glossary term translation
|
|
@@ -29,7 +29,7 @@ module Phrase
|
|
|
29
29
|
# @param glossary_term_translation_create_parameters [GlossaryTermTranslationCreateParameters]
|
|
30
30
|
# @param [Hash] opts the optional parameters
|
|
31
31
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
32
|
-
# @return [Array<(Response<(
|
|
32
|
+
# @return [Array<(Response<(GlossaryTermTranslation)>, Integer, Hash)>] Response<(GlossaryTermTranslation)> data, response status code and response headers
|
|
33
33
|
def glossary_term_translation_create_with_http_info(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts = {})
|
|
34
34
|
if @api_client.config.debugging
|
|
35
35
|
@api_client.config.logger.debug 'Calling API: GlossaryTermTranslationsApi.glossary_term_translation_create ...'
|
|
@@ -58,6 +58,8 @@ module Phrase
|
|
|
58
58
|
|
|
59
59
|
# header parameters
|
|
60
60
|
header_params = opts[:header_params] || {}
|
|
61
|
+
# HTTP header 'Accept' (if needed)
|
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
61
63
|
# HTTP header 'Content-Type'
|
|
62
64
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
63
65
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -69,7 +71,7 @@ module Phrase
|
|
|
69
71
|
post_body = opts[:body] || @api_client.object_to_http_body(glossary_term_translation_create_parameters)
|
|
70
72
|
|
|
71
73
|
# return_type
|
|
72
|
-
return_type = opts[:return_type]
|
|
74
|
+
return_type = opts[:return_type] || 'GlossaryTermTranslation'
|
|
73
75
|
|
|
74
76
|
# auth_names
|
|
75
77
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -101,8 +103,8 @@ module Phrase
|
|
|
101
103
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
102
104
|
# @return [nil]
|
|
103
105
|
def glossary_term_translation_delete(account_id, glossary_id, term_id, id, opts = {})
|
|
104
|
-
glossary_term_translation_delete_with_http_info(account_id, glossary_id, term_id, id, opts)
|
|
105
|
-
|
|
106
|
+
data, _status_code, _headers = glossary_term_translation_delete_with_http_info(account_id, glossary_id, term_id, id, opts)
|
|
107
|
+
data
|
|
106
108
|
end
|
|
107
109
|
|
|
108
110
|
# Delete a glossary term translation
|
|
@@ -113,7 +115,7 @@ module Phrase
|
|
|
113
115
|
# @param id [String] ID
|
|
114
116
|
# @param [Hash] opts the optional parameters
|
|
115
117
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
116
|
-
# @return [Array<(Response
|
|
118
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
117
119
|
def glossary_term_translation_delete_with_http_info(account_id, glossary_id, term_id, id, opts = {})
|
|
118
120
|
if @api_client.config.debugging
|
|
119
121
|
@api_client.config.logger.debug 'Calling API: GlossaryTermTranslationsApi.glossary_term_translation_delete ...'
|
|
@@ -14,10 +14,10 @@ module Phrase
|
|
|
14
14
|
# @param glossary_term_create_parameters [GlossaryTermCreateParameters]
|
|
15
15
|
# @param [Hash] opts the optional parameters
|
|
16
16
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [GlossaryTerm]
|
|
18
18
|
def glossary_term_create(account_id, glossary_id, glossary_term_create_parameters, opts = {})
|
|
19
|
-
glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts)
|
|
20
|
-
|
|
19
|
+
data, _status_code, _headers = glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts)
|
|
20
|
+
data
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Create a glossary term
|
|
@@ -27,7 +27,7 @@ module Phrase
|
|
|
27
27
|
# @param glossary_term_create_parameters [GlossaryTermCreateParameters]
|
|
28
28
|
# @param [Hash] opts the optional parameters
|
|
29
29
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
30
|
-
# @return [Array<(Response<(
|
|
30
|
+
# @return [Array<(Response<(GlossaryTerm)>, Integer, Hash)>] Response<(GlossaryTerm)> data, response status code and response headers
|
|
31
31
|
def glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts = {})
|
|
32
32
|
if @api_client.config.debugging
|
|
33
33
|
@api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_create ...'
|
|
@@ -52,6 +52,8 @@ module Phrase
|
|
|
52
52
|
|
|
53
53
|
# header parameters
|
|
54
54
|
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
55
57
|
# HTTP header 'Content-Type'
|
|
56
58
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
57
59
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -63,7 +65,7 @@ module Phrase
|
|
|
63
65
|
post_body = opts[:body] || @api_client.object_to_http_body(glossary_term_create_parameters)
|
|
64
66
|
|
|
65
67
|
# return_type
|
|
66
|
-
return_type = opts[:return_type]
|
|
68
|
+
return_type = opts[:return_type] || 'GlossaryTerm'
|
|
67
69
|
|
|
68
70
|
# auth_names
|
|
69
71
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -94,8 +96,8 @@ module Phrase
|
|
|
94
96
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
95
97
|
# @return [nil]
|
|
96
98
|
def glossary_term_delete(account_id, glossary_id, id, opts = {})
|
|
97
|
-
glossary_term_delete_with_http_info(account_id, glossary_id, id, opts)
|
|
98
|
-
|
|
99
|
+
data, _status_code, _headers = glossary_term_delete_with_http_info(account_id, glossary_id, id, opts)
|
|
100
|
+
data
|
|
99
101
|
end
|
|
100
102
|
|
|
101
103
|
# Delete a glossary term
|
|
@@ -105,7 +107,7 @@ module Phrase
|
|
|
105
107
|
# @param id [String] ID
|
|
106
108
|
# @param [Hash] opts the optional parameters
|
|
107
109
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
108
|
-
# @return [Array<(Response
|
|
110
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
109
111
|
def glossary_term_delete_with_http_info(account_id, glossary_id, id, opts = {})
|
|
110
112
|
if @api_client.config.debugging
|
|
111
113
|
@api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_delete ...'
|
|
@@ -13,10 +13,10 @@ module Phrase
|
|
|
13
13
|
# @param invitation_create_parameters [InvitationCreateParameters]
|
|
14
14
|
# @param [Hash] opts the optional parameters
|
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
-
# @return [
|
|
16
|
+
# @return [Invitation]
|
|
17
17
|
def invitation_create(account_id, invitation_create_parameters, opts = {})
|
|
18
|
-
invitation_create_with_http_info(account_id, invitation_create_parameters, opts)
|
|
19
|
-
|
|
18
|
+
data, _status_code, _headers = invitation_create_with_http_info(account_id, invitation_create_parameters, opts)
|
|
19
|
+
data
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Create a new invitation
|
|
@@ -25,7 +25,7 @@ module Phrase
|
|
|
25
25
|
# @param invitation_create_parameters [InvitationCreateParameters]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
-
# @return [Array<(Response<(
|
|
28
|
+
# @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
|
|
29
29
|
def invitation_create_with_http_info(account_id, invitation_create_parameters, opts = {})
|
|
30
30
|
if @api_client.config.debugging
|
|
31
31
|
@api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_create ...'
|
|
@@ -46,6 +46,8 @@ module Phrase
|
|
|
46
46
|
|
|
47
47
|
# header parameters
|
|
48
48
|
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
51
|
# HTTP header 'Content-Type'
|
|
50
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
51
53
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -57,7 +59,7 @@ module Phrase
|
|
|
57
59
|
post_body = opts[:body] || @api_client.object_to_http_body(invitation_create_parameters)
|
|
58
60
|
|
|
59
61
|
# return_type
|
|
60
|
-
return_type = opts[:return_type]
|
|
62
|
+
return_type = opts[:return_type] || 'Invitation'
|
|
61
63
|
|
|
62
64
|
# auth_names
|
|
63
65
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -87,8 +89,8 @@ module Phrase
|
|
|
87
89
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
88
90
|
# @return [nil]
|
|
89
91
|
def invitation_delete(account_id, id, opts = {})
|
|
90
|
-
invitation_delete_with_http_info(account_id, id, opts)
|
|
91
|
-
|
|
92
|
+
data, _status_code, _headers = invitation_delete_with_http_info(account_id, id, opts)
|
|
93
|
+
data
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
# Delete an invitation
|
|
@@ -97,7 +99,7 @@ module Phrase
|
|
|
97
99
|
# @param id [String] ID
|
|
98
100
|
# @param [Hash] opts the optional parameters
|
|
99
101
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
100
|
-
# @return [Array<(Response
|
|
102
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
101
103
|
def invitation_delete_with_http_info(account_id, id, opts = {})
|
|
102
104
|
if @api_client.config.debugging
|
|
103
105
|
@api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_delete ...'
|