phrase 1.0.12 → 2.1.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/README.md +56 -9
- data/docs/Account.md +3 -1
- data/docs/AccountDetails.md +5 -1
- data/docs/AccountDetails1.md +3 -1
- data/docs/AccountSearchResult.md +29 -0
- data/docs/Branch.md +5 -1
- data/docs/Comment.md +3 -1
- data/docs/CurrentUser.md +31 -0
- data/docs/JobLocale.md +5 -1
- data/docs/JobTemplate.md +29 -0
- data/docs/JobTemplateCreateParameters.md +21 -0
- data/docs/JobTemplateLocale.md +23 -0
- data/docs/JobTemplateLocaleUpdateParameters.md +23 -0
- data/docs/JobTemplateLocalesApi.md +347 -0
- data/docs/JobTemplateLocalesCreateParameters.md +23 -0
- data/docs/JobTemplatePreview.md +19 -0
- data/docs/JobTemplateUpdateParameters.md +21 -0
- data/docs/JobTemplateUserPreview.md +23 -0
- data/docs/JobTemplatesApi.md +337 -0
- data/docs/KeysApi.md +137 -9
- data/docs/KeysExcludeParameters.md +23 -0
- data/docs/KeysIncludeParameters.md +23 -0
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/LocalePreview1.md +23 -0
- data/docs/LocalesApi.md +73 -6
- data/docs/MemberSpaces.md +2 -2
- data/docs/MemberUpdateParameters.md +4 -2
- data/docs/Notification.md +41 -0
- data/docs/NotificationGroup.md +23 -0
- data/docs/NotificationGroupDetail.md +27 -0
- data/docs/NotificationGroupsApi.md +194 -0
- data/docs/NotificationsApi.md +194 -0
- data/docs/OrderCreateParameters.md +2 -0
- data/docs/Project.md +2 -0
- data/docs/ProjectCreateParameters.md +35 -1
- data/docs/ProjectDetails.md +2 -0
- data/docs/ProjectUpdateParameters.md +43 -9
- data/docs/ProjectsApi.md +7 -1
- data/docs/ScreenshotCreateParameters.md +3 -1
- data/docs/ScreenshotMarkerCreateParameters.md +3 -1
- data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
- data/docs/ScreenshotMarkersApi.md +9 -3
- data/docs/ScreenshotUpdateParameters.md +3 -1
- data/docs/ScreenshotsApi.md +8 -2
- data/docs/SearchApi.md +72 -0
- data/docs/SearchInAccountParameters.md +23 -0
- data/docs/Space1.md +25 -0
- data/docs/Subscription.md +19 -0
- data/docs/TranslationOrder.md +2 -0
- data/docs/TranslationsApi.md +25 -25
- data/docs/User.md +0 -2
- data/docs/UsersApi.md +2 -2
- data/docs/Variable.md +23 -0
- data/docs/VariableCreateParameters.md +19 -0
- data/docs/VariableUpdateParameters.md +19 -0
- data/docs/VariablesApi.md +331 -0
- data/lib/phrase.rb +28 -0
- data/lib/phrase/api/job_template_locales_api.rb +417 -0
- data/lib/phrase/api/job_templates_api.rb +387 -0
- data/lib/phrase/api/keys_api.rb +158 -10
- data/lib/phrase/api/locales_api.rb +76 -5
- data/lib/phrase/api/notification_groups_api.rb +202 -0
- data/lib/phrase/api/notifications_api.rb +202 -0
- data/lib/phrase/api/projects_api.rb +9 -0
- data/lib/phrase/api/screenshot_markers_api.rb +9 -0
- data/lib/phrase/api/screenshots_api.rb +9 -0
- data/lib/phrase/api/search_api.rb +84 -0
- data/lib/phrase/api/translations_api.rb +35 -35
- data/lib/phrase/api/users_api.rb +3 -3
- data/lib/phrase/api/variables_api.rb +378 -0
- data/lib/phrase/models/account.rb +13 -4
- data/lib/phrase/models/account_details.rb +22 -4
- data/lib/phrase/models/account_details1.rb +10 -1
- data/lib/phrase/models/account_search_result.rb +250 -0
- data/lib/phrase/models/branch.rb +19 -1
- data/lib/phrase/models/comment.rb +15 -4
- data/lib/phrase/models/current_user.rb +257 -0
- data/lib/phrase/models/job_locale.rb +22 -4
- data/lib/phrase/models/job_template.rb +248 -0
- data/lib/phrase/models/job_template_create_parameters.rb +220 -0
- data/lib/phrase/models/job_template_locale.rb +223 -0
- data/lib/phrase/models/job_template_locale_update_parameters.rb +234 -0
- data/lib/phrase/models/job_template_locales_create_parameters.rb +234 -0
- data/lib/phrase/models/job_template_preview.rb +203 -0
- data/lib/phrase/models/job_template_update_parameters.rb +220 -0
- data/lib/phrase/models/job_template_user_preview.rb +221 -0
- data/lib/phrase/models/keys_exclude_parameters.rb +225 -0
- data/lib/phrase/models/keys_include_parameters.rb +225 -0
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/keys_tag_parameters.rb +1 -1
- data/lib/phrase/models/keys_untag_parameters.rb +1 -1
- data/lib/phrase/models/locale_preview1.rb +221 -0
- data/lib/phrase/models/member_spaces.rb +2 -2
- data/lib/phrase/models/member_update_parameters.rb +12 -2
- data/lib/phrase/models/notification.rb +302 -0
- data/lib/phrase/models/notification_group.rb +221 -0
- data/lib/phrase/models/notification_group_detail.rb +239 -0
- data/lib/phrase/models/order_create_parameters.rb +11 -1
- data/lib/phrase/models/project.rb +10 -1
- data/lib/phrase/models/project_create_parameters.rb +174 -4
- data/lib/phrase/models/project_details.rb +10 -1
- data/lib/phrase/models/project_update_parameters.rb +183 -13
- data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
- data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
- data/lib/phrase/models/search_in_account_parameters.rb +225 -0
- data/lib/phrase/models/space1.rb +230 -0
- data/lib/phrase/models/subscription.rb +203 -0
- data/lib/phrase/models/translation_order.rb +10 -1
- data/lib/phrase/models/user.rb +1 -10
- data/lib/phrase/models/variable.rb +221 -0
- data/lib/phrase/models/variable_create_parameters.rb +205 -0
- data/lib/phrase/models/variable_update_parameters.rb +205 -0
- data/lib/phrase/version.rb +1 -1
- data/spec/api/job_template_locales_api_spec.rb +103 -0
- data/spec/api/job_templates_api_spec.rb +98 -0
- data/spec/api/keys_api_spec.rb +32 -4
- data/spec/api/locales_api_spec.rb +17 -2
- data/spec/api/notification_groups_api_spec.rb +62 -0
- data/spec/api/notifications_api_spec.rb +62 -0
- data/spec/api/projects_api_spec.rb +3 -0
- data/spec/api/screenshot_markers_api_spec.rb +3 -0
- data/spec/api/screenshots_api_spec.rb +3 -0
- data/spec/api/search_api_spec.rb +37 -0
- data/spec/api/translations_api_spec.rb +10 -10
- data/spec/api/users_api_spec.rb +1 -1
- data/spec/api/variables_api_spec.rb +95 -0
- data/spec/models/account_details1_spec.rb +6 -0
- data/spec/models/account_details_spec.rb +12 -0
- data/spec/models/account_search_result_spec.rb +65 -0
- data/spec/models/account_spec.rb +6 -0
- data/spec/models/branch_spec.rb +12 -0
- data/spec/models/comment_spec.rb +6 -0
- data/spec/models/current_user_spec.rb +71 -0
- data/spec/models/job_locale_spec.rb +12 -0
- data/spec/models/job_template_create_parameters_spec.rb +41 -0
- data/spec/models/job_template_locale_spec.rb +47 -0
- data/spec/models/job_template_locale_update_parameters_spec.rb +47 -0
- data/spec/models/job_template_locales_create_parameters_spec.rb +47 -0
- data/spec/models/job_template_preview_spec.rb +35 -0
- data/spec/models/job_template_spec.rb +65 -0
- data/spec/models/job_template_update_parameters_spec.rb +41 -0
- data/spec/models/job_template_user_preview_spec.rb +47 -0
- data/spec/models/keys_exclude_parameters_spec.rb +47 -0
- data/spec/models/keys_include_parameters_spec.rb +47 -0
- data/spec/models/locale_preview1_spec.rb +47 -0
- data/spec/models/member_update_parameters_spec.rb +6 -0
- data/spec/models/notification_group_detail_spec.rb +59 -0
- data/spec/models/notification_group_spec.rb +47 -0
- data/spec/models/notification_spec.rb +101 -0
- data/spec/models/order_create_parameters_spec.rb +6 -0
- data/spec/models/project_create_parameters_spec.rb +102 -0
- data/spec/models/project_details_spec.rb +6 -0
- data/spec/models/project_spec.rb +6 -0
- data/spec/models/project_update_parameters_spec.rb +103 -1
- data/spec/models/screenshot_create_parameters_spec.rb +6 -0
- data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
- data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
- data/spec/models/screenshot_update_parameters_spec.rb +6 -0
- data/spec/models/search_in_account_parameters_spec.rb +47 -0
- data/spec/models/space1_spec.rb +53 -0
- data/spec/models/subscription_spec.rb +35 -0
- data/spec/models/translation_order_spec.rb +6 -0
- data/spec/models/user_spec.rb +0 -6
- data/spec/models/variable_create_parameters_spec.rb +35 -0
- data/spec/models/variable_spec.rb +47 -0
- data/spec/models/variable_update_parameters_spec.rb +35 -0
- metadata +281 -169
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class NotificationsApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# List notifications
|
|
11
|
+
# List all notifications from the current user
|
|
12
|
+
# @param [Hash] opts the optional parameters
|
|
13
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
14
|
+
# @option opts [Integer] :page Page number
|
|
15
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
16
|
+
# @return [Array<Object>]
|
|
17
|
+
def notifications_list(opts = {})
|
|
18
|
+
data, _status_code, _headers = notifications_list_with_http_info(opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# List notifications
|
|
23
|
+
# List all notifications from the current user
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
26
|
+
# @option opts [Integer] :page Page number
|
|
27
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
28
|
+
# @return [Array<(Response<(Array<Object>)>, Integer, Hash)>] Response<(Array<Object>)> data, response status code and response headers
|
|
29
|
+
def notifications_list_with_http_info(opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_list ...'
|
|
32
|
+
end
|
|
33
|
+
# resource path
|
|
34
|
+
local_var_path = '/notifications'
|
|
35
|
+
|
|
36
|
+
# query parameters
|
|
37
|
+
query_params = opts[:query_params] || {}
|
|
38
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
39
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
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
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
46
|
+
|
|
47
|
+
# form parameters
|
|
48
|
+
form_params = opts[:form_params] || {}
|
|
49
|
+
|
|
50
|
+
# http body (model)
|
|
51
|
+
post_body = opts[:body]
|
|
52
|
+
|
|
53
|
+
# return_type
|
|
54
|
+
return_type = opts[:return_type] || 'Array<Object>'
|
|
55
|
+
|
|
56
|
+
# auth_names
|
|
57
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
58
|
+
|
|
59
|
+
new_options = opts.merge(
|
|
60
|
+
:header_params => header_params,
|
|
61
|
+
:query_params => query_params,
|
|
62
|
+
:form_params => form_params,
|
|
63
|
+
:body => post_body,
|
|
64
|
+
:auth_names => auth_names,
|
|
65
|
+
:return_type => return_type
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
69
|
+
if @api_client.config.debugging
|
|
70
|
+
@api_client.config.logger.debug "API called: NotificationsApi#notifications_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
71
|
+
end
|
|
72
|
+
response = ::Phrase::Response.new(data, headers)
|
|
73
|
+
return response, status_code, headers
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Mark all notifications as read
|
|
77
|
+
# Mark all notifications of the current user as read
|
|
78
|
+
# @param [Hash] opts the optional parameters
|
|
79
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
80
|
+
# @return [Array<Object>]
|
|
81
|
+
def notifications_mark_all_as_read(opts = {})
|
|
82
|
+
data, _status_code, _headers = notifications_mark_all_as_read_with_http_info(opts)
|
|
83
|
+
data
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Mark all notifications as read
|
|
87
|
+
# Mark all notifications of the current user as read
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
90
|
+
# @return [Array<(Response<(Array<Object>)>, Integer, Hash)>] Response<(Array<Object>)> data, response status code and response headers
|
|
91
|
+
def notifications_mark_all_as_read_with_http_info(opts = {})
|
|
92
|
+
if @api_client.config.debugging
|
|
93
|
+
@api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_mark_all_as_read ...'
|
|
94
|
+
end
|
|
95
|
+
# resource path
|
|
96
|
+
local_var_path = '/notifications/mark_all_as_read'
|
|
97
|
+
|
|
98
|
+
# query parameters
|
|
99
|
+
query_params = opts[:query_params] || {}
|
|
100
|
+
|
|
101
|
+
# header parameters
|
|
102
|
+
header_params = opts[:header_params] || {}
|
|
103
|
+
# HTTP header 'Accept' (if needed)
|
|
104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
105
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:body]
|
|
112
|
+
|
|
113
|
+
# return_type
|
|
114
|
+
return_type = opts[:return_type] || 'Array<Object>'
|
|
115
|
+
|
|
116
|
+
# auth_names
|
|
117
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
118
|
+
|
|
119
|
+
new_options = opts.merge(
|
|
120
|
+
:header_params => header_params,
|
|
121
|
+
:query_params => query_params,
|
|
122
|
+
:form_params => form_params,
|
|
123
|
+
:body => post_body,
|
|
124
|
+
:auth_names => auth_names,
|
|
125
|
+
:return_type => return_type
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
129
|
+
if @api_client.config.debugging
|
|
130
|
+
@api_client.config.logger.debug "API called: NotificationsApi#notifications_mark_all_as_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
131
|
+
end
|
|
132
|
+
response = ::Phrase::Response.new(data, headers)
|
|
133
|
+
return response, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Get a single notification
|
|
137
|
+
# Get details on a single notification.
|
|
138
|
+
# @param id [String] ID
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
141
|
+
# @return [Notification]
|
|
142
|
+
def notifications_show(id, opts = {})
|
|
143
|
+
data, _status_code, _headers = notifications_show_with_http_info(id, opts)
|
|
144
|
+
data
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Get a single notification
|
|
148
|
+
# Get details on a single notification.
|
|
149
|
+
# @param id [String] ID
|
|
150
|
+
# @param [Hash] opts the optional parameters
|
|
151
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
152
|
+
# @return [Array<(Response<(Notification)>, Integer, Hash)>] Response<(Notification)> data, response status code and response headers
|
|
153
|
+
def notifications_show_with_http_info(id, opts = {})
|
|
154
|
+
if @api_client.config.debugging
|
|
155
|
+
@api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_show ...'
|
|
156
|
+
end
|
|
157
|
+
# verify the required parameter 'id' is set
|
|
158
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
159
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling NotificationsApi.notifications_show"
|
|
160
|
+
end
|
|
161
|
+
# resource path
|
|
162
|
+
local_var_path = '/notifications/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
163
|
+
|
|
164
|
+
# query parameters
|
|
165
|
+
query_params = opts[:query_params] || {}
|
|
166
|
+
|
|
167
|
+
# header parameters
|
|
168
|
+
header_params = opts[:header_params] || {}
|
|
169
|
+
# HTTP header 'Accept' (if needed)
|
|
170
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
171
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
172
|
+
|
|
173
|
+
# form parameters
|
|
174
|
+
form_params = opts[:form_params] || {}
|
|
175
|
+
|
|
176
|
+
# http body (model)
|
|
177
|
+
post_body = opts[:body]
|
|
178
|
+
|
|
179
|
+
# return_type
|
|
180
|
+
return_type = opts[:return_type] || 'Notification'
|
|
181
|
+
|
|
182
|
+
# auth_names
|
|
183
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
184
|
+
|
|
185
|
+
new_options = opts.merge(
|
|
186
|
+
:header_params => header_params,
|
|
187
|
+
:query_params => query_params,
|
|
188
|
+
:form_params => form_params,
|
|
189
|
+
:body => post_body,
|
|
190
|
+
:auth_names => auth_names,
|
|
191
|
+
:return_type => return_type
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
195
|
+
if @api_client.config.debugging
|
|
196
|
+
@api_client.config.logger.debug "API called: NotificationsApi#notifications_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
197
|
+
end
|
|
198
|
+
response = ::Phrase::Response.new(data, headers)
|
|
199
|
+
return response, status_code, headers
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
@@ -285,6 +285,9 @@ module Phrase
|
|
|
285
285
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
286
286
|
# @option opts [Integer] :page Page number
|
|
287
287
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
288
|
+
# @option opts [String] :account_id Filter by Account ID
|
|
289
|
+
# @option opts [String] :sort_by Sort projects. Valid options are \"name_asc\", \"name_desc\", \"updated_at_asc\", \"updated_at_desc\", \"space_asc\" and \"space_desc\".
|
|
290
|
+
# @option opts [Array<String>] :filters Filter projects. Valid options are [\"favorites\"].
|
|
288
291
|
# @return [Array<Project>]
|
|
289
292
|
def projects_list(opts = {})
|
|
290
293
|
data, _status_code, _headers = projects_list_with_http_info(opts)
|
|
@@ -297,6 +300,9 @@ module Phrase
|
|
|
297
300
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
298
301
|
# @option opts [Integer] :page Page number
|
|
299
302
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
303
|
+
# @option opts [String] :account_id Filter by Account ID
|
|
304
|
+
# @option opts [String] :sort_by Sort projects. Valid options are \"name_asc\", \"name_desc\", \"updated_at_asc\", \"updated_at_desc\", \"space_asc\" and \"space_desc\".
|
|
305
|
+
# @option opts [Array<String>] :filters Filter projects. Valid options are [\"favorites\"].
|
|
300
306
|
# @return [Array<(Response<(Array<Project>)>, Integer, Hash)>] Response<(Array<Project>)> data, response status code and response headers
|
|
301
307
|
def projects_list_with_http_info(opts = {})
|
|
302
308
|
if @api_client.config.debugging
|
|
@@ -309,6 +315,9 @@ module Phrase
|
|
|
309
315
|
query_params = opts[:query_params] || {}
|
|
310
316
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
311
317
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
318
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
319
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
320
|
+
query_params[:'filters'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
|
312
321
|
|
|
313
322
|
# header parameters
|
|
314
323
|
header_params = opts[:header_params] || {}
|
|
@@ -93,6 +93,7 @@ module Phrase
|
|
|
93
93
|
# @param screenshot_id [String] Screenshot ID
|
|
94
94
|
# @param [Hash] opts the optional parameters
|
|
95
95
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
96
|
+
# @option opts [String] :branch specify the branch to use
|
|
96
97
|
# @return [nil]
|
|
97
98
|
def screenshot_marker_delete(project_id, screenshot_id, opts = {})
|
|
98
99
|
data, _status_code, _headers = screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts)
|
|
@@ -105,6 +106,7 @@ module Phrase
|
|
|
105
106
|
# @param screenshot_id [String] Screenshot ID
|
|
106
107
|
# @param [Hash] opts the optional parameters
|
|
107
108
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
109
|
+
# @option opts [String] :branch specify the branch to use
|
|
108
110
|
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
109
111
|
def screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts = {})
|
|
110
112
|
if @api_client.config.debugging
|
|
@@ -123,6 +125,7 @@ module Phrase
|
|
|
123
125
|
|
|
124
126
|
# query parameters
|
|
125
127
|
query_params = opts[:query_params] || {}
|
|
128
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
126
129
|
|
|
127
130
|
# header parameters
|
|
128
131
|
header_params = opts[:header_params] || {}
|
|
@@ -164,6 +167,7 @@ module Phrase
|
|
|
164
167
|
# @param id [String] ID
|
|
165
168
|
# @param [Hash] opts the optional parameters
|
|
166
169
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
170
|
+
# @option opts [String] :branch specify the branch to use
|
|
167
171
|
# @return [ScreenshotMarker]
|
|
168
172
|
def screenshot_marker_show(project_id, screenshot_id, id, opts = {})
|
|
169
173
|
data, _status_code, _headers = screenshot_marker_show_with_http_info(project_id, screenshot_id, id, opts)
|
|
@@ -177,6 +181,7 @@ module Phrase
|
|
|
177
181
|
# @param id [String] ID
|
|
178
182
|
# @param [Hash] opts the optional parameters
|
|
179
183
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
184
|
+
# @option opts [String] :branch specify the branch to use
|
|
180
185
|
# @return [Array<(Response<(ScreenshotMarker)>, Integer, Hash)>] Response<(ScreenshotMarker)> data, response status code and response headers
|
|
181
186
|
def screenshot_marker_show_with_http_info(project_id, screenshot_id, id, opts = {})
|
|
182
187
|
if @api_client.config.debugging
|
|
@@ -199,6 +204,7 @@ module Phrase
|
|
|
199
204
|
|
|
200
205
|
# query parameters
|
|
201
206
|
query_params = opts[:query_params] || {}
|
|
207
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
202
208
|
|
|
203
209
|
# header parameters
|
|
204
210
|
header_params = opts[:header_params] || {}
|
|
@@ -323,6 +329,7 @@ module Phrase
|
|
|
323
329
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
324
330
|
# @option opts [Integer] :page Page number
|
|
325
331
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
332
|
+
# @option opts [String] :branch specify the branch to use
|
|
326
333
|
# @return [Array<ScreenshotMarker>]
|
|
327
334
|
def screenshot_markers_list(project_id, id, opts = {})
|
|
328
335
|
data, _status_code, _headers = screenshot_markers_list_with_http_info(project_id, id, opts)
|
|
@@ -337,6 +344,7 @@ module Phrase
|
|
|
337
344
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
338
345
|
# @option opts [Integer] :page Page number
|
|
339
346
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
347
|
+
# @option opts [String] :branch specify the branch to use
|
|
340
348
|
# @return [Array<(Response<(Array<ScreenshotMarker>)>, Integer, Hash)>] Response<(Array<ScreenshotMarker>)> data, response status code and response headers
|
|
341
349
|
def screenshot_markers_list_with_http_info(project_id, id, opts = {})
|
|
342
350
|
if @api_client.config.debugging
|
|
@@ -357,6 +365,7 @@ module Phrase
|
|
|
357
365
|
query_params = opts[:query_params] || {}
|
|
358
366
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
359
367
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
368
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
360
369
|
|
|
361
370
|
# header parameters
|
|
362
371
|
header_params = opts[:header_params] || {}
|
|
@@ -87,6 +87,7 @@ module Phrase
|
|
|
87
87
|
# @param id [String] ID
|
|
88
88
|
# @param [Hash] opts the optional parameters
|
|
89
89
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
90
|
+
# @option opts [String] :branch specify the branch to use
|
|
90
91
|
# @return [nil]
|
|
91
92
|
def screenshot_delete(project_id, id, opts = {})
|
|
92
93
|
data, _status_code, _headers = screenshot_delete_with_http_info(project_id, id, opts)
|
|
@@ -99,6 +100,7 @@ module Phrase
|
|
|
99
100
|
# @param id [String] ID
|
|
100
101
|
# @param [Hash] opts the optional parameters
|
|
101
102
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
103
|
+
# @option opts [String] :branch specify the branch to use
|
|
102
104
|
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
103
105
|
def screenshot_delete_with_http_info(project_id, id, opts = {})
|
|
104
106
|
if @api_client.config.debugging
|
|
@@ -117,6 +119,7 @@ module Phrase
|
|
|
117
119
|
|
|
118
120
|
# query parameters
|
|
119
121
|
query_params = opts[:query_params] || {}
|
|
122
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
120
123
|
|
|
121
124
|
# header parameters
|
|
122
125
|
header_params = opts[:header_params] || {}
|
|
@@ -157,6 +160,7 @@ module Phrase
|
|
|
157
160
|
# @param id [String] ID
|
|
158
161
|
# @param [Hash] opts the optional parameters
|
|
159
162
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
163
|
+
# @option opts [String] :branch specify the branch to use
|
|
160
164
|
# @return [Screenshot]
|
|
161
165
|
def screenshot_show(project_id, id, opts = {})
|
|
162
166
|
data, _status_code, _headers = screenshot_show_with_http_info(project_id, id, opts)
|
|
@@ -169,6 +173,7 @@ module Phrase
|
|
|
169
173
|
# @param id [String] ID
|
|
170
174
|
# @param [Hash] opts the optional parameters
|
|
171
175
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
176
|
+
# @option opts [String] :branch specify the branch to use
|
|
172
177
|
# @return [Array<(Response<(Screenshot)>, Integer, Hash)>] Response<(Screenshot)> data, response status code and response headers
|
|
173
178
|
def screenshot_show_with_http_info(project_id, id, opts = {})
|
|
174
179
|
if @api_client.config.debugging
|
|
@@ -187,6 +192,7 @@ module Phrase
|
|
|
187
192
|
|
|
188
193
|
# query parameters
|
|
189
194
|
query_params = opts[:query_params] || {}
|
|
195
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
190
196
|
|
|
191
197
|
# header parameters
|
|
192
198
|
header_params = opts[:header_params] || {}
|
|
@@ -310,6 +316,7 @@ module Phrase
|
|
|
310
316
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
311
317
|
# @option opts [Integer] :page Page number
|
|
312
318
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
319
|
+
# @option opts [String] :branch specify the branch to use
|
|
313
320
|
# @option opts [String] :key_id filter by key
|
|
314
321
|
# @return [Array<Screenshot>]
|
|
315
322
|
def screenshots_list(project_id, opts = {})
|
|
@@ -324,6 +331,7 @@ module Phrase
|
|
|
324
331
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
325
332
|
# @option opts [Integer] :page Page number
|
|
326
333
|
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
|
|
334
|
+
# @option opts [String] :branch specify the branch to use
|
|
327
335
|
# @option opts [String] :key_id filter by key
|
|
328
336
|
# @return [Array<(Response<(Array<Screenshot>)>, Integer, Hash)>] Response<(Array<Screenshot>)> data, response status code and response headers
|
|
329
337
|
def screenshots_list_with_http_info(project_id, opts = {})
|
|
@@ -341,6 +349,7 @@ module Phrase
|
|
|
341
349
|
query_params = opts[:query_params] || {}
|
|
342
350
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
343
351
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
352
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
344
353
|
query_params[:'key_id'] = opts[:'key_id'] if !opts[:'key_id'].nil?
|
|
345
354
|
|
|
346
355
|
# header parameters
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class SearchApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Search across projects
|
|
11
|
+
# Search for keys and translations in all account projects
|
|
12
|
+
# @param account_id [String] Account ID
|
|
13
|
+
# @param search_in_account_parameters [SearchInAccountParameters]
|
|
14
|
+
# @param [Hash] opts the optional parameters
|
|
15
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
+
# @return [AccountSearchResult]
|
|
17
|
+
def search_in_account(account_id, search_in_account_parameters, opts = {})
|
|
18
|
+
data, _status_code, _headers = search_in_account_with_http_info(account_id, search_in_account_parameters, opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Search across projects
|
|
23
|
+
# Search for keys and translations in all account projects
|
|
24
|
+
# @param account_id [String] Account ID
|
|
25
|
+
# @param search_in_account_parameters [SearchInAccountParameters]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
+
# @return [Array<(Response<(AccountSearchResult)>, Integer, Hash)>] Response<(AccountSearchResult)> data, response status code and response headers
|
|
29
|
+
def search_in_account_with_http_info(account_id, search_in_account_parameters, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: SearchApi.search_in_account ...'
|
|
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 SearchApi.search_in_account"
|
|
36
|
+
end
|
|
37
|
+
# verify the required parameter 'search_in_account_parameters' is set
|
|
38
|
+
if @api_client.config.client_side_validation && search_in_account_parameters.nil?
|
|
39
|
+
fail ArgumentError, "Missing the required parameter 'search_in_account_parameters' when calling SearchApi.search_in_account"
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/accounts/{account_id}/search'.sub('{' + 'account_id' + '}', CGI.escape(account_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
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
53
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = opts[:form_params] || {}
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = opts[:body] || @api_client.object_to_http_body(search_in_account_parameters)
|
|
60
|
+
|
|
61
|
+
# return_type
|
|
62
|
+
return_type = opts[:return_type] || 'AccountSearchResult'
|
|
63
|
+
|
|
64
|
+
# auth_names
|
|
65
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
66
|
+
|
|
67
|
+
new_options = opts.merge(
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: SearchApi#search_in_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
response = ::Phrase::Response.new(data, headers)
|
|
81
|
+
return response, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|