phrase 1.0.14 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +48 -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/JobCreateParameters.md +2 -0
- data/docs/JobDetails.md +2 -0
- data/docs/JobDetails1.md +2 -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 +78 -7
- 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/ProjectsApi.md +7 -1
- 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/lib/phrase.rb +24 -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 +85 -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/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/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_create_parameters.rb +11 -1
- data/lib/phrase/models/job_details.rb +10 -1
- data/lib/phrase/models/job_details1.rb +10 -1
- 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/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/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 +19 -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/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/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_create_parameters_spec.rb +6 -0
- data/spec/models/job_details1_spec.rb +6 -0
- data/spec/models/job_details_spec.rb +6 -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/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
- metadata +263 -167
@@ -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] || {}
|
@@ -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
|
@@ -823,8 +823,8 @@ module Phrase
|
|
823
823
|
# @param [Hash] opts the optional parameters
|
824
824
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
825
825
|
# @return [AffectedCount]
|
826
|
-
def
|
827
|
-
data, _status_code, _headers =
|
826
|
+
def translations_exclude_collection(project_id, translations_exclude_parameters, opts = {})
|
827
|
+
data, _status_code, _headers = translations_exclude_collection_with_http_info(project_id, translations_exclude_parameters, opts)
|
828
828
|
data
|
829
829
|
end
|
830
830
|
|
@@ -835,17 +835,17 @@ module Phrase
|
|
835
835
|
# @param [Hash] opts the optional parameters
|
836
836
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
837
837
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
838
|
-
def
|
838
|
+
def translations_exclude_collection_with_http_info(project_id, translations_exclude_parameters, opts = {})
|
839
839
|
if @api_client.config.debugging
|
840
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
840
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_exclude_collection ...'
|
841
841
|
end
|
842
842
|
# verify the required parameter 'project_id' is set
|
843
843
|
if @api_client.config.client_side_validation && project_id.nil?
|
844
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
844
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_exclude_collection"
|
845
845
|
end
|
846
846
|
# verify the required parameter 'translations_exclude_parameters' is set
|
847
847
|
if @api_client.config.client_side_validation && translations_exclude_parameters.nil?
|
848
|
-
fail ArgumentError, "Missing the required parameter 'translations_exclude_parameters' when calling TranslationsApi.
|
848
|
+
fail ArgumentError, "Missing the required parameter 'translations_exclude_parameters' when calling TranslationsApi.translations_exclude_collection"
|
849
849
|
end
|
850
850
|
# resource path
|
851
851
|
local_var_path = '/projects/{project_id}/translations/exclude'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -884,7 +884,7 @@ module Phrase
|
|
884
884
|
|
885
885
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
886
886
|
if @api_client.config.debugging
|
887
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
887
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_exclude_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
888
888
|
end
|
889
889
|
response = ::Phrase::Response.new(data, headers)
|
890
890
|
return response, status_code, headers
|
@@ -897,8 +897,8 @@ module Phrase
|
|
897
897
|
# @param [Hash] opts the optional parameters
|
898
898
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
899
899
|
# @return [AffectedCount]
|
900
|
-
def
|
901
|
-
data, _status_code, _headers =
|
900
|
+
def translations_include_collection(project_id, translations_include_parameters, opts = {})
|
901
|
+
data, _status_code, _headers = translations_include_collection_with_http_info(project_id, translations_include_parameters, opts)
|
902
902
|
data
|
903
903
|
end
|
904
904
|
|
@@ -909,17 +909,17 @@ module Phrase
|
|
909
909
|
# @param [Hash] opts the optional parameters
|
910
910
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
911
911
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
912
|
-
def
|
912
|
+
def translations_include_collection_with_http_info(project_id, translations_include_parameters, opts = {})
|
913
913
|
if @api_client.config.debugging
|
914
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
914
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_include_collection ...'
|
915
915
|
end
|
916
916
|
# verify the required parameter 'project_id' is set
|
917
917
|
if @api_client.config.client_side_validation && project_id.nil?
|
918
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
918
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_include_collection"
|
919
919
|
end
|
920
920
|
# verify the required parameter 'translations_include_parameters' is set
|
921
921
|
if @api_client.config.client_side_validation && translations_include_parameters.nil?
|
922
|
-
fail ArgumentError, "Missing the required parameter 'translations_include_parameters' when calling TranslationsApi.
|
922
|
+
fail ArgumentError, "Missing the required parameter 'translations_include_parameters' when calling TranslationsApi.translations_include_collection"
|
923
923
|
end
|
924
924
|
# resource path
|
925
925
|
local_var_path = '/projects/{project_id}/translations/include'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -958,7 +958,7 @@ module Phrase
|
|
958
958
|
|
959
959
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
960
960
|
if @api_client.config.debugging
|
961
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
961
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_include_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
962
962
|
end
|
963
963
|
response = ::Phrase::Response.new(data, headers)
|
964
964
|
return response, status_code, headers
|
@@ -1055,8 +1055,8 @@ module Phrase
|
|
1055
1055
|
# @param [Hash] opts the optional parameters
|
1056
1056
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1057
1057
|
# @return [AffectedCount]
|
1058
|
-
def
|
1059
|
-
data, _status_code, _headers =
|
1058
|
+
def translations_review_collection(project_id, translations_review_parameters, opts = {})
|
1059
|
+
data, _status_code, _headers = translations_review_collection_with_http_info(project_id, translations_review_parameters, opts)
|
1060
1060
|
data
|
1061
1061
|
end
|
1062
1062
|
|
@@ -1067,17 +1067,17 @@ module Phrase
|
|
1067
1067
|
# @param [Hash] opts the optional parameters
|
1068
1068
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1069
1069
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
1070
|
-
def
|
1070
|
+
def translations_review_collection_with_http_info(project_id, translations_review_parameters, opts = {})
|
1071
1071
|
if @api_client.config.debugging
|
1072
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
1072
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_review_collection ...'
|
1073
1073
|
end
|
1074
1074
|
# verify the required parameter 'project_id' is set
|
1075
1075
|
if @api_client.config.client_side_validation && project_id.nil?
|
1076
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
1076
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_review_collection"
|
1077
1077
|
end
|
1078
1078
|
# verify the required parameter 'translations_review_parameters' is set
|
1079
1079
|
if @api_client.config.client_side_validation && translations_review_parameters.nil?
|
1080
|
-
fail ArgumentError, "Missing the required parameter 'translations_review_parameters' when calling TranslationsApi.
|
1080
|
+
fail ArgumentError, "Missing the required parameter 'translations_review_parameters' when calling TranslationsApi.translations_review_collection"
|
1081
1081
|
end
|
1082
1082
|
# resource path
|
1083
1083
|
local_var_path = '/projects/{project_id}/translations/review'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -1116,7 +1116,7 @@ module Phrase
|
|
1116
1116
|
|
1117
1117
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1118
1118
|
if @api_client.config.debugging
|
1119
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
1119
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_review_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1120
1120
|
end
|
1121
1121
|
response = ::Phrase::Response.new(data, headers)
|
1122
1122
|
return response, status_code, headers
|
@@ -1209,8 +1209,8 @@ module Phrase
|
|
1209
1209
|
# @param [Hash] opts the optional parameters
|
1210
1210
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1211
1211
|
# @return [AffectedCount]
|
1212
|
-
def
|
1213
|
-
data, _status_code, _headers =
|
1212
|
+
def translations_unverify_collection(project_id, translations_unverify_parameters, opts = {})
|
1213
|
+
data, _status_code, _headers = translations_unverify_collection_with_http_info(project_id, translations_unverify_parameters, opts)
|
1214
1214
|
data
|
1215
1215
|
end
|
1216
1216
|
|
@@ -1221,17 +1221,17 @@ module Phrase
|
|
1221
1221
|
# @param [Hash] opts the optional parameters
|
1222
1222
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1223
1223
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
1224
|
-
def
|
1224
|
+
def translations_unverify_collection_with_http_info(project_id, translations_unverify_parameters, opts = {})
|
1225
1225
|
if @api_client.config.debugging
|
1226
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
1226
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_unverify_collection ...'
|
1227
1227
|
end
|
1228
1228
|
# verify the required parameter 'project_id' is set
|
1229
1229
|
if @api_client.config.client_side_validation && project_id.nil?
|
1230
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
1230
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_unverify_collection"
|
1231
1231
|
end
|
1232
1232
|
# verify the required parameter 'translations_unverify_parameters' is set
|
1233
1233
|
if @api_client.config.client_side_validation && translations_unverify_parameters.nil?
|
1234
|
-
fail ArgumentError, "Missing the required parameter 'translations_unverify_parameters' when calling TranslationsApi.
|
1234
|
+
fail ArgumentError, "Missing the required parameter 'translations_unverify_parameters' when calling TranslationsApi.translations_unverify_collection"
|
1235
1235
|
end
|
1236
1236
|
# resource path
|
1237
1237
|
local_var_path = '/projects/{project_id}/translations/unverify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -1270,7 +1270,7 @@ module Phrase
|
|
1270
1270
|
|
1271
1271
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1272
1272
|
if @api_client.config.debugging
|
1273
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
1273
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_unverify_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1274
1274
|
end
|
1275
1275
|
response = ::Phrase::Response.new(data, headers)
|
1276
1276
|
return response, status_code, headers
|
@@ -1283,8 +1283,8 @@ module Phrase
|
|
1283
1283
|
# @param [Hash] opts the optional parameters
|
1284
1284
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1285
1285
|
# @return [AffectedCount]
|
1286
|
-
def
|
1287
|
-
data, _status_code, _headers =
|
1286
|
+
def translations_verify_collection(project_id, translations_verify_parameters, opts = {})
|
1287
|
+
data, _status_code, _headers = translations_verify_collection_with_http_info(project_id, translations_verify_parameters, opts)
|
1288
1288
|
data
|
1289
1289
|
end
|
1290
1290
|
|
@@ -1295,17 +1295,17 @@ module Phrase
|
|
1295
1295
|
# @param [Hash] opts the optional parameters
|
1296
1296
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
1297
1297
|
# @return [Array<(Response<(AffectedCount)>, Integer, Hash)>] Response<(AffectedCount)> data, response status code and response headers
|
1298
|
-
def
|
1298
|
+
def translations_verify_collection_with_http_info(project_id, translations_verify_parameters, opts = {})
|
1299
1299
|
if @api_client.config.debugging
|
1300
|
-
@api_client.config.logger.debug 'Calling API: TranslationsApi.
|
1300
|
+
@api_client.config.logger.debug 'Calling API: TranslationsApi.translations_verify_collection ...'
|
1301
1301
|
end
|
1302
1302
|
# verify the required parameter 'project_id' is set
|
1303
1303
|
if @api_client.config.client_side_validation && project_id.nil?
|
1304
|
-
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.
|
1304
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling TranslationsApi.translations_verify_collection"
|
1305
1305
|
end
|
1306
1306
|
# verify the required parameter 'translations_verify_parameters' is set
|
1307
1307
|
if @api_client.config.client_side_validation && translations_verify_parameters.nil?
|
1308
|
-
fail ArgumentError, "Missing the required parameter 'translations_verify_parameters' when calling TranslationsApi.
|
1308
|
+
fail ArgumentError, "Missing the required parameter 'translations_verify_parameters' when calling TranslationsApi.translations_verify_collection"
|
1309
1309
|
end
|
1310
1310
|
# resource path
|
1311
1311
|
local_var_path = '/projects/{project_id}/translations/verify'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
@@ -1344,7 +1344,7 @@ module Phrase
|
|
1344
1344
|
|
1345
1345
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1346
1346
|
if @api_client.config.debugging
|
1347
|
-
@api_client.config.logger.debug "API called: TranslationsApi#
|
1347
|
+
@api_client.config.logger.debug "API called: TranslationsApi#translations_verify_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1348
1348
|
end
|
1349
1349
|
response = ::Phrase::Response.new(data, headers)
|
1350
1350
|
return response, status_code, headers
|
data/lib/phrase/api/users_api.rb
CHANGED
@@ -11,7 +11,7 @@ module Phrase
|
|
11
11
|
# Show details for current User.
|
12
12
|
# @param [Hash] opts the optional parameters
|
13
13
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
14
|
-
# @return [
|
14
|
+
# @return [CurrentUser]
|
15
15
|
def show_user(opts = {})
|
16
16
|
data, _status_code, _headers = show_user_with_http_info(opts)
|
17
17
|
data
|
@@ -21,7 +21,7 @@ module Phrase
|
|
21
21
|
# Show details for current User.
|
22
22
|
# @param [Hash] opts the optional parameters
|
23
23
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
24
|
-
# @return [Array<(Response<(
|
24
|
+
# @return [Array<(Response<(CurrentUser)>, Integer, Hash)>] Response<(CurrentUser)> data, response status code and response headers
|
25
25
|
def show_user_with_http_info(opts = {})
|
26
26
|
if @api_client.config.debugging
|
27
27
|
@api_client.config.logger.debug 'Calling API: UsersApi.show_user ...'
|
@@ -45,7 +45,7 @@ module Phrase
|
|
45
45
|
post_body = opts[:body]
|
46
46
|
|
47
47
|
# return_type
|
48
|
-
return_type = opts[:return_type] || '
|
48
|
+
return_type = opts[:return_type] || 'CurrentUser'
|
49
49
|
|
50
50
|
# auth_names
|
51
51
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
@@ -14,6 +14,8 @@ module Phrase
|
|
14
14
|
|
15
15
|
attr_accessor :updated_at
|
16
16
|
|
17
|
+
attr_accessor :company_logo_url
|
18
|
+
|
17
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
18
20
|
def self.attribute_map
|
19
21
|
{
|
@@ -22,7 +24,8 @@ module Phrase
|
|
22
24
|
:'slug' => :'slug',
|
23
25
|
:'company' => :'company',
|
24
26
|
:'created_at' => :'created_at',
|
25
|
-
:'updated_at' => :'updated_at'
|
27
|
+
:'updated_at' => :'updated_at',
|
28
|
+
:'company_logo_url' => :'company_logo_url'
|
26
29
|
}
|
27
30
|
end
|
28
31
|
|
@@ -34,7 +37,8 @@ module Phrase
|
|
34
37
|
:'slug' => :'String',
|
35
38
|
:'company' => :'String',
|
36
39
|
:'created_at' => :'DateTime',
|
37
|
-
:'updated_at' => :'DateTime'
|
40
|
+
:'updated_at' => :'DateTime',
|
41
|
+
:'company_logo_url' => :'String'
|
38
42
|
}
|
39
43
|
end
|
40
44
|
|
@@ -82,6 +86,10 @@ module Phrase
|
|
82
86
|
if attributes.key?(:'updated_at')
|
83
87
|
self.updated_at = attributes[:'updated_at']
|
84
88
|
end
|
89
|
+
|
90
|
+
if attributes.key?(:'company_logo_url')
|
91
|
+
self.company_logo_url = attributes[:'company_logo_url']
|
92
|
+
end
|
85
93
|
end
|
86
94
|
|
87
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -107,7 +115,8 @@ module Phrase
|
|
107
115
|
slug == o.slug &&
|
108
116
|
company == o.company &&
|
109
117
|
created_at == o.created_at &&
|
110
|
-
updated_at == o.updated_at
|
118
|
+
updated_at == o.updated_at &&
|
119
|
+
company_logo_url == o.company_logo_url
|
111
120
|
end
|
112
121
|
|
113
122
|
# @see the `==` method
|
@@ -119,7 +128,7 @@ module Phrase
|
|
119
128
|
# Calculates hash code according to all attributes.
|
120
129
|
# @return [Integer] Hash code
|
121
130
|
def hash
|
122
|
-
[id, name, slug, company, created_at, updated_at].hash
|
131
|
+
[id, name, slug, company, created_at, updated_at, company_logo_url].hash
|
123
132
|
end
|
124
133
|
|
125
134
|
# Builds the object from hash
|
@@ -14,6 +14,10 @@ module Phrase
|
|
14
14
|
|
15
15
|
attr_accessor :updated_at
|
16
16
|
|
17
|
+
attr_accessor :company_logo_url
|
18
|
+
|
19
|
+
attr_accessor :subscription
|
20
|
+
|
17
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
18
22
|
def self.attribute_map
|
19
23
|
{
|
@@ -22,7 +26,9 @@ module Phrase
|
|
22
26
|
:'slug' => :'slug',
|
23
27
|
:'company' => :'company',
|
24
28
|
:'created_at' => :'created_at',
|
25
|
-
:'updated_at' => :'updated_at'
|
29
|
+
:'updated_at' => :'updated_at',
|
30
|
+
:'company_logo_url' => :'company_logo_url',
|
31
|
+
:'subscription' => :'subscription'
|
26
32
|
}
|
27
33
|
end
|
28
34
|
|
@@ -34,7 +40,9 @@ module Phrase
|
|
34
40
|
:'slug' => :'String',
|
35
41
|
:'company' => :'String',
|
36
42
|
:'created_at' => :'DateTime',
|
37
|
-
:'updated_at' => :'DateTime'
|
43
|
+
:'updated_at' => :'DateTime',
|
44
|
+
:'company_logo_url' => :'String',
|
45
|
+
:'subscription' => :'Subscription'
|
38
46
|
}
|
39
47
|
end
|
40
48
|
|
@@ -90,6 +98,14 @@ module Phrase
|
|
90
98
|
if attributes.key?(:'updated_at')
|
91
99
|
self.updated_at = attributes[:'updated_at']
|
92
100
|
end
|
101
|
+
|
102
|
+
if attributes.key?(:'company_logo_url')
|
103
|
+
self.company_logo_url = attributes[:'company_logo_url']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'subscription')
|
107
|
+
self.subscription = attributes[:'subscription']
|
108
|
+
end
|
93
109
|
end
|
94
110
|
|
95
111
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -115,7 +131,9 @@ module Phrase
|
|
115
131
|
slug == o.slug &&
|
116
132
|
company == o.company &&
|
117
133
|
created_at == o.created_at &&
|
118
|
-
updated_at == o.updated_at
|
134
|
+
updated_at == o.updated_at &&
|
135
|
+
company_logo_url == o.company_logo_url &&
|
136
|
+
subscription == o.subscription
|
119
137
|
end
|
120
138
|
|
121
139
|
# @see the `==` method
|
@@ -127,7 +145,7 @@ module Phrase
|
|
127
145
|
# Calculates hash code according to all attributes.
|
128
146
|
# @return [Integer] Hash code
|
129
147
|
def hash
|
130
|
-
[id, name, slug, company, created_at, updated_at].hash
|
148
|
+
[id, name, slug, company, created_at, updated_at, company_logo_url, subscription].hash
|
131
149
|
end
|
132
150
|
|
133
151
|
# Builds the object from hash
|