phrase 3.7.1 → 4.4.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/CHANGELOG.md +63 -0
- data/README.md +13 -37
- data/docs/AccountDetails.md +3 -1
- data/docs/JobDetails.md +2 -0
- data/docs/JobKeysDeleteParameters.md +19 -0
- data/docs/JobsApi.md +16 -14
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/KeysApi.md +4 -4
- data/docs/KeysExcludeParameters.md +1 -1
- data/docs/KeysIncludeParameters.md +1 -1
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/LocalesApi.md +3 -1
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +4 -2
- data/docs/QualityPerformanceScoreApi.md +8 -8
- data/docs/QualityPerformanceScoreList200Response.md +21 -0
- data/docs/QualityPerformanceScoreList200ResponseAnyOf.md +19 -0
- data/docs/QualityPerformanceScoreList200ResponseAnyOfData.md +17 -0
- data/docs/{ProjectsQualityPerformanceScore200ResponseAnyOfDataTranslationsInner.md → QualityPerformanceScoreList200ResponseAnyOfDataTranslationsInner.md} +2 -2
- data/docs/{ProjectsQualityPerformanceScore200ResponseAnyOfErrorsInner.md → QualityPerformanceScoreList200ResponseAnyOfErrorsInner.md} +2 -2
- data/docs/{ProjectsQualityPerformanceScoreRequest.md → QualityPerformanceScoreListRequest.md} +2 -2
- data/docs/RepoSyncEvent.md +3 -3
- data/docs/RepoSyncEventsApi.md +138 -0
- data/docs/RepoSyncsApi.md +2 -132
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/Upload.md +3 -1
- data/lib/phrase/api/jobs_api.rb +24 -16
- data/lib/phrase/api/keys_api.rb +4 -4
- data/lib/phrase/api/locales_api.rb +3 -0
- data/lib/phrase/api/quality_performance_score_api.rb +15 -15
- data/lib/phrase/api/repo_sync_events_api.rb +160 -0
- data/lib/phrase/api/repo_syncs_api.rb +4 -154
- data/lib/phrase/models/account_details.rb +15 -4
- data/lib/phrase/models/job_details.rb +10 -1
- data/lib/phrase/models/job_keys_delete_parameters.rb +214 -0
- data/lib/phrase/models/keys_exclude_parameters.rb +1 -1
- data/lib/phrase/models/keys_include_parameters.rb +1 -1
- 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_update_parameters.rb +48 -4
- data/lib/phrase/models/{projects_quality_performance_score200_response.rb → quality_performance_score_list200_response.rb} +6 -6
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of.rb → quality_performance_score_list200_response_any_of.rb} +5 -5
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of_data.rb → quality_performance_score_list200_response_any_of_data.rb} +4 -4
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of_data_translations_inner.rb → quality_performance_score_list200_response_any_of_data_translations_inner.rb} +3 -3
- data/lib/phrase/models/{projects_quality_performance_score200_response_any_of_errors_inner.rb → quality_performance_score_list200_response_any_of_errors_inner.rb} +3 -3
- data/lib/phrase/models/{projects_quality_performance_score_request.rb → quality_performance_score_list_request.rb} +3 -3
- data/lib/phrase/models/repo_sync_event.rb +15 -15
- data/lib/phrase/models/upload.rb +14 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +8 -22
- data/spec/api/jobs_api_spec.rb +6 -5
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/quality_performance_score_api_spec.rb +4 -4
- data/spec/api/repo_sync_events_api_spec.rb +52 -0
- data/spec/api/repo_syncs_api_spec.rb +2 -31
- data/spec/models/account_details_spec.rb +6 -0
- data/spec/models/job_details_spec.rb +6 -0
- data/spec/models/{gitlab_sync_export_spec.rb → job_keys_delete_parameters_spec.rb} +8 -8
- data/spec/models/project_update_parameters_spec.rb +10 -0
- data/spec/models/quality_performance_score_list200_response_any_of_data_spec.rb +29 -0
- data/spec/models/{projects_quality_performance_score200_response_any_of_data_translations_inner_spec.rb → quality_performance_score_list200_response_any_of_data_translations_inner_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score200_response_any_of_errors_inner_spec.rb → quality_performance_score_list200_response_any_of_errors_inner_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score200_response_any_of_spec.rb → quality_performance_score_list200_response_any_of_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score200_response_spec.rb → quality_performance_score_list200_response_spec.rb} +6 -6
- data/spec/models/{projects_quality_performance_score_request_spec.rb → quality_performance_score_list_request_spec.rb} +6 -6
- data/spec/models/repo_sync_event_spec.rb +2 -2
- data/spec/models/upload_spec.rb +6 -0
- metadata +259 -315
- data/docs/BitbucketSync.md +0 -27
- data/docs/BitbucketSyncApi.md +0 -197
- data/docs/BitbucketSyncExportParameters.md +0 -17
- data/docs/BitbucketSyncExportResponse.md +0 -17
- data/docs/BitbucketSyncImportParameters.md +0 -17
- data/docs/GitHubSyncApi.md +0 -130
- data/docs/GitLabSyncApi.md +0 -463
- data/docs/GithubSyncExportParameters.md +0 -17
- data/docs/GithubSyncImportParameters.md +0 -17
- data/docs/GitlabSync.md +0 -37
- data/docs/GitlabSyncExport.md +0 -19
- data/docs/GitlabSyncExportParameters.md +0 -17
- data/docs/GitlabSyncHistory.md +0 -25
- data/docs/GitlabSyncHistoryErrorsInner.md +0 -19
- data/docs/GitlabSyncImportParameters.md +0 -17
- data/docs/ProjectsQualityPerformanceScore200Response.md +0 -21
- data/docs/ProjectsQualityPerformanceScore200ResponseAnyOf.md +0 -19
- data/docs/ProjectsQualityPerformanceScore200ResponseAnyOfData.md +0 -17
- data/docs/RepoSyncEventErrorsInner.md +0 -16
- data/lib/phrase/api/bitbucket_sync_api.rb +0 -219
- data/lib/phrase/api/git_hub_sync_api.rb +0 -146
- data/lib/phrase/api/git_lab_sync_api.rb +0 -510
- data/lib/phrase/models/bitbucket_sync.rb +0 -243
- data/lib/phrase/models/bitbucket_sync_export_parameters.rb +0 -197
- data/lib/phrase/models/bitbucket_sync_export_response.rb +0 -196
- data/lib/phrase/models/bitbucket_sync_import_parameters.rb +0 -197
- data/lib/phrase/models/github_sync_export_parameters.rb +0 -197
- data/lib/phrase/models/github_sync_import_parameters.rb +0 -197
- data/lib/phrase/models/gitlab_sync.rb +0 -286
- data/lib/phrase/models/gitlab_sync_export.rb +0 -205
- data/lib/phrase/models/gitlab_sync_export_parameters.rb +0 -197
- data/lib/phrase/models/gitlab_sync_history.rb +0 -234
- data/lib/phrase/models/gitlab_sync_history_errors_inner.rb +0 -205
- data/lib/phrase/models/gitlab_sync_import_parameters.rb +0 -197
- data/lib/phrase/models/repo_sync_event_errors_inner.rb +0 -207
- data/spec/api/bitbucket_sync_api_spec.rb +0 -64
- data/spec/api/git_hub_sync_api_spec.rb +0 -49
- data/spec/api/git_lab_sync_api_spec.rb +0 -125
- data/spec/models/bitbucket_sync_export_parameters_spec.rb +0 -29
- data/spec/models/bitbucket_sync_export_response_spec.rb +0 -29
- data/spec/models/bitbucket_sync_import_parameters_spec.rb +0 -29
- data/spec/models/bitbucket_sync_spec.rb +0 -59
- data/spec/models/github_sync_export_parameters_spec.rb +0 -29
- data/spec/models/github_sync_import_parameters_spec.rb +0 -29
- data/spec/models/gitlab_sync_export_parameters_spec.rb +0 -29
- data/spec/models/gitlab_sync_history_errors_inner_spec.rb +0 -35
- data/spec/models/gitlab_sync_history_spec.rb +0 -53
- data/spec/models/gitlab_sync_import_parameters_spec.rb +0 -29
- data/spec/models/gitlab_sync_spec.rb +0 -89
- data/spec/models/projects_quality_performance_score200_response_any_of_data_spec.rb +0 -29
- data/spec/models/repo_sync_event_errors_inner_spec.rb +0 -23
@@ -1,510 +0,0 @@
|
|
1
|
-
require 'cgi'
|
2
|
-
|
3
|
-
module Phrase
|
4
|
-
class GitLabSyncApi
|
5
|
-
attr_accessor :api_client
|
6
|
-
|
7
|
-
def initialize(api_client = ApiClient.default)
|
8
|
-
@api_client = api_client
|
9
|
-
end
|
10
|
-
# Delete single Sync Setting
|
11
|
-
# Deletes a single GitLab Sync Setting.
|
12
|
-
# @param id [String] ID
|
13
|
-
# @param [Hash] opts the optional parameters
|
14
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
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
|
-
# @return [nil]
|
17
|
-
def gitlab_sync_delete(id, opts = {})
|
18
|
-
data, _status_code, _headers = gitlab_sync_delete_with_http_info(id, opts)
|
19
|
-
data
|
20
|
-
end
|
21
|
-
|
22
|
-
# Delete single Sync Setting
|
23
|
-
# Deletes a single GitLab Sync Setting.
|
24
|
-
# @param id [String] ID
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
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, Integer, Hash)>] Response<(nil, response status code and response headers
|
29
|
-
def gitlab_sync_delete_with_http_info(id, opts = {})
|
30
|
-
if @api_client.config.debugging
|
31
|
-
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_delete ...'
|
32
|
-
end
|
33
|
-
# verify the required parameter 'id' is set
|
34
|
-
if @api_client.config.client_side_validation && id.nil?
|
35
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling GitLabSyncApi.gitlab_sync_delete"
|
36
|
-
end
|
37
|
-
# resource path
|
38
|
-
local_var_path = '/gitlab_syncs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
39
|
-
|
40
|
-
# query parameters
|
41
|
-
query_params = opts[:query_params] || {}
|
42
|
-
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
43
|
-
|
44
|
-
# header parameters
|
45
|
-
header_params = opts[:header_params] || {}
|
46
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
47
|
-
|
48
|
-
# form parameters
|
49
|
-
form_params = opts[:form_params] || {}
|
50
|
-
|
51
|
-
# http body (model)
|
52
|
-
post_body = opts[:body]
|
53
|
-
|
54
|
-
# return_type
|
55
|
-
return_type = opts[:return_type]
|
56
|
-
|
57
|
-
# auth_names
|
58
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
59
|
-
|
60
|
-
new_options = opts.merge(
|
61
|
-
:header_params => header_params,
|
62
|
-
:query_params => query_params,
|
63
|
-
:form_params => form_params,
|
64
|
-
:body => post_body,
|
65
|
-
:auth_names => auth_names,
|
66
|
-
:return_type => return_type
|
67
|
-
)
|
68
|
-
|
69
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
70
|
-
if @api_client.config.debugging
|
71
|
-
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
72
|
-
end
|
73
|
-
response = ::Phrase::Response.new(data, headers)
|
74
|
-
return response, status_code, headers
|
75
|
-
end
|
76
|
-
|
77
|
-
# Export from Phrase Strings to GitLab
|
78
|
-
# Export translations from Phrase Strings to GitLab according to the .phraseapp.yml file within the GitLab repository. <br><br><i>Note: Export is done asynchronously and may take several seconds depending on the project size.</i>
|
79
|
-
# @param gitlab_sync_id [String] Gitlab Sync ID
|
80
|
-
# @param gitlab_sync_export_parameters [GitlabSyncExportParameters]
|
81
|
-
# @param [Hash] opts the optional parameters
|
82
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
83
|
-
# @return [GitlabSyncExport]
|
84
|
-
def gitlab_sync_export(gitlab_sync_id, gitlab_sync_export_parameters, opts = {})
|
85
|
-
data, _status_code, _headers = gitlab_sync_export_with_http_info(gitlab_sync_id, gitlab_sync_export_parameters, opts)
|
86
|
-
data
|
87
|
-
end
|
88
|
-
|
89
|
-
# Export from Phrase Strings to GitLab
|
90
|
-
# Export translations from Phrase Strings to GitLab according to the .phraseapp.yml file within the GitLab repository. <br><br><i>Note: Export is done asynchronously and may take several seconds depending on the project size.</i>
|
91
|
-
# @param gitlab_sync_id [String] Gitlab Sync ID
|
92
|
-
# @param gitlab_sync_export_parameters [GitlabSyncExportParameters]
|
93
|
-
# @param [Hash] opts the optional parameters
|
94
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
95
|
-
# @return [Array<(Response<(GitlabSyncExport)>, Integer, Hash)>] Response<(GitlabSyncExport)> data, response status code and response headers
|
96
|
-
def gitlab_sync_export_with_http_info(gitlab_sync_id, gitlab_sync_export_parameters, opts = {})
|
97
|
-
if @api_client.config.debugging
|
98
|
-
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_export ...'
|
99
|
-
end
|
100
|
-
# verify the required parameter 'gitlab_sync_id' is set
|
101
|
-
if @api_client.config.client_side_validation && gitlab_sync_id.nil?
|
102
|
-
fail ArgumentError, "Missing the required parameter 'gitlab_sync_id' when calling GitLabSyncApi.gitlab_sync_export"
|
103
|
-
end
|
104
|
-
# verify the required parameter 'gitlab_sync_export_parameters' is set
|
105
|
-
if @api_client.config.client_side_validation && gitlab_sync_export_parameters.nil?
|
106
|
-
fail ArgumentError, "Missing the required parameter 'gitlab_sync_export_parameters' when calling GitLabSyncApi.gitlab_sync_export"
|
107
|
-
end
|
108
|
-
# resource path
|
109
|
-
local_var_path = '/gitlab_syncs/{gitlab_sync_id}/export'.sub('{' + 'gitlab_sync_id' + '}', CGI.escape(gitlab_sync_id.to_s))
|
110
|
-
|
111
|
-
# query parameters
|
112
|
-
query_params = opts[:query_params] || {}
|
113
|
-
|
114
|
-
# header parameters
|
115
|
-
header_params = opts[:header_params] || {}
|
116
|
-
# HTTP header 'Accept' (if needed)
|
117
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
118
|
-
# HTTP header 'Content-Type'
|
119
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
120
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
121
|
-
|
122
|
-
# form parameters
|
123
|
-
form_params = opts[:form_params] || {}
|
124
|
-
|
125
|
-
# http body (model)
|
126
|
-
post_body = opts[:body] || @api_client.object_to_http_body(gitlab_sync_export_parameters)
|
127
|
-
|
128
|
-
# return_type
|
129
|
-
return_type = opts[:return_type] || 'GitlabSyncExport'
|
130
|
-
|
131
|
-
# auth_names
|
132
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
133
|
-
|
134
|
-
new_options = opts.merge(
|
135
|
-
:header_params => header_params,
|
136
|
-
:query_params => query_params,
|
137
|
-
:form_params => form_params,
|
138
|
-
:body => post_body,
|
139
|
-
:auth_names => auth_names,
|
140
|
-
:return_type => return_type
|
141
|
-
)
|
142
|
-
|
143
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
144
|
-
if @api_client.config.debugging
|
145
|
-
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
146
|
-
end
|
147
|
-
response = ::Phrase::Response.new(data, headers)
|
148
|
-
return response, status_code, headers
|
149
|
-
end
|
150
|
-
|
151
|
-
# History of single Sync Setting
|
152
|
-
# List history for a single Sync Setting.
|
153
|
-
# @param gitlab_sync_id [String] Gitlab Sync ID
|
154
|
-
# @param [Hash] opts the optional parameters
|
155
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
156
|
-
# @option opts [Integer] :page Page number
|
157
|
-
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
158
|
-
# @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.
|
159
|
-
# @return [Array<GitlabSyncHistory>]
|
160
|
-
def gitlab_sync_history(gitlab_sync_id, opts = {})
|
161
|
-
data, _status_code, _headers = gitlab_sync_history_with_http_info(gitlab_sync_id, opts)
|
162
|
-
data
|
163
|
-
end
|
164
|
-
|
165
|
-
# History of single Sync Setting
|
166
|
-
# List history for a single Sync Setting.
|
167
|
-
# @param gitlab_sync_id [String] Gitlab Sync ID
|
168
|
-
# @param [Hash] opts the optional parameters
|
169
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
170
|
-
# @option opts [Integer] :page Page number
|
171
|
-
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
172
|
-
# @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.
|
173
|
-
# @return [Array<(Response<(Array<GitlabSyncHistory>)>, Integer, Hash)>] Response<(Array<GitlabSyncHistory>)> data, response status code and response headers
|
174
|
-
def gitlab_sync_history_with_http_info(gitlab_sync_id, opts = {})
|
175
|
-
if @api_client.config.debugging
|
176
|
-
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_history ...'
|
177
|
-
end
|
178
|
-
# verify the required parameter 'gitlab_sync_id' is set
|
179
|
-
if @api_client.config.client_side_validation && gitlab_sync_id.nil?
|
180
|
-
fail ArgumentError, "Missing the required parameter 'gitlab_sync_id' when calling GitLabSyncApi.gitlab_sync_history"
|
181
|
-
end
|
182
|
-
# resource path
|
183
|
-
local_var_path = '/gitlab_syncs/{gitlab_sync_id}/history'.sub('{' + 'gitlab_sync_id' + '}', CGI.escape(gitlab_sync_id.to_s))
|
184
|
-
|
185
|
-
# query parameters
|
186
|
-
query_params = opts[:query_params] || {}
|
187
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
188
|
-
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
189
|
-
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
190
|
-
|
191
|
-
# header parameters
|
192
|
-
header_params = opts[:header_params] || {}
|
193
|
-
# HTTP header 'Accept' (if needed)
|
194
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
195
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
196
|
-
|
197
|
-
# form parameters
|
198
|
-
form_params = opts[:form_params] || {}
|
199
|
-
|
200
|
-
# http body (model)
|
201
|
-
post_body = opts[:body]
|
202
|
-
|
203
|
-
# return_type
|
204
|
-
return_type = opts[:return_type] || 'Array<GitlabSyncHistory>'
|
205
|
-
|
206
|
-
# auth_names
|
207
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
208
|
-
|
209
|
-
new_options = opts.merge(
|
210
|
-
:header_params => header_params,
|
211
|
-
:query_params => query_params,
|
212
|
-
:form_params => form_params,
|
213
|
-
:body => post_body,
|
214
|
-
:auth_names => auth_names,
|
215
|
-
:return_type => return_type
|
216
|
-
)
|
217
|
-
|
218
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
219
|
-
if @api_client.config.debugging
|
220
|
-
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
-
end
|
222
|
-
response = ::Phrase::Response.new(data, headers)
|
223
|
-
return response, status_code, headers
|
224
|
-
end
|
225
|
-
|
226
|
-
# Import from GitLab to Phrase
|
227
|
-
# Import translations from GitLab to Phrase Strings according to the .phraseapp.yml file within the GitLab repository. <br><br><i>Note: Import is done asynchronously and may take several seconds depending on the project size.</i>
|
228
|
-
# @param gitlab_sync_id [String] Gitlab Sync ID
|
229
|
-
# @param gitlab_sync_import_parameters [GitlabSyncImportParameters]
|
230
|
-
# @param [Hash] opts the optional parameters
|
231
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
232
|
-
# @return [Array<Upload>]
|
233
|
-
def gitlab_sync_import(gitlab_sync_id, gitlab_sync_import_parameters, opts = {})
|
234
|
-
data, _status_code, _headers = gitlab_sync_import_with_http_info(gitlab_sync_id, gitlab_sync_import_parameters, opts)
|
235
|
-
data
|
236
|
-
end
|
237
|
-
|
238
|
-
# Import from GitLab to Phrase
|
239
|
-
# Import translations from GitLab to Phrase Strings according to the .phraseapp.yml file within the GitLab repository. <br><br><i>Note: Import is done asynchronously and may take several seconds depending on the project size.</i>
|
240
|
-
# @param gitlab_sync_id [String] Gitlab Sync ID
|
241
|
-
# @param gitlab_sync_import_parameters [GitlabSyncImportParameters]
|
242
|
-
# @param [Hash] opts the optional parameters
|
243
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
244
|
-
# @return [Array<(Response<(Array<Upload>)>, Integer, Hash)>] Response<(Array<Upload>)> data, response status code and response headers
|
245
|
-
def gitlab_sync_import_with_http_info(gitlab_sync_id, gitlab_sync_import_parameters, opts = {})
|
246
|
-
if @api_client.config.debugging
|
247
|
-
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_import ...'
|
248
|
-
end
|
249
|
-
# verify the required parameter 'gitlab_sync_id' is set
|
250
|
-
if @api_client.config.client_side_validation && gitlab_sync_id.nil?
|
251
|
-
fail ArgumentError, "Missing the required parameter 'gitlab_sync_id' when calling GitLabSyncApi.gitlab_sync_import"
|
252
|
-
end
|
253
|
-
# verify the required parameter 'gitlab_sync_import_parameters' is set
|
254
|
-
if @api_client.config.client_side_validation && gitlab_sync_import_parameters.nil?
|
255
|
-
fail ArgumentError, "Missing the required parameter 'gitlab_sync_import_parameters' when calling GitLabSyncApi.gitlab_sync_import"
|
256
|
-
end
|
257
|
-
# resource path
|
258
|
-
local_var_path = '/gitlab_syncs/{gitlab_sync_id}/import'.sub('{' + 'gitlab_sync_id' + '}', CGI.escape(gitlab_sync_id.to_s))
|
259
|
-
|
260
|
-
# query parameters
|
261
|
-
query_params = opts[:query_params] || {}
|
262
|
-
|
263
|
-
# header parameters
|
264
|
-
header_params = opts[:header_params] || {}
|
265
|
-
# HTTP header 'Accept' (if needed)
|
266
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
267
|
-
# HTTP header 'Content-Type'
|
268
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
269
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
270
|
-
|
271
|
-
# form parameters
|
272
|
-
form_params = opts[:form_params] || {}
|
273
|
-
|
274
|
-
# http body (model)
|
275
|
-
post_body = opts[:body] || @api_client.object_to_http_body(gitlab_sync_import_parameters)
|
276
|
-
|
277
|
-
# return_type
|
278
|
-
return_type = opts[:return_type] || 'Array<Upload>'
|
279
|
-
|
280
|
-
# auth_names
|
281
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
282
|
-
|
283
|
-
new_options = opts.merge(
|
284
|
-
:header_params => header_params,
|
285
|
-
:query_params => query_params,
|
286
|
-
:form_params => form_params,
|
287
|
-
:body => post_body,
|
288
|
-
:auth_names => auth_names,
|
289
|
-
:return_type => return_type
|
290
|
-
)
|
291
|
-
|
292
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
293
|
-
if @api_client.config.debugging
|
294
|
-
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
295
|
-
end
|
296
|
-
response = ::Phrase::Response.new(data, headers)
|
297
|
-
return response, status_code, headers
|
298
|
-
end
|
299
|
-
|
300
|
-
# List GitLab syncs
|
301
|
-
# List all GitLab Sync Settings for which synchronisation with Phrase Strings and GitLab is activated.
|
302
|
-
# @param [Hash] opts the optional parameters
|
303
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
304
|
-
# @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.
|
305
|
-
# @return [Array<GitlabSync>]
|
306
|
-
def gitlab_sync_list(opts = {})
|
307
|
-
data, _status_code, _headers = gitlab_sync_list_with_http_info(opts)
|
308
|
-
data
|
309
|
-
end
|
310
|
-
|
311
|
-
# List GitLab syncs
|
312
|
-
# List all GitLab Sync Settings for which synchronisation with Phrase Strings and GitLab is activated.
|
313
|
-
# @param [Hash] opts the optional parameters
|
314
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
315
|
-
# @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.
|
316
|
-
# @return [Array<(Response<(Array<GitlabSync>)>, Integer, Hash)>] Response<(Array<GitlabSync>)> data, response status code and response headers
|
317
|
-
def gitlab_sync_list_with_http_info(opts = {})
|
318
|
-
if @api_client.config.debugging
|
319
|
-
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_list ...'
|
320
|
-
end
|
321
|
-
# resource path
|
322
|
-
local_var_path = '/gitlab_syncs'
|
323
|
-
|
324
|
-
# query parameters
|
325
|
-
query_params = opts[:query_params] || {}
|
326
|
-
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
327
|
-
|
328
|
-
# header parameters
|
329
|
-
header_params = opts[:header_params] || {}
|
330
|
-
# HTTP header 'Accept' (if needed)
|
331
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
332
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
333
|
-
|
334
|
-
# form parameters
|
335
|
-
form_params = opts[:form_params] || {}
|
336
|
-
|
337
|
-
# http body (model)
|
338
|
-
post_body = opts[:body]
|
339
|
-
|
340
|
-
# return_type
|
341
|
-
return_type = opts[:return_type] || 'Array<GitlabSync>'
|
342
|
-
|
343
|
-
# auth_names
|
344
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
345
|
-
|
346
|
-
new_options = opts.merge(
|
347
|
-
:header_params => header_params,
|
348
|
-
:query_params => query_params,
|
349
|
-
:form_params => form_params,
|
350
|
-
:body => post_body,
|
351
|
-
:auth_names => auth_names,
|
352
|
-
:return_type => return_type
|
353
|
-
)
|
354
|
-
|
355
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
356
|
-
if @api_client.config.debugging
|
357
|
-
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
358
|
-
end
|
359
|
-
response = ::Phrase::Response.new(data, headers)
|
360
|
-
return response, status_code, headers
|
361
|
-
end
|
362
|
-
|
363
|
-
# Get single Sync Setting
|
364
|
-
# Shows a single GitLab Sync Setting.
|
365
|
-
# @param id [String] ID
|
366
|
-
# @param [Hash] opts the optional parameters
|
367
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
368
|
-
# @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.
|
369
|
-
# @return [GitlabSync]
|
370
|
-
def gitlab_sync_show(id, opts = {})
|
371
|
-
data, _status_code, _headers = gitlab_sync_show_with_http_info(id, opts)
|
372
|
-
data
|
373
|
-
end
|
374
|
-
|
375
|
-
# Get single Sync Setting
|
376
|
-
# Shows a single GitLab Sync Setting.
|
377
|
-
# @param id [String] ID
|
378
|
-
# @param [Hash] opts the optional parameters
|
379
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
380
|
-
# @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.
|
381
|
-
# @return [Array<(Response<(GitlabSync)>, Integer, Hash)>] Response<(GitlabSync)> data, response status code and response headers
|
382
|
-
def gitlab_sync_show_with_http_info(id, opts = {})
|
383
|
-
if @api_client.config.debugging
|
384
|
-
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_show ...'
|
385
|
-
end
|
386
|
-
# verify the required parameter 'id' is set
|
387
|
-
if @api_client.config.client_side_validation && id.nil?
|
388
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling GitLabSyncApi.gitlab_sync_show"
|
389
|
-
end
|
390
|
-
# resource path
|
391
|
-
local_var_path = '/gitlab_syncs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
392
|
-
|
393
|
-
# query parameters
|
394
|
-
query_params = opts[:query_params] || {}
|
395
|
-
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
396
|
-
|
397
|
-
# header parameters
|
398
|
-
header_params = opts[:header_params] || {}
|
399
|
-
# HTTP header 'Accept' (if needed)
|
400
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
401
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
402
|
-
|
403
|
-
# form parameters
|
404
|
-
form_params = opts[:form_params] || {}
|
405
|
-
|
406
|
-
# http body (model)
|
407
|
-
post_body = opts[:body]
|
408
|
-
|
409
|
-
# return_type
|
410
|
-
return_type = opts[:return_type] || 'GitlabSync'
|
411
|
-
|
412
|
-
# auth_names
|
413
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
414
|
-
|
415
|
-
new_options = opts.merge(
|
416
|
-
:header_params => header_params,
|
417
|
-
:query_params => query_params,
|
418
|
-
:form_params => form_params,
|
419
|
-
:body => post_body,
|
420
|
-
:auth_names => auth_names,
|
421
|
-
:return_type => return_type
|
422
|
-
)
|
423
|
-
|
424
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
425
|
-
if @api_client.config.debugging
|
426
|
-
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
427
|
-
end
|
428
|
-
response = ::Phrase::Response.new(data, headers)
|
429
|
-
return response, status_code, headers
|
430
|
-
end
|
431
|
-
|
432
|
-
# Update single Sync Setting
|
433
|
-
# Updates a single GitLab Sync Setting.
|
434
|
-
# @param id [String] ID
|
435
|
-
# @param [Hash] opts the optional parameters
|
436
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
437
|
-
# @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.
|
438
|
-
# @option opts [String] :phrase_project_code Code of the related Phrase Strings Project.
|
439
|
-
# @option opts [Integer] :gitlab_project_id ID of the related GitLab Project.
|
440
|
-
# @option opts [String] :gitlab_branch_name Name of the GitLab Branch.
|
441
|
-
# @return [GitlabSync]
|
442
|
-
def gitlab_sync_update(id, opts = {})
|
443
|
-
data, _status_code, _headers = gitlab_sync_update_with_http_info(id, opts)
|
444
|
-
data
|
445
|
-
end
|
446
|
-
|
447
|
-
# Update single Sync Setting
|
448
|
-
# Updates a single GitLab Sync Setting.
|
449
|
-
# @param id [String] ID
|
450
|
-
# @param [Hash] opts the optional parameters
|
451
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
452
|
-
# @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.
|
453
|
-
# @option opts [String] :phrase_project_code Code of the related Phrase Strings Project.
|
454
|
-
# @option opts [Integer] :gitlab_project_id ID of the related GitLab Project.
|
455
|
-
# @option opts [String] :gitlab_branch_name Name of the GitLab Branch.
|
456
|
-
# @return [Array<(Response<(GitlabSync)>, Integer, Hash)>] Response<(GitlabSync)> data, response status code and response headers
|
457
|
-
def gitlab_sync_update_with_http_info(id, opts = {})
|
458
|
-
if @api_client.config.debugging
|
459
|
-
@api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_update ...'
|
460
|
-
end
|
461
|
-
# verify the required parameter 'id' is set
|
462
|
-
if @api_client.config.client_side_validation && id.nil?
|
463
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling GitLabSyncApi.gitlab_sync_update"
|
464
|
-
end
|
465
|
-
# resource path
|
466
|
-
local_var_path = '/gitlab_syncs/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
467
|
-
|
468
|
-
# query parameters
|
469
|
-
query_params = opts[:query_params] || {}
|
470
|
-
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
471
|
-
query_params[:'phrase_project_code'] = opts[:'phrase_project_code'] if !opts[:'phrase_project_code'].nil?
|
472
|
-
query_params[:'gitlab_project_id'] = opts[:'gitlab_project_id'] if !opts[:'gitlab_project_id'].nil?
|
473
|
-
query_params[:'gitlab_branch_name'] = opts[:'gitlab_branch_name'] if !opts[:'gitlab_branch_name'].nil?
|
474
|
-
|
475
|
-
# header parameters
|
476
|
-
header_params = opts[:header_params] || {}
|
477
|
-
# HTTP header 'Accept' (if needed)
|
478
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
479
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
480
|
-
|
481
|
-
# form parameters
|
482
|
-
form_params = opts[:form_params] || {}
|
483
|
-
|
484
|
-
# http body (model)
|
485
|
-
post_body = opts[:body]
|
486
|
-
|
487
|
-
# return_type
|
488
|
-
return_type = opts[:return_type] || 'GitlabSync'
|
489
|
-
|
490
|
-
# auth_names
|
491
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
492
|
-
|
493
|
-
new_options = opts.merge(
|
494
|
-
:header_params => header_params,
|
495
|
-
:query_params => query_params,
|
496
|
-
:form_params => form_params,
|
497
|
-
:body => post_body,
|
498
|
-
:auth_names => auth_names,
|
499
|
-
:return_type => return_type
|
500
|
-
)
|
501
|
-
|
502
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
503
|
-
if @api_client.config.debugging
|
504
|
-
@api_client.config.logger.debug "API called: GitLabSyncApi#gitlab_sync_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
505
|
-
end
|
506
|
-
response = ::Phrase::Response.new(data, headers)
|
507
|
-
return response, status_code, headers
|
508
|
-
end
|
509
|
-
end
|
510
|
-
end
|