phrase 3.7.1 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +56 -0
- data/README.md +13 -37
- 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/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/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 +265 -321
- 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
data/lib/phrase/api/keys_api.rb
CHANGED
@@ -315,7 +315,7 @@ module Phrase
|
|
315
315
|
# @param [Hash] opts the optional parameters
|
316
316
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
317
317
|
# @option opts [String] :branch specify the branch to use
|
318
|
-
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id
|
318
|
+
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> <br/> <p><strong>Caution:</strong> Query parameters with empty values will be treated as though they are not included in the request and will be ignored.</p> <br/> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
319
319
|
# @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
320
320
|
# @return [AffectedResources]
|
321
321
|
def keys_delete_collection(project_id, opts = {})
|
@@ -329,7 +329,7 @@ module Phrase
|
|
329
329
|
# @param [Hash] opts the optional parameters
|
330
330
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
331
331
|
# @option opts [String] :branch specify the branch to use
|
332
|
-
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id
|
332
|
+
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> <br/> <p><strong>Caution:</strong> Query parameters with empty values will be treated as though they are not included in the request and will be ignored.</p> <br/> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
333
333
|
# @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
334
334
|
# @return [Array<(Response<(AffectedResources)>, Integer, Hash)>] Response<(AffectedResources)> data, response status code and response headers
|
335
335
|
def keys_delete_collection_with_http_info(project_id, opts = {})
|
@@ -542,7 +542,7 @@ module Phrase
|
|
542
542
|
# @option opts [String] :branch specify the branch to use
|
543
543
|
# @option opts [String] :sort Sort by field. Can be one of: name, created_at, updated_at.
|
544
544
|
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
545
|
-
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name
|
545
|
+
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> <br/> <p><strong>Caution:</strong> Query parameters with empty values will be treated as though they are not included in the request and will be ignored.</p> <br/> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
546
546
|
# @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
547
547
|
# @return [Array<TranslationKey>]
|
548
548
|
def keys_list(project_id, opts = {})
|
@@ -560,7 +560,7 @@ module Phrase
|
|
560
560
|
# @option opts [String] :branch specify the branch to use
|
561
561
|
# @option opts [String] :sort Sort by field. Can be one of: name, created_at, updated_at.
|
562
562
|
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
563
|
-
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name
|
563
|
+
# @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id,...</code> to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in <strong>all</strong> uploads</li> </ul> <br/> <p><strong>Caution:</strong> Query parameters with empty values will be treated as though they are not included in the request and will be ignored.</p> <br/> Find more examples <a href=\"#overview--usage-examples\">here</a>.
|
564
564
|
# @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
|
565
565
|
# @return [Array<(Response<(Array<TranslationKey>)>, Integer, Hash)>] Response<(Array<TranslationKey>)> data, response status code and response headers
|
566
566
|
def keys_list_with_http_info(project_id, opts = {})
|
@@ -253,6 +253,7 @@ module Phrase
|
|
253
253
|
# @option opts [String] :translation_key_prefix Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
|
254
254
|
# @option opts [Boolean] :filter_by_prefix Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
|
255
255
|
# @option opts [Object] :custom_metadata_filters Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
|
256
|
+
# @option opts [Array<String>] :locale_ids Locale IDs or locale names
|
256
257
|
# @return [File]
|
257
258
|
def locale_download(project_id, id, opts = {})
|
258
259
|
data, _status_code, _headers = locale_download_with_http_info(project_id, id, opts)
|
@@ -286,6 +287,7 @@ module Phrase
|
|
286
287
|
# @option opts [String] :translation_key_prefix Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
|
287
288
|
# @option opts [Boolean] :filter_by_prefix Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
|
288
289
|
# @option opts [Object] :custom_metadata_filters Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
|
290
|
+
# @option opts [Array<String>] :locale_ids Locale IDs or locale names
|
289
291
|
# @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
|
290
292
|
def locale_download_with_http_info(project_id, id, opts = {})
|
291
293
|
if @api_client.config.debugging
|
@@ -323,6 +325,7 @@ module Phrase
|
|
323
325
|
query_params[:'translation_key_prefix'] = opts[:'translation_key_prefix'] if !opts[:'translation_key_prefix'].nil?
|
324
326
|
query_params[:'filter_by_prefix'] = opts[:'filter_by_prefix'] if !opts[:'filter_by_prefix'].nil?
|
325
327
|
query_params[:'custom_metadata_filters'] = opts[:'custom_metadata_filters'] if !opts[:'custom_metadata_filters'].nil?
|
328
|
+
query_params[:'locale_ids'] = @api_client.build_collection_param(opts[:'locale_ids'], :multi) if !opts[:'locale_ids'].nil?
|
326
329
|
|
327
330
|
# header parameters
|
328
331
|
header_params = opts[:header_params] || {}
|
@@ -10,33 +10,33 @@ module Phrase
|
|
10
10
|
# Get Translation Quality
|
11
11
|
# Retrieves the quality scores for your Strings translations. Returns a score, measured by Phrase QPS
|
12
12
|
# @param project_id [String] Project ID
|
13
|
-
# @param
|
13
|
+
# @param quality_performance_score_list_request [QualityPerformanceScoreListRequest]
|
14
14
|
# @param [Hash] opts the optional parameters
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
16
|
-
# @return [
|
17
|
-
def
|
18
|
-
data, _status_code, _headers =
|
16
|
+
# @return [QualityPerformanceScoreList200Response]
|
17
|
+
def quality_performance_score_list(project_id, quality_performance_score_list_request, opts = {})
|
18
|
+
data, _status_code, _headers = quality_performance_score_list_with_http_info(project_id, quality_performance_score_list_request, opts)
|
19
19
|
data
|
20
20
|
end
|
21
21
|
|
22
22
|
# Get Translation Quality
|
23
23
|
# Retrieves the quality scores for your Strings translations. Returns a score, measured by Phrase QPS
|
24
24
|
# @param project_id [String] Project ID
|
25
|
-
# @param
|
25
|
+
# @param quality_performance_score_list_request [QualityPerformanceScoreListRequest]
|
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<(
|
29
|
-
def
|
28
|
+
# @return [Array<(Response<(QualityPerformanceScoreList200Response)>, Integer, Hash)>] Response<(QualityPerformanceScoreList200Response)> data, response status code and response headers
|
29
|
+
def quality_performance_score_list_with_http_info(project_id, quality_performance_score_list_request, opts = {})
|
30
30
|
if @api_client.config.debugging
|
31
|
-
@api_client.config.logger.debug 'Calling API: QualityPerformanceScoreApi.
|
31
|
+
@api_client.config.logger.debug 'Calling API: QualityPerformanceScoreApi.quality_performance_score_list ...'
|
32
32
|
end
|
33
33
|
# verify the required parameter 'project_id' is set
|
34
34
|
if @api_client.config.client_side_validation && project_id.nil?
|
35
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling QualityPerformanceScoreApi.
|
35
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QualityPerformanceScoreApi.quality_performance_score_list"
|
36
36
|
end
|
37
|
-
# verify the required parameter '
|
38
|
-
if @api_client.config.client_side_validation &&
|
39
|
-
fail ArgumentError, "Missing the required parameter '
|
37
|
+
# verify the required parameter 'quality_performance_score_list_request' is set
|
38
|
+
if @api_client.config.client_side_validation && quality_performance_score_list_request.nil?
|
39
|
+
fail ArgumentError, "Missing the required parameter 'quality_performance_score_list_request' when calling QualityPerformanceScoreApi.quality_performance_score_list"
|
40
40
|
end
|
41
41
|
# resource path
|
42
42
|
local_var_path = '/projects/{project_id}/quality_performance_score'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -56,10 +56,10 @@ module Phrase
|
|
56
56
|
form_params = opts[:form_params] || {}
|
57
57
|
|
58
58
|
# http body (model)
|
59
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
59
|
+
post_body = opts[:body] || @api_client.object_to_http_body(quality_performance_score_list_request)
|
60
60
|
|
61
61
|
# return_type
|
62
|
-
return_type = opts[:return_type] || '
|
62
|
+
return_type = opts[:return_type] || 'QualityPerformanceScoreList200Response'
|
63
63
|
|
64
64
|
# auth_names
|
65
65
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
@@ -75,7 +75,7 @@ module Phrase
|
|
75
75
|
|
76
76
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
77
77
|
if @api_client.config.debugging
|
78
|
-
@api_client.config.logger.debug "API called: QualityPerformanceScoreApi#
|
78
|
+
@api_client.config.logger.debug "API called: QualityPerformanceScoreApi#quality_performance_score_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
79
|
end
|
80
80
|
response = ::Phrase::Response.new(data, headers)
|
81
81
|
return response, status_code, headers
|
@@ -0,0 +1,160 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class RepoSyncEventsApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = ApiClient.default)
|
8
|
+
@api_client = api_client
|
9
|
+
end
|
10
|
+
# Repository Syncs History
|
11
|
+
# Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
|
12
|
+
# @param account_id [String] Account ID
|
13
|
+
# @param id [String] ID
|
14
|
+
# @param [Hash] opts the optional parameters
|
15
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
16
|
+
# @return [Array<RepoSyncEvent>]
|
17
|
+
def repo_sync_event_list(account_id, id, opts = {})
|
18
|
+
data, _status_code, _headers = repo_sync_event_list_with_http_info(account_id, id, opts)
|
19
|
+
data
|
20
|
+
end
|
21
|
+
|
22
|
+
# Repository Syncs History
|
23
|
+
# Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
|
24
|
+
# @param account_id [String] Account ID
|
25
|
+
# @param id [String] ID
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
28
|
+
# @return [Array<(Response<(Array<RepoSyncEvent>)>, Integer, Hash)>] Response<(Array<RepoSyncEvent>)> data, response status code and response headers
|
29
|
+
def repo_sync_event_list_with_http_info(account_id, id, opts = {})
|
30
|
+
if @api_client.config.debugging
|
31
|
+
@api_client.config.logger.debug 'Calling API: RepoSyncEventsApi.repo_sync_event_list ...'
|
32
|
+
end
|
33
|
+
# verify the required parameter 'account_id' is set
|
34
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
35
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncEventsApi.repo_sync_event_list"
|
36
|
+
end
|
37
|
+
# verify the required parameter 'id' is set
|
38
|
+
if @api_client.config.client_side_validation && id.nil?
|
39
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncEventsApi.repo_sync_event_list"
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/accounts/{account_id}/repo_syncs/{id}/events'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = opts[:query_params] || {}
|
46
|
+
|
47
|
+
# header parameters
|
48
|
+
header_params = opts[:header_params] || {}
|
49
|
+
# HTTP header 'Accept' (if needed)
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
52
|
+
|
53
|
+
# form parameters
|
54
|
+
form_params = opts[:form_params] || {}
|
55
|
+
|
56
|
+
# http body (model)
|
57
|
+
post_body = opts[:body]
|
58
|
+
|
59
|
+
# return_type
|
60
|
+
return_type = opts[:return_type] || 'Array<RepoSyncEvent>'
|
61
|
+
|
62
|
+
# auth_names
|
63
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
64
|
+
|
65
|
+
new_options = opts.merge(
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => return_type
|
72
|
+
)
|
73
|
+
|
74
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
75
|
+
if @api_client.config.debugging
|
76
|
+
@api_client.config.logger.debug "API called: RepoSyncEventsApi#repo_sync_event_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
|
+
end
|
78
|
+
response = ::Phrase::Response.new(data, headers)
|
79
|
+
return response, status_code, headers
|
80
|
+
end
|
81
|
+
|
82
|
+
# Get a single Repo Sync Event
|
83
|
+
# Shows a single Repo Sync event.
|
84
|
+
# @param account_id [String] Account ID
|
85
|
+
# @param repo_sync_id [String] Repo Sync ID
|
86
|
+
# @param id [String] ID
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
89
|
+
# @return [RepoSyncEvent]
|
90
|
+
def repo_sync_event_show(account_id, repo_sync_id, id, opts = {})
|
91
|
+
data, _status_code, _headers = repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Get a single Repo Sync Event
|
96
|
+
# Shows a single Repo Sync event.
|
97
|
+
# @param account_id [String] Account ID
|
98
|
+
# @param repo_sync_id [String] Repo Sync ID
|
99
|
+
# @param id [String] ID
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
102
|
+
# @return [Array<(Response<(RepoSyncEvent)>, Integer, Hash)>] Response<(RepoSyncEvent)> data, response status code and response headers
|
103
|
+
def repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: RepoSyncEventsApi.repo_sync_event_show ...'
|
106
|
+
end
|
107
|
+
# verify the required parameter 'account_id' is set
|
108
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncEventsApi.repo_sync_event_show"
|
110
|
+
end
|
111
|
+
# verify the required parameter 'repo_sync_id' is set
|
112
|
+
if @api_client.config.client_side_validation && repo_sync_id.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncEventsApi.repo_sync_event_show"
|
114
|
+
end
|
115
|
+
# verify the required parameter 'id' is set
|
116
|
+
if @api_client.config.client_side_validation && id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncEventsApi.repo_sync_event_show"
|
118
|
+
end
|
119
|
+
# resource path
|
120
|
+
local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/events/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
121
|
+
|
122
|
+
# query parameters
|
123
|
+
query_params = opts[:query_params] || {}
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = opts[:header_params] || {}
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
129
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
130
|
+
|
131
|
+
# form parameters
|
132
|
+
form_params = opts[:form_params] || {}
|
133
|
+
|
134
|
+
# http body (model)
|
135
|
+
post_body = opts[:body]
|
136
|
+
|
137
|
+
# return_type
|
138
|
+
return_type = opts[:return_type] || 'RepoSyncEvent'
|
139
|
+
|
140
|
+
# auth_names
|
141
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
142
|
+
|
143
|
+
new_options = opts.merge(
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names,
|
149
|
+
:return_type => return_type
|
150
|
+
)
|
151
|
+
|
152
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: RepoSyncEventsApi#repo_sync_event_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
response = ::Phrase::Response.new(data, headers)
|
157
|
+
return response, status_code, headers
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
@@ -151,158 +151,8 @@ module Phrase
|
|
151
151
|
return response, status_code, headers
|
152
152
|
end
|
153
153
|
|
154
|
-
# Get a single Repo Sync Event
|
155
|
-
# Shows a single Repo Sync event.
|
156
|
-
# @param account_id [String] Account ID
|
157
|
-
# @param repo_sync_id [String] Repo Sync ID
|
158
|
-
# @param id [String] ID
|
159
|
-
# @param [Hash] opts the optional parameters
|
160
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
161
|
-
# @return [RepoSyncEvent]
|
162
|
-
def repo_sync_event_show(account_id, repo_sync_id, id, opts = {})
|
163
|
-
data, _status_code, _headers = repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts)
|
164
|
-
data
|
165
|
-
end
|
166
|
-
|
167
|
-
# Get a single Repo Sync Event
|
168
|
-
# Shows a single Repo Sync event.
|
169
|
-
# @param account_id [String] Account ID
|
170
|
-
# @param repo_sync_id [String] Repo Sync ID
|
171
|
-
# @param id [String] ID
|
172
|
-
# @param [Hash] opts the optional parameters
|
173
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
174
|
-
# @return [Array<(Response<(RepoSyncEvent)>, Integer, Hash)>] Response<(RepoSyncEvent)> data, response status code and response headers
|
175
|
-
def repo_sync_event_show_with_http_info(account_id, repo_sync_id, id, opts = {})
|
176
|
-
if @api_client.config.debugging
|
177
|
-
@api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_event_show ...'
|
178
|
-
end
|
179
|
-
# verify the required parameter 'account_id' is set
|
180
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
181
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_event_show"
|
182
|
-
end
|
183
|
-
# verify the required parameter 'repo_sync_id' is set
|
184
|
-
if @api_client.config.client_side_validation && repo_sync_id.nil?
|
185
|
-
fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_event_show"
|
186
|
-
end
|
187
|
-
# verify the required parameter 'id' is set
|
188
|
-
if @api_client.config.client_side_validation && id.nil?
|
189
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncsApi.repo_sync_event_show"
|
190
|
-
end
|
191
|
-
# resource path
|
192
|
-
local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/events/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
193
|
-
|
194
|
-
# query parameters
|
195
|
-
query_params = opts[:query_params] || {}
|
196
|
-
|
197
|
-
# header parameters
|
198
|
-
header_params = opts[:header_params] || {}
|
199
|
-
# HTTP header 'Accept' (if needed)
|
200
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
201
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
202
|
-
|
203
|
-
# form parameters
|
204
|
-
form_params = opts[:form_params] || {}
|
205
|
-
|
206
|
-
# http body (model)
|
207
|
-
post_body = opts[:body]
|
208
|
-
|
209
|
-
# return_type
|
210
|
-
return_type = opts[:return_type] || 'RepoSyncEvent'
|
211
|
-
|
212
|
-
# auth_names
|
213
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
214
|
-
|
215
|
-
new_options = opts.merge(
|
216
|
-
:header_params => header_params,
|
217
|
-
:query_params => query_params,
|
218
|
-
:form_params => form_params,
|
219
|
-
:body => post_body,
|
220
|
-
:auth_names => auth_names,
|
221
|
-
:return_type => return_type
|
222
|
-
)
|
223
|
-
|
224
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
225
|
-
if @api_client.config.debugging
|
226
|
-
@api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_event_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
227
|
-
end
|
228
|
-
response = ::Phrase::Response.new(data, headers)
|
229
|
-
return response, status_code, headers
|
230
|
-
end
|
231
|
-
|
232
|
-
# Repository Syncs History
|
233
|
-
# Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
|
234
|
-
# @param account_id [String] Account ID
|
235
|
-
# @param id [String] ID
|
236
|
-
# @param [Hash] opts the optional parameters
|
237
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
238
|
-
# @return [Array<RepoSyncEvent>]
|
239
|
-
def repo_sync_events(account_id, id, opts = {})
|
240
|
-
data, _status_code, _headers = repo_sync_events_with_http_info(account_id, id, opts)
|
241
|
-
data
|
242
|
-
end
|
243
|
-
|
244
|
-
# Repository Syncs History
|
245
|
-
# Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
|
246
|
-
# @param account_id [String] Account ID
|
247
|
-
# @param id [String] ID
|
248
|
-
# @param [Hash] opts the optional parameters
|
249
|
-
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
250
|
-
# @return [Array<(Response<(Array<RepoSyncEvent>)>, Integer, Hash)>] Response<(Array<RepoSyncEvent>)> data, response status code and response headers
|
251
|
-
def repo_sync_events_with_http_info(account_id, id, opts = {})
|
252
|
-
if @api_client.config.debugging
|
253
|
-
@api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_events ...'
|
254
|
-
end
|
255
|
-
# verify the required parameter 'account_id' is set
|
256
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
257
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_events"
|
258
|
-
end
|
259
|
-
# verify the required parameter 'id' is set
|
260
|
-
if @api_client.config.client_side_validation && id.nil?
|
261
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling RepoSyncsApi.repo_sync_events"
|
262
|
-
end
|
263
|
-
# resource path
|
264
|
-
local_var_path = '/accounts/{account_id}/repo_syncs/{id}/events'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
265
|
-
|
266
|
-
# query parameters
|
267
|
-
query_params = opts[:query_params] || {}
|
268
|
-
|
269
|
-
# header parameters
|
270
|
-
header_params = opts[:header_params] || {}
|
271
|
-
# HTTP header 'Accept' (if needed)
|
272
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
273
|
-
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
274
|
-
|
275
|
-
# form parameters
|
276
|
-
form_params = opts[:form_params] || {}
|
277
|
-
|
278
|
-
# http body (model)
|
279
|
-
post_body = opts[:body]
|
280
|
-
|
281
|
-
# return_type
|
282
|
-
return_type = opts[:return_type] || 'Array<RepoSyncEvent>'
|
283
|
-
|
284
|
-
# auth_names
|
285
|
-
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
286
|
-
|
287
|
-
new_options = opts.merge(
|
288
|
-
:header_params => header_params,
|
289
|
-
:query_params => query_params,
|
290
|
-
:form_params => form_params,
|
291
|
-
:body => post_body,
|
292
|
-
:auth_names => auth_names,
|
293
|
-
:return_type => return_type
|
294
|
-
)
|
295
|
-
|
296
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
297
|
-
if @api_client.config.debugging
|
298
|
-
@api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
299
|
-
end
|
300
|
-
response = ::Phrase::Response.new(data, headers)
|
301
|
-
return response, status_code, headers
|
302
|
-
end
|
303
|
-
|
304
154
|
# Export to code repository
|
305
|
-
#
|
155
|
+
# Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
|
306
156
|
# @param account_id [String] Account ID
|
307
157
|
# @param id [String] ID
|
308
158
|
# @param [Hash] opts the optional parameters
|
@@ -314,7 +164,7 @@ module Phrase
|
|
314
164
|
end
|
315
165
|
|
316
166
|
# Export to code repository
|
317
|
-
#
|
167
|
+
# Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
|
318
168
|
# @param account_id [String] Account ID
|
319
169
|
# @param id [String] ID
|
320
170
|
# @param [Hash] opts the optional parameters
|
@@ -374,7 +224,7 @@ module Phrase
|
|
374
224
|
end
|
375
225
|
|
376
226
|
# Import from code repository
|
377
|
-
#
|
227
|
+
# Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
|
378
228
|
# @param account_id [String] Account ID
|
379
229
|
# @param id [String] ID
|
380
230
|
# @param [Hash] opts the optional parameters
|
@@ -386,7 +236,7 @@ module Phrase
|
|
386
236
|
end
|
387
237
|
|
388
238
|
# Import from code repository
|
389
|
-
#
|
239
|
+
# Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
|
390
240
|
# @param account_id [String] Account ID
|
391
241
|
# @param id [String] ID
|
392
242
|
# @param [Hash] opts the optional parameters
|
@@ -26,6 +26,8 @@ module Phrase
|
|
26
26
|
|
27
27
|
attr_accessor :job_tag_name
|
28
28
|
|
29
|
+
attr_accessor :source_translations_updated_at
|
30
|
+
|
29
31
|
attr_accessor :source_locale
|
30
32
|
|
31
33
|
attr_accessor :locales
|
@@ -47,6 +49,7 @@ module Phrase
|
|
47
49
|
:'updated_at' => :'updated_at',
|
48
50
|
:'owner' => :'owner',
|
49
51
|
:'job_tag_name' => :'job_tag_name',
|
52
|
+
:'source_translations_updated_at' => :'source_translations_updated_at',
|
50
53
|
:'source_locale' => :'source_locale',
|
51
54
|
:'locales' => :'locales',
|
52
55
|
:'keys' => :'keys'
|
@@ -68,6 +71,7 @@ module Phrase
|
|
68
71
|
:'updated_at' => :'DateTime',
|
69
72
|
:'owner' => :'UserPreview',
|
70
73
|
:'job_tag_name' => :'String',
|
74
|
+
:'source_translations_updated_at' => :'DateTime',
|
71
75
|
:'source_locale' => :'LocalePreview',
|
72
76
|
:'locales' => :'Array<LocalePreview>',
|
73
77
|
:'keys' => :'Array<KeyPreview>'
|
@@ -151,6 +155,10 @@ module Phrase
|
|
151
155
|
self.job_tag_name = attributes[:'job_tag_name']
|
152
156
|
end
|
153
157
|
|
158
|
+
if attributes.key?(:'source_translations_updated_at')
|
159
|
+
self.source_translations_updated_at = attributes[:'source_translations_updated_at']
|
160
|
+
end
|
161
|
+
|
154
162
|
if attributes.key?(:'source_locale')
|
155
163
|
self.source_locale = attributes[:'source_locale']
|
156
164
|
end
|
@@ -198,6 +206,7 @@ module Phrase
|
|
198
206
|
updated_at == o.updated_at &&
|
199
207
|
owner == o.owner &&
|
200
208
|
job_tag_name == o.job_tag_name &&
|
209
|
+
source_translations_updated_at == o.source_translations_updated_at &&
|
201
210
|
source_locale == o.source_locale &&
|
202
211
|
locales == o.locales &&
|
203
212
|
keys == o.keys
|
@@ -212,7 +221,7 @@ module Phrase
|
|
212
221
|
# Calculates hash code according to all attributes.
|
213
222
|
# @return [Integer] Hash code
|
214
223
|
def hash
|
215
|
-
[id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, source_locale, locales, keys].hash
|
224
|
+
[id, name, briefing, due_date, state, ticket_url, project, branch, created_at, updated_at, owner, job_tag_name, source_translations_updated_at, source_locale, locales, keys].hash
|
216
225
|
end
|
217
226
|
|
218
227
|
# Builds the object from hash
|