phrase 1.0.2 → 1.0.7
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 +13 -3
- data/docs/Account.md +2 -0
- data/docs/AccountDetails.md +3 -3
- data/docs/AccountsApi.md +2 -2
- data/docs/AuthorizationsApi.md +2 -2
- data/docs/BlacklistedKeysApi.md +4 -2
- data/docs/BranchesApi.md +2 -2
- data/docs/CommentsApi.md +2 -2
- data/docs/DistributionsApi.md +2 -2
- data/docs/Document.md +23 -0
- data/docs/DocumentsApi.md +137 -0
- data/docs/GitHubSyncApi.md +130 -0
- data/docs/GitLabSyncApi.md +2 -2
- data/docs/GithubSyncExportParameters.md +17 -0
- data/docs/GithubSyncImportParameters.md +17 -0
- data/docs/GlossariesApi.md +2 -2
- data/docs/GlossaryTermsApi.md +2 -2
- data/docs/InlineResponse422.md +19 -0
- data/docs/InlineResponse422Errors.md +21 -0
- data/docs/InvitationsApi.md +2 -2
- data/docs/Job.md +5 -1
- data/docs/JobCreateParameters.md +2 -0
- data/docs/JobDetails.md +4 -0
- data/docs/JobLocalesApi.md +2 -2
- data/docs/JobUpdateParameters.md +3 -1
- data/docs/JobsApi.md +74 -2
- data/docs/KeysApi.md +4 -4
- data/docs/LocalesApi.md +2 -2
- data/docs/MembersApi.md +2 -2
- data/docs/OrdersApi.md +2 -2
- data/docs/Project.md +2 -0
- data/docs/ProjectDetails.md +2 -2
- data/docs/ProjectsApi.md +2 -2
- data/docs/ReleasesApi.md +2 -2
- data/docs/ScreenshotMarkersApi.md +2 -2
- data/docs/ScreenshotsApi.md +4 -2
- data/docs/SpacesApi.md +4 -4
- data/docs/StyleGuidesApi.md +2 -2
- data/docs/TagsApi.md +2 -2
- data/docs/TeamsApi.md +2 -2
- data/docs/TranslationsApi.md +8 -8
- data/docs/UploadsApi.md +2 -2
- data/docs/VersionsHistoryApi.md +2 -2
- data/docs/WebhookCreateParameters.md +2 -0
- data/docs/WebhookUpdateParameters.md +2 -0
- data/docs/WebhooksApi.md +2 -2
- data/lib/phrase.rb +7 -0
- data/lib/phrase/api/accounts_api.rb +2 -2
- data/lib/phrase/api/authorizations_api.rb +2 -2
- data/lib/phrase/api/blacklisted_keys_api.rb +5 -2
- data/lib/phrase/api/branches_api.rb +2 -2
- data/lib/phrase/api/comments_api.rb +2 -2
- data/lib/phrase/api/distributions_api.rb +2 -2
- data/lib/phrase/api/documents_api.rb +152 -0
- data/lib/phrase/api/git_hub_sync_api.rb +146 -0
- data/lib/phrase/api/git_lab_sync_api.rb +2 -2
- data/lib/phrase/api/glossaries_api.rb +2 -2
- data/lib/phrase/api/glossary_terms_api.rb +2 -2
- data/lib/phrase/api/invitations_api.rb +2 -2
- data/lib/phrase/api/job_locales_api.rb +2 -2
- data/lib/phrase/api/jobs_api.rb +83 -2
- data/lib/phrase/api/keys_api.rb +4 -4
- data/lib/phrase/api/locales_api.rb +2 -2
- data/lib/phrase/api/members_api.rb +2 -2
- data/lib/phrase/api/orders_api.rb +2 -2
- data/lib/phrase/api/projects_api.rb +2 -2
- data/lib/phrase/api/releases_api.rb +2 -2
- data/lib/phrase/api/screenshot_markers_api.rb +2 -2
- data/lib/phrase/api/screenshots_api.rb +5 -2
- data/lib/phrase/api/spaces_api.rb +4 -4
- data/lib/phrase/api/style_guides_api.rb +2 -2
- data/lib/phrase/api/tags_api.rb +2 -2
- data/lib/phrase/api/teams_api.rb +2 -2
- data/lib/phrase/api/translations_api.rb +8 -8
- data/lib/phrase/api/uploads_api.rb +2 -2
- data/lib/phrase/api/versions_history_api.rb +2 -2
- data/lib/phrase/api/webhooks_api.rb +2 -2
- data/lib/phrase/api_client.rb +2 -2
- data/lib/phrase/models/account.rb +10 -1
- data/lib/phrase/models/account_details.rb +13 -13
- data/lib/phrase/models/document.rb +221 -0
- data/lib/phrase/models/github_sync_export_parameters.rb +195 -0
- data/lib/phrase/models/github_sync_import_parameters.rb +195 -0
- data/lib/phrase/models/inline_response422.rb +205 -0
- data/lib/phrase/models/inline_response422_errors.rb +212 -0
- data/lib/phrase/models/job.rb +22 -4
- data/lib/phrase/models/job_create_parameters.rb +11 -1
- data/lib/phrase/models/job_details.rb +19 -1
- data/lib/phrase/models/job_update_parameters.rb +14 -4
- data/lib/phrase/models/project.rb +10 -1
- data/lib/phrase/models/project_details.rb +10 -10
- data/lib/phrase/models/webhook_create_parameters.rb +11 -1
- data/lib/phrase/models/webhook_update_parameters.rb +11 -1
- data/lib/phrase/version.rb +1 -1
- data/spec/api/accounts_api_spec.rb +1 -1
- data/spec/api/authorizations_api_spec.rb +1 -1
- data/spec/api/blacklisted_keys_api_spec.rb +2 -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/documents_api_spec.rb +52 -0
- data/spec/api/git_hub_sync_api_spec.rb +49 -0
- data/spec/api/git_lab_sync_api_spec.rb +1 -1
- data/spec/api/glossaries_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 +19 -1
- data/spec/api/keys_api_spec.rb +2 -2
- data/spec/api/locales_api_spec.rb +1 -1
- data/spec/api/members_api_spec.rb +1 -1
- 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 +2 -1
- data/spec/api/spaces_api_spec.rb +2 -2
- 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 +1 -1
- data/spec/api/translations_api_spec.rb +4 -4
- data/spec/api/uploads_api_spec.rb +1 -1
- data/spec/api/versions_history_api_spec.rb +1 -1
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/account_details_spec.rb +4 -4
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/document_spec.rb +47 -0
- data/spec/models/github_sync_export_parameters_spec.rb +29 -0
- data/spec/models/github_sync_import_parameters_spec.rb +29 -0
- data/spec/models/inline_response422_errors_spec.rb +41 -0
- data/spec/models/inline_response422_spec.rb +35 -0
- data/spec/models/job_create_parameters_spec.rb +6 -0
- data/spec/models/job_details_spec.rb +12 -0
- data/spec/models/job_spec.rb +12 -0
- data/spec/models/job_update_parameters_spec.rb +6 -0
- data/spec/models/project_details_spec.rb +6 -6
- data/spec/models/project_spec.rb +6 -0
- data/spec/models/webhook_create_parameters_spec.rb +6 -0
- data/spec/models/webhook_update_parameters_spec.rb +6 -0
- metadata +183 -155
|
@@ -582,7 +582,7 @@ module Phrase
|
|
|
582
582
|
# @param [Hash] opts the optional parameters
|
|
583
583
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
584
584
|
# @option opts [Integer] :page Page number
|
|
585
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
585
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
586
586
|
# @option opts [String] :branch specify the branch to use
|
|
587
587
|
# @return [Array<Comment>]
|
|
588
588
|
def comments_list(project_id, key_id, opts = {})
|
|
@@ -597,7 +597,7 @@ module Phrase
|
|
|
597
597
|
# @param [Hash] opts the optional parameters
|
|
598
598
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
599
599
|
# @option opts [Integer] :page Page number
|
|
600
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
600
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
601
601
|
# @option opts [String] :branch specify the branch to use
|
|
602
602
|
# @return [Array<(Response<(Array<Comment>)>, Integer, Hash)>] Response<(Array<Comment>)> data, response status code and response headers
|
|
603
603
|
def comments_list_with_http_info(project_id, key_id, opts = {})
|
|
@@ -309,7 +309,7 @@ module Phrase
|
|
|
309
309
|
# @param [Hash] opts the optional parameters
|
|
310
310
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
311
311
|
# @option opts [Integer] :page Page number
|
|
312
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
312
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
313
313
|
# @return [Array<DistributionPreview>]
|
|
314
314
|
def distributions_list(account_id, opts = {})
|
|
315
315
|
data, _status_code, _headers = distributions_list_with_http_info(account_id, opts)
|
|
@@ -322,7 +322,7 @@ module Phrase
|
|
|
322
322
|
# @param [Hash] opts the optional parameters
|
|
323
323
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
324
324
|
# @option opts [Integer] :page Page number
|
|
325
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
325
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
326
326
|
# @return [Array<(Response<(Array<DistributionPreview>)>, Integer, Hash)>] Response<(Array<DistributionPreview>)> data, response status code and response headers
|
|
327
327
|
def distributions_list_with_http_info(account_id, opts = {})
|
|
328
328
|
if @api_client.config.debugging
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class DocumentsApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Delete document
|
|
11
|
+
# Delete an existing document.
|
|
12
|
+
# @param project_id [String] Project 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 [nil]
|
|
17
|
+
def document_delete(project_id, id, opts = {})
|
|
18
|
+
data, _status_code, _headers = document_delete_with_http_info(project_id, id, opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Delete document
|
|
23
|
+
# Delete an existing document.
|
|
24
|
+
# @param project_id [String] Project 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, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
29
|
+
def document_delete_with_http_info(project_id, id, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: DocumentsApi.document_delete ...'
|
|
32
|
+
end
|
|
33
|
+
# verify the required parameter 'project_id' is set
|
|
34
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
35
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling DocumentsApi.document_delete"
|
|
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 DocumentsApi.document_delete"
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/projects/{project_id}/documents/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_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
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
50
|
+
|
|
51
|
+
# form parameters
|
|
52
|
+
form_params = opts[:form_params] || {}
|
|
53
|
+
|
|
54
|
+
# http body (model)
|
|
55
|
+
post_body = opts[:body]
|
|
56
|
+
|
|
57
|
+
# return_type
|
|
58
|
+
return_type = opts[:return_type]
|
|
59
|
+
|
|
60
|
+
# auth_names
|
|
61
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
62
|
+
|
|
63
|
+
new_options = opts.merge(
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: DocumentsApi#document_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
response = ::Phrase::Response.new(data, headers)
|
|
77
|
+
return response, status_code, headers
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# List documents
|
|
81
|
+
# List all documents the current user has access to.
|
|
82
|
+
# @param project_id [String] Project ID
|
|
83
|
+
# @param [Hash] opts the optional parameters
|
|
84
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
85
|
+
# @option opts [Integer] :page Page number
|
|
86
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
87
|
+
# @return [Array<Document>]
|
|
88
|
+
def documents_list(project_id, opts = {})
|
|
89
|
+
data, _status_code, _headers = documents_list_with_http_info(project_id, opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# List documents
|
|
94
|
+
# List all documents the current user has access to.
|
|
95
|
+
# @param project_id [String] Project ID
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
98
|
+
# @option opts [Integer] :page Page number
|
|
99
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
100
|
+
# @return [Array<(Response<(Array<Document>)>, Integer, Hash)>] Response<(Array<Document>)> data, response status code and response headers
|
|
101
|
+
def documents_list_with_http_info(project_id, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: DocumentsApi.documents_list ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'project_id' is set
|
|
106
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling DocumentsApi.documents_list"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/projects/{project_id}/documents'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
115
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
121
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
122
|
+
|
|
123
|
+
# form parameters
|
|
124
|
+
form_params = opts[:form_params] || {}
|
|
125
|
+
|
|
126
|
+
# http body (model)
|
|
127
|
+
post_body = opts[:body]
|
|
128
|
+
|
|
129
|
+
# return_type
|
|
130
|
+
return_type = opts[:return_type] || 'Array<Document>'
|
|
131
|
+
|
|
132
|
+
# auth_names
|
|
133
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
134
|
+
|
|
135
|
+
new_options = opts.merge(
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: DocumentsApi#documents_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
response = ::Phrase::Response.new(data, headers)
|
|
149
|
+
return response, status_code, headers
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class GitHubSyncApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Export from Phrase to GitHub
|
|
11
|
+
# Export translations from Phrase to GitHub according to the .phraseapp.yml file within the GitHub repository.
|
|
12
|
+
# @param github_sync_export_parameters [GithubSyncExportParameters]
|
|
13
|
+
# @param [Hash] opts the optional parameters
|
|
14
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
15
|
+
# @return [nil]
|
|
16
|
+
def github_sync_export(github_sync_export_parameters, opts = {})
|
|
17
|
+
data, _status_code, _headers = github_sync_export_with_http_info(github_sync_export_parameters, opts)
|
|
18
|
+
data
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Export from Phrase to GitHub
|
|
22
|
+
# Export translations from Phrase to GitHub according to the .phraseapp.yml file within the GitHub repository.
|
|
23
|
+
# @param github_sync_export_parameters [GithubSyncExportParameters]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
26
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
27
|
+
def github_sync_export_with_http_info(github_sync_export_parameters, opts = {})
|
|
28
|
+
if @api_client.config.debugging
|
|
29
|
+
@api_client.config.logger.debug 'Calling API: GitHubSyncApi.github_sync_export ...'
|
|
30
|
+
end
|
|
31
|
+
# verify the required parameter 'github_sync_export_parameters' is set
|
|
32
|
+
if @api_client.config.client_side_validation && github_sync_export_parameters.nil?
|
|
33
|
+
fail ArgumentError, "Missing the required parameter 'github_sync_export_parameters' when calling GitHubSyncApi.github_sync_export"
|
|
34
|
+
end
|
|
35
|
+
# resource path
|
|
36
|
+
local_var_path = '/github_syncs/export'
|
|
37
|
+
|
|
38
|
+
# query parameters
|
|
39
|
+
query_params = opts[:query_params] || {}
|
|
40
|
+
|
|
41
|
+
# header parameters
|
|
42
|
+
header_params = opts[:header_params] || {}
|
|
43
|
+
# HTTP header 'Accept' (if needed)
|
|
44
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
45
|
+
# HTTP header 'Content-Type'
|
|
46
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
47
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
48
|
+
|
|
49
|
+
# form parameters
|
|
50
|
+
form_params = opts[:form_params] || {}
|
|
51
|
+
|
|
52
|
+
# http body (model)
|
|
53
|
+
post_body = opts[:body] || @api_client.object_to_http_body(github_sync_export_parameters)
|
|
54
|
+
|
|
55
|
+
# return_type
|
|
56
|
+
return_type = opts[:return_type]
|
|
57
|
+
|
|
58
|
+
# auth_names
|
|
59
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
60
|
+
|
|
61
|
+
new_options = opts.merge(
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: GitHubSyncApi#github_sync_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
response = ::Phrase::Response.new(data, headers)
|
|
75
|
+
return response, status_code, headers
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Import to Phrase from GitHub
|
|
79
|
+
# Import files to Phrase from your connected GitHub repository.
|
|
80
|
+
# @param github_sync_import_parameters [GithubSyncImportParameters]
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
83
|
+
# @return [nil]
|
|
84
|
+
def github_sync_import(github_sync_import_parameters, opts = {})
|
|
85
|
+
data, _status_code, _headers = github_sync_import_with_http_info(github_sync_import_parameters, opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Import to Phrase from GitHub
|
|
90
|
+
# Import files to Phrase from your connected GitHub repository.
|
|
91
|
+
# @param github_sync_import_parameters [GithubSyncImportParameters]
|
|
92
|
+
# @param [Hash] opts the optional parameters
|
|
93
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
94
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
95
|
+
def github_sync_import_with_http_info(github_sync_import_parameters, opts = {})
|
|
96
|
+
if @api_client.config.debugging
|
|
97
|
+
@api_client.config.logger.debug 'Calling API: GitHubSyncApi.github_sync_import ...'
|
|
98
|
+
end
|
|
99
|
+
# verify the required parameter 'github_sync_import_parameters' is set
|
|
100
|
+
if @api_client.config.client_side_validation && github_sync_import_parameters.nil?
|
|
101
|
+
fail ArgumentError, "Missing the required parameter 'github_sync_import_parameters' when calling GitHubSyncApi.github_sync_import"
|
|
102
|
+
end
|
|
103
|
+
# resource path
|
|
104
|
+
local_var_path = '/github_syncs/import'
|
|
105
|
+
|
|
106
|
+
# query parameters
|
|
107
|
+
query_params = opts[:query_params] || {}
|
|
108
|
+
|
|
109
|
+
# header parameters
|
|
110
|
+
header_params = opts[:header_params] || {}
|
|
111
|
+
# HTTP header 'Accept' (if needed)
|
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
113
|
+
# HTTP header 'Content-Type'
|
|
114
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
115
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
116
|
+
|
|
117
|
+
# form parameters
|
|
118
|
+
form_params = opts[:form_params] || {}
|
|
119
|
+
|
|
120
|
+
# http body (model)
|
|
121
|
+
post_body = opts[:body] || @api_client.object_to_http_body(github_sync_import_parameters)
|
|
122
|
+
|
|
123
|
+
# return_type
|
|
124
|
+
return_type = opts[:return_type]
|
|
125
|
+
|
|
126
|
+
# auth_names
|
|
127
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
128
|
+
|
|
129
|
+
new_options = opts.merge(
|
|
130
|
+
:header_params => header_params,
|
|
131
|
+
:query_params => query_params,
|
|
132
|
+
:form_params => form_params,
|
|
133
|
+
:body => post_body,
|
|
134
|
+
:auth_names => auth_names,
|
|
135
|
+
:return_type => return_type
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
139
|
+
if @api_client.config.debugging
|
|
140
|
+
@api_client.config.logger.debug "API called: GitHubSyncApi#github_sync_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
141
|
+
end
|
|
142
|
+
response = ::Phrase::Response.new(data, headers)
|
|
143
|
+
return response, status_code, headers
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -154,7 +154,7 @@ module Phrase
|
|
|
154
154
|
# @param [Hash] opts the optional parameters
|
|
155
155
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
156
156
|
# @option opts [Integer] :page Page number
|
|
157
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
157
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
158
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
159
|
# @return [Array<GitlabSyncHistory>]
|
|
160
160
|
def gitlab_sync_history(gitlab_sync_id, opts = {})
|
|
@@ -168,7 +168,7 @@ module Phrase
|
|
|
168
168
|
# @param [Hash] opts the optional parameters
|
|
169
169
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
170
170
|
# @option opts [Integer] :page Page number
|
|
171
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
171
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
172
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
173
|
# @return [Array<(Response<(Array<GitlabSyncHistory>)>, Integer, Hash)>] Response<(Array<GitlabSyncHistory>)> data, response status code and response headers
|
|
174
174
|
def gitlab_sync_history_with_http_info(gitlab_sync_id, opts = {})
|
|
@@ -13,7 +13,7 @@ module Phrase
|
|
|
13
13
|
# @param [Hash] opts the optional parameters
|
|
14
14
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
15
15
|
# @option opts [Integer] :page Page number
|
|
16
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
16
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
17
17
|
# @return [Array<Glossary>]
|
|
18
18
|
def glossaries_list(account_id, opts = {})
|
|
19
19
|
data, _status_code, _headers = glossaries_list_with_http_info(account_id, opts)
|
|
@@ -26,7 +26,7 @@ module Phrase
|
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
28
|
# @option opts [Integer] :page Page number
|
|
29
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
29
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
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
|
|
@@ -334,7 +334,7 @@ module Phrase
|
|
|
334
334
|
# @param [Hash] opts the optional parameters
|
|
335
335
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
336
336
|
# @option opts [Integer] :page Page number
|
|
337
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
337
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
338
338
|
# @return [Array<GlossaryTerm>]
|
|
339
339
|
def glossary_terms_list(account_id, glossary_id, opts = {})
|
|
340
340
|
data, _status_code, _headers = glossary_terms_list_with_http_info(account_id, glossary_id, opts)
|
|
@@ -348,7 +348,7 @@ module Phrase
|
|
|
348
348
|
# @param [Hash] opts the optional parameters
|
|
349
349
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
350
350
|
# @option opts [Integer] :page Page number
|
|
351
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
351
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
352
352
|
# @return [Array<(Response<(Array<GlossaryTerm>)>, Integer, Hash)>] Response<(Array<GlossaryTerm>)> data, response status code and response headers
|
|
353
353
|
def glossary_terms_list_with_http_info(account_id, glossary_id, opts = {})
|
|
354
354
|
if @api_client.config.debugging
|
|
@@ -381,7 +381,7 @@ module Phrase
|
|
|
381
381
|
# @param [Hash] opts the optional parameters
|
|
382
382
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
383
383
|
# @option opts [Integer] :page Page number
|
|
384
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
384
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
385
385
|
# @return [Array<Invitation>]
|
|
386
386
|
def invitations_list(account_id, opts = {})
|
|
387
387
|
data, _status_code, _headers = invitations_list_with_http_info(account_id, opts)
|
|
@@ -394,7 +394,7 @@ module Phrase
|
|
|
394
394
|
# @param [Hash] opts the optional parameters
|
|
395
395
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
396
396
|
# @option opts [Integer] :page Page number
|
|
397
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
397
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
398
398
|
# @return [Array<(Response<(Array<Invitation>)>, Integer, Hash)>] Response<(Array<Invitation>)> data, response status code and response headers
|
|
399
399
|
def invitations_list_with_http_info(account_id, opts = {})
|
|
400
400
|
if @api_client.config.debugging
|
|
@@ -512,7 +512,7 @@ module Phrase
|
|
|
512
512
|
# @param [Hash] opts the optional parameters
|
|
513
513
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
514
514
|
# @option opts [Integer] :page Page number
|
|
515
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
515
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
516
516
|
# @option opts [String] :branch specify the branch to use
|
|
517
517
|
# @return [Array<JobLocale>]
|
|
518
518
|
def job_locales_list(project_id, job_id, opts = {})
|
|
@@ -527,7 +527,7 @@ module Phrase
|
|
|
527
527
|
# @param [Hash] opts the optional parameters
|
|
528
528
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
529
529
|
# @option opts [Integer] :page Page number
|
|
530
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
530
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
531
531
|
# @option opts [String] :branch specify the branch to use
|
|
532
532
|
# @return [Array<(Response<(Array<JobLocale>)>, Integer, Hash)>] Response<(Array<JobLocale>)> data, response status code and response headers
|
|
533
533
|
def job_locales_list_with_http_info(project_id, job_id, opts = {})
|
data/lib/phrase/api/jobs_api.rb
CHANGED
|
@@ -705,13 +705,94 @@ module Phrase
|
|
|
705
705
|
return response, status_code, headers
|
|
706
706
|
end
|
|
707
707
|
|
|
708
|
+
# List account jobs
|
|
709
|
+
# List all jobs for the given account.
|
|
710
|
+
# @param account_id [String] Account ID
|
|
711
|
+
# @param [Hash] opts the optional parameters
|
|
712
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
713
|
+
# @option opts [Integer] :page Page number
|
|
714
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
715
|
+
# @option opts [String] :owned_by filter by user owning job
|
|
716
|
+
# @option opts [String] :assigned_to filter by user assigned to job
|
|
717
|
+
# @option opts [String] :state filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
|
718
|
+
# @return [Array<Job>]
|
|
719
|
+
def jobs_by_account(account_id, opts = {})
|
|
720
|
+
data, _status_code, _headers = jobs_by_account_with_http_info(account_id, opts)
|
|
721
|
+
data
|
|
722
|
+
end
|
|
723
|
+
|
|
724
|
+
# List account jobs
|
|
725
|
+
# List all jobs for the given account.
|
|
726
|
+
# @param account_id [String] Account ID
|
|
727
|
+
# @param [Hash] opts the optional parameters
|
|
728
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
729
|
+
# @option opts [Integer] :page Page number
|
|
730
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
731
|
+
# @option opts [String] :owned_by filter by user owning job
|
|
732
|
+
# @option opts [String] :assigned_to filter by user assigned to job
|
|
733
|
+
# @option opts [String] :state filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>
|
|
734
|
+
# @return [Array<(Response<(Array<Job>)>, Integer, Hash)>] Response<(Array<Job>)> data, response status code and response headers
|
|
735
|
+
def jobs_by_account_with_http_info(account_id, opts = {})
|
|
736
|
+
if @api_client.config.debugging
|
|
737
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.jobs_by_account ...'
|
|
738
|
+
end
|
|
739
|
+
# verify the required parameter 'account_id' is set
|
|
740
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
741
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling JobsApi.jobs_by_account"
|
|
742
|
+
end
|
|
743
|
+
# resource path
|
|
744
|
+
local_var_path = '/accounts/{account_id}/jobs'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
|
|
745
|
+
|
|
746
|
+
# query parameters
|
|
747
|
+
query_params = opts[:query_params] || {}
|
|
748
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
749
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
750
|
+
query_params[:'owned_by'] = opts[:'owned_by'] if !opts[:'owned_by'].nil?
|
|
751
|
+
query_params[:'assigned_to'] = opts[:'assigned_to'] if !opts[:'assigned_to'].nil?
|
|
752
|
+
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
|
753
|
+
|
|
754
|
+
# header parameters
|
|
755
|
+
header_params = opts[:header_params] || {}
|
|
756
|
+
# HTTP header 'Accept' (if needed)
|
|
757
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
758
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
759
|
+
|
|
760
|
+
# form parameters
|
|
761
|
+
form_params = opts[:form_params] || {}
|
|
762
|
+
|
|
763
|
+
# http body (model)
|
|
764
|
+
post_body = opts[:body]
|
|
765
|
+
|
|
766
|
+
# return_type
|
|
767
|
+
return_type = opts[:return_type] || 'Array<Job>'
|
|
768
|
+
|
|
769
|
+
# auth_names
|
|
770
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
771
|
+
|
|
772
|
+
new_options = opts.merge(
|
|
773
|
+
:header_params => header_params,
|
|
774
|
+
:query_params => query_params,
|
|
775
|
+
:form_params => form_params,
|
|
776
|
+
:body => post_body,
|
|
777
|
+
:auth_names => auth_names,
|
|
778
|
+
:return_type => return_type
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
782
|
+
if @api_client.config.debugging
|
|
783
|
+
@api_client.config.logger.debug "API called: JobsApi#jobs_by_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
784
|
+
end
|
|
785
|
+
response = ::Phrase::Response.new(data, headers)
|
|
786
|
+
return response, status_code, headers
|
|
787
|
+
end
|
|
788
|
+
|
|
708
789
|
# List jobs
|
|
709
790
|
# List all jobs for the given project.
|
|
710
791
|
# @param project_id [String] Project ID
|
|
711
792
|
# @param [Hash] opts the optional parameters
|
|
712
793
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
713
794
|
# @option opts [Integer] :page Page number
|
|
714
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
795
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
715
796
|
# @option opts [String] :branch specify the branch to use
|
|
716
797
|
# @option opts [String] :owned_by filter by user owning job
|
|
717
798
|
# @option opts [String] :assigned_to filter by user assigned to job
|
|
@@ -728,7 +809,7 @@ module Phrase
|
|
|
728
809
|
# @param [Hash] opts the optional parameters
|
|
729
810
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
730
811
|
# @option opts [Integer] :page Page number
|
|
731
|
-
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items,
|
|
812
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
732
813
|
# @option opts [String] :branch specify the branch to use
|
|
733
814
|
# @option opts [String] :owned_by filter by user owning job
|
|
734
815
|
# @option opts [String] :assigned_to filter by user assigned to job
|