phrase 1.0.1 → 1.0.2
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 +50 -387
- data/docs/AccountsApi.md +2 -4
- data/docs/AuthorizationsApi.md +10 -14
- data/docs/BitbucketSyncApi.md +3 -6
- data/docs/BlacklistedKeysApi.md +10 -14
- data/docs/BranchesApi.md +12 -18
- data/docs/CommentsApi.md +13 -20
- data/docs/DistributionsApi.md +10 -14
- data/docs/FormatsApi.md +1 -2
- data/docs/GitLabSyncApi.md +7 -14
- data/docs/{GlossaryApi.md → GlossariesApi.md} +26 -30
- data/docs/GlossaryTermTranslationsApi.md +8 -10
- data/docs/GlossaryTermsApi.md +10 -14
- data/docs/InvitationsApi.md +11 -16
- data/docs/JobLocalesApi.md +12 -18
- data/docs/JobsApi.md +15 -24
- data/docs/KeysApi.md +18 -26
- data/docs/KeysSearchParameters.md +1 -1
- data/docs/KeysTagParameters.md +1 -1
- data/docs/KeysUntagParameters.md +1 -1
- data/docs/LocalesApi.md +13 -18
- data/docs/MembersApi.md +4 -8
- data/docs/OrdersApi.md +10 -14
- data/docs/ProjectCreateParameters.md +3 -1
- data/docs/ProjectsApi.md +10 -14
- data/docs/ReleasesApi.md +11 -16
- data/docs/ScreenshotMarkersApi.md +10 -14
- data/docs/ScreenshotsApi.md +10 -14
- data/docs/SpacesApi.md +13 -20
- data/docs/StyleGuidesApi.md +10 -14
- data/docs/TagsApi.md +9 -12
- data/docs/Team.md +29 -0
- data/docs/TeamCreateParameters.md +17 -0
- data/docs/TeamDetail.md +29 -0
- data/docs/TeamUpdateParameters.md +17 -0
- data/docs/TeamsApi.md +721 -0
- data/docs/TeamsProjectsCreateParameters.md +17 -0
- data/docs/TeamsSpacesCreateParameters.md +17 -0
- data/docs/TeamsUsersCreateParameters.md +17 -0
- data/docs/TranslationsApi.md +28 -44
- data/docs/TranslationsExcludeParameters.md +1 -1
- data/docs/TranslationsIncludeParameters.md +1 -1
- data/docs/TranslationsReviewParameters.md +1 -1
- data/docs/TranslationsSearchParameters.md +1 -1
- data/docs/TranslationsUnverifyParameters.md +1 -1
- data/docs/TranslationsVerifyParameters.md +1 -1
- data/docs/UploadCreateParameters.md +2 -2
- data/docs/UploadsApi.md +12 -10
- data/docs/UsersApi.md +1 -2
- data/docs/VersionsHistoryApi.md +2 -4
- data/docs/WebhooksApi.md +11 -16
- data/git_push.sh +2 -2
- data/lib/phrase.rb +9 -1
- data/lib/phrase/api/authorizations_api.rb +10 -8
- data/lib/phrase/api/bitbucket_sync_api.rb +3 -3
- data/lib/phrase/api/blacklisted_keys_api.rb +10 -8
- data/lib/phrase/api/branches_api.rb +16 -14
- data/lib/phrase/api/comments_api.rb +19 -17
- data/lib/phrase/api/distributions_api.rb +10 -8
- data/lib/phrase/api/git_lab_sync_api.rb +3 -3
- data/lib/phrase/api/{glossary_api.rb → glossaries_api.rb} +31 -29
- data/lib/phrase/api/glossary_term_translations_api.rb +10 -8
- data/lib/phrase/api/glossary_terms_api.rb +10 -8
- data/lib/phrase/api/invitations_api.rb +10 -8
- data/lib/phrase/api/job_locales_api.rb +10 -8
- data/lib/phrase/api/jobs_api.rb +13 -11
- data/lib/phrase/api/keys_api.rb +14 -12
- data/lib/phrase/api/locales_api.rb +15 -13
- data/lib/phrase/api/members_api.rb +3 -3
- data/lib/phrase/api/orders_api.rb +10 -8
- data/lib/phrase/api/projects_api.rb +10 -8
- data/lib/phrase/api/releases_api.rb +10 -8
- data/lib/phrase/api/screenshot_markers_api.rb +10 -8
- data/lib/phrase/api/screenshots_api.rb +10 -8
- data/lib/phrase/api/spaces_api.rb +16 -14
- data/lib/phrase/api/style_guides_api.rb +10 -8
- data/lib/phrase/api/tags_api.rb +10 -8
- data/lib/phrase/api/teams_api.rb +840 -0
- data/lib/phrase/api/translations_api.rb +13 -11
- data/lib/phrase/api/uploads_api.rb +13 -5
- data/lib/phrase/api/webhooks_api.rb +13 -11
- data/lib/phrase/models/keys_search_parameters.rb +1 -1
- data/lib/phrase/models/keys_tag_parameters.rb +1 -1
- data/lib/phrase/models/keys_untag_parameters.rb +1 -1
- data/lib/phrase/models/project_create_parameters.rb +14 -4
- data/lib/phrase/models/team.rb +254 -0
- data/lib/phrase/models/team_create_parameters.rb +195 -0
- data/lib/phrase/models/team_detail.rb +254 -0
- data/lib/phrase/models/team_update_parameters.rb +195 -0
- data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
- data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
- data/lib/phrase/models/translations_exclude_parameters.rb +1 -1
- data/lib/phrase/models/translations_include_parameters.rb +1 -1
- data/lib/phrase/models/translations_review_parameters.rb +1 -1
- data/lib/phrase/models/translations_search_parameters.rb +1 -1
- data/lib/phrase/models/translations_unverify_parameters.rb +1 -1
- data/lib/phrase/models/translations_verify_parameters.rb +1 -1
- data/lib/phrase/models/upload_create_parameters.rb +4 -8
- data/lib/phrase/version.rb +1 -1
- data/spec/api/authorizations_api_spec.rb +1 -1
- data/spec/api/blacklisted_keys_api_spec.rb +1 -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/{glossary_api_spec.rb → glossaries_api_spec.rb} +7 -7
- data/spec/api/glossary_term_translations_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 +1 -1
- data/spec/api/keys_api_spec.rb +3 -3
- data/spec/api/locales_api_spec.rb +2 -2
- 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 +1 -1
- data/spec/api/spaces_api_spec.rb +1 -1
- 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 +185 -0
- data/spec/api/translations_api_spec.rb +4 -4
- data/spec/api/uploads_api_spec.rb +3 -1
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/project_create_parameters_spec.rb +6 -0
- data/spec/models/team_create_parameters_spec.rb +29 -0
- data/spec/models/team_detail_spec.rb +65 -0
- data/spec/models/team_spec.rb +65 -0
- data/spec/models/team_update_parameters_spec.rb +29 -0
- data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
- data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
- data/spec/models/teams_users_create_parameters_spec.rb +29 -0
- metadata +183 -151
|
@@ -14,10 +14,10 @@ module Phrase
|
|
|
14
14
|
# @param release_create_parameters [ReleaseCreateParameters]
|
|
15
15
|
# @param [Hash] opts the optional parameters
|
|
16
16
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [Release]
|
|
18
18
|
def release_create(account_id, distribution_id, release_create_parameters, opts = {})
|
|
19
|
-
release_create_with_http_info(account_id, distribution_id, release_create_parameters, opts)
|
|
20
|
-
|
|
19
|
+
data, _status_code, _headers = release_create_with_http_info(account_id, distribution_id, release_create_parameters, opts)
|
|
20
|
+
data
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Create a release
|
|
@@ -27,7 +27,7 @@ module Phrase
|
|
|
27
27
|
# @param release_create_parameters [ReleaseCreateParameters]
|
|
28
28
|
# @param [Hash] opts the optional parameters
|
|
29
29
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
30
|
-
# @return [Array<(Response<(
|
|
30
|
+
# @return [Array<(Response<(Release)>, Integer, Hash)>] Response<(Release)> data, response status code and response headers
|
|
31
31
|
def release_create_with_http_info(account_id, distribution_id, release_create_parameters, opts = {})
|
|
32
32
|
if @api_client.config.debugging
|
|
33
33
|
@api_client.config.logger.debug 'Calling API: ReleasesApi.release_create ...'
|
|
@@ -52,6 +52,8 @@ module Phrase
|
|
|
52
52
|
|
|
53
53
|
# header parameters
|
|
54
54
|
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
55
57
|
# HTTP header 'Content-Type'
|
|
56
58
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
57
59
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -63,7 +65,7 @@ module Phrase
|
|
|
63
65
|
post_body = opts[:body] || @api_client.object_to_http_body(release_create_parameters)
|
|
64
66
|
|
|
65
67
|
# return_type
|
|
66
|
-
return_type = opts[:return_type]
|
|
68
|
+
return_type = opts[:return_type] || 'Release'
|
|
67
69
|
|
|
68
70
|
# auth_names
|
|
69
71
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -94,8 +96,8 @@ module Phrase
|
|
|
94
96
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
95
97
|
# @return [nil]
|
|
96
98
|
def release_delete(account_id, distribution_id, id, opts = {})
|
|
97
|
-
release_delete_with_http_info(account_id, distribution_id, id, opts)
|
|
98
|
-
|
|
99
|
+
data, _status_code, _headers = release_delete_with_http_info(account_id, distribution_id, id, opts)
|
|
100
|
+
data
|
|
99
101
|
end
|
|
100
102
|
|
|
101
103
|
# Delete a release
|
|
@@ -105,7 +107,7 @@ module Phrase
|
|
|
105
107
|
# @param id [String] ID
|
|
106
108
|
# @param [Hash] opts the optional parameters
|
|
107
109
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
108
|
-
# @return [Array<(Response
|
|
110
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
109
111
|
def release_delete_with_http_info(account_id, distribution_id, id, opts = {})
|
|
110
112
|
if @api_client.config.debugging
|
|
111
113
|
@api_client.config.logger.debug 'Calling API: ReleasesApi.release_delete ...'
|
|
@@ -14,10 +14,10 @@ module Phrase
|
|
|
14
14
|
# @param screenshot_marker_create_parameters [ScreenshotMarkerCreateParameters]
|
|
15
15
|
# @param [Hash] opts the optional parameters
|
|
16
16
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [ScreenshotMarker]
|
|
18
18
|
def screenshot_marker_create(project_id, screenshot_id, screenshot_marker_create_parameters, opts = {})
|
|
19
|
-
screenshot_marker_create_with_http_info(project_id, screenshot_id, screenshot_marker_create_parameters, opts)
|
|
20
|
-
|
|
19
|
+
data, _status_code, _headers = screenshot_marker_create_with_http_info(project_id, screenshot_id, screenshot_marker_create_parameters, opts)
|
|
20
|
+
data
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Create a screenshot marker
|
|
@@ -27,7 +27,7 @@ module Phrase
|
|
|
27
27
|
# @param screenshot_marker_create_parameters [ScreenshotMarkerCreateParameters]
|
|
28
28
|
# @param [Hash] opts the optional parameters
|
|
29
29
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
30
|
-
# @return [Array<(Response<(
|
|
30
|
+
# @return [Array<(Response<(ScreenshotMarker)>, Integer, Hash)>] Response<(ScreenshotMarker)> data, response status code and response headers
|
|
31
31
|
def screenshot_marker_create_with_http_info(project_id, screenshot_id, screenshot_marker_create_parameters, opts = {})
|
|
32
32
|
if @api_client.config.debugging
|
|
33
33
|
@api_client.config.logger.debug 'Calling API: ScreenshotMarkersApi.screenshot_marker_create ...'
|
|
@@ -52,6 +52,8 @@ module Phrase
|
|
|
52
52
|
|
|
53
53
|
# header parameters
|
|
54
54
|
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
55
57
|
# HTTP header 'Content-Type'
|
|
56
58
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
57
59
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -63,7 +65,7 @@ module Phrase
|
|
|
63
65
|
post_body = opts[:body] || @api_client.object_to_http_body(screenshot_marker_create_parameters)
|
|
64
66
|
|
|
65
67
|
# return_type
|
|
66
|
-
return_type = opts[:return_type]
|
|
68
|
+
return_type = opts[:return_type] || 'ScreenshotMarker'
|
|
67
69
|
|
|
68
70
|
# auth_names
|
|
69
71
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -93,8 +95,8 @@ module Phrase
|
|
|
93
95
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
94
96
|
# @return [nil]
|
|
95
97
|
def screenshot_marker_delete(project_id, screenshot_id, opts = {})
|
|
96
|
-
screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts)
|
|
97
|
-
|
|
98
|
+
data, _status_code, _headers = screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts)
|
|
99
|
+
data
|
|
98
100
|
end
|
|
99
101
|
|
|
100
102
|
# Delete a screenshot marker
|
|
@@ -103,7 +105,7 @@ module Phrase
|
|
|
103
105
|
# @param screenshot_id [String] Screenshot ID
|
|
104
106
|
# @param [Hash] opts the optional parameters
|
|
105
107
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
106
|
-
# @return [Array<(Response
|
|
108
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
107
109
|
def screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts = {})
|
|
108
110
|
if @api_client.config.debugging
|
|
109
111
|
@api_client.config.logger.debug 'Calling API: ScreenshotMarkersApi.screenshot_marker_delete ...'
|
|
@@ -13,10 +13,10 @@ module Phrase
|
|
|
13
13
|
# @param screenshot_create_parameters [ScreenshotCreateParameters]
|
|
14
14
|
# @param [Hash] opts the optional parameters
|
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
-
# @return [
|
|
16
|
+
# @return [Screenshot]
|
|
17
17
|
def screenshot_create(project_id, screenshot_create_parameters, opts = {})
|
|
18
|
-
screenshot_create_with_http_info(project_id, screenshot_create_parameters, opts)
|
|
19
|
-
|
|
18
|
+
data, _status_code, _headers = screenshot_create_with_http_info(project_id, screenshot_create_parameters, opts)
|
|
19
|
+
data
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Create a screenshot
|
|
@@ -25,7 +25,7 @@ module Phrase
|
|
|
25
25
|
# @param screenshot_create_parameters [ScreenshotCreateParameters]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
-
# @return [Array<(Response<(
|
|
28
|
+
# @return [Array<(Response<(Screenshot)>, Integer, Hash)>] Response<(Screenshot)> data, response status code and response headers
|
|
29
29
|
def screenshot_create_with_http_info(project_id, screenshot_create_parameters, opts = {})
|
|
30
30
|
if @api_client.config.debugging
|
|
31
31
|
@api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshot_create ...'
|
|
@@ -46,6 +46,8 @@ module Phrase
|
|
|
46
46
|
|
|
47
47
|
# header parameters
|
|
48
48
|
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
51
|
# HTTP header 'Content-Type'
|
|
50
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
51
53
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -57,7 +59,7 @@ module Phrase
|
|
|
57
59
|
post_body = opts[:body] || @api_client.object_to_http_body(screenshot_create_parameters)
|
|
58
60
|
|
|
59
61
|
# return_type
|
|
60
|
-
return_type = opts[:return_type]
|
|
62
|
+
return_type = opts[:return_type] || 'Screenshot'
|
|
61
63
|
|
|
62
64
|
# auth_names
|
|
63
65
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -87,8 +89,8 @@ module Phrase
|
|
|
87
89
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
88
90
|
# @return [nil]
|
|
89
91
|
def screenshot_delete(project_id, id, opts = {})
|
|
90
|
-
screenshot_delete_with_http_info(project_id, id, opts)
|
|
91
|
-
|
|
92
|
+
data, _status_code, _headers = screenshot_delete_with_http_info(project_id, id, opts)
|
|
93
|
+
data
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
# Delete a screenshot
|
|
@@ -97,7 +99,7 @@ module Phrase
|
|
|
97
99
|
# @param id [String] ID
|
|
98
100
|
# @param [Hash] opts the optional parameters
|
|
99
101
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
100
|
-
# @return [Array<(Response
|
|
102
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
101
103
|
def screenshot_delete_with_http_info(project_id, id, opts = {})
|
|
102
104
|
if @api_client.config.debugging
|
|
103
105
|
@api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshot_delete ...'
|
|
@@ -13,10 +13,10 @@ module Phrase
|
|
|
13
13
|
# @param space_create_parameters [SpaceCreateParameters]
|
|
14
14
|
# @param [Hash] opts the optional parameters
|
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
-
# @return [
|
|
16
|
+
# @return [Space]
|
|
17
17
|
def space_create(account_id, space_create_parameters, opts = {})
|
|
18
|
-
space_create_with_http_info(account_id, space_create_parameters, opts)
|
|
19
|
-
|
|
18
|
+
data, _status_code, _headers = space_create_with_http_info(account_id, space_create_parameters, opts)
|
|
19
|
+
data
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Create a Space
|
|
@@ -25,7 +25,7 @@ module Phrase
|
|
|
25
25
|
# @param space_create_parameters [SpaceCreateParameters]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
-
# @return [Array<(Response<(
|
|
28
|
+
# @return [Array<(Response<(Space)>, Integer, Hash)>] Response<(Space)> data, response status code and response headers
|
|
29
29
|
def space_create_with_http_info(account_id, space_create_parameters, opts = {})
|
|
30
30
|
if @api_client.config.debugging
|
|
31
31
|
@api_client.config.logger.debug 'Calling API: SpacesApi.space_create ...'
|
|
@@ -46,6 +46,8 @@ module Phrase
|
|
|
46
46
|
|
|
47
47
|
# header parameters
|
|
48
48
|
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
51
|
# HTTP header 'Content-Type'
|
|
50
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
51
53
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -57,7 +59,7 @@ module Phrase
|
|
|
57
59
|
post_body = opts[:body] || @api_client.object_to_http_body(space_create_parameters)
|
|
58
60
|
|
|
59
61
|
# return_type
|
|
60
|
-
return_type = opts[:return_type]
|
|
62
|
+
return_type = opts[:return_type] || 'Space'
|
|
61
63
|
|
|
62
64
|
# auth_names
|
|
63
65
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -87,8 +89,8 @@ module Phrase
|
|
|
87
89
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
88
90
|
# @return [nil]
|
|
89
91
|
def space_delete(account_id, id, opts = {})
|
|
90
|
-
space_delete_with_http_info(account_id, id, opts)
|
|
91
|
-
|
|
92
|
+
data, _status_code, _headers = space_delete_with_http_info(account_id, id, opts)
|
|
93
|
+
data
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
# Delete Space
|
|
@@ -97,7 +99,7 @@ module Phrase
|
|
|
97
99
|
# @param id [String] ID
|
|
98
100
|
# @param [Hash] opts the optional parameters
|
|
99
101
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
100
|
-
# @return [Array<(Response
|
|
102
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
101
103
|
def space_delete_with_http_info(account_id, id, opts = {})
|
|
102
104
|
if @api_client.config.debugging
|
|
103
105
|
@api_client.config.logger.debug 'Calling API: SpacesApi.space_delete ...'
|
|
@@ -382,8 +384,8 @@ module Phrase
|
|
|
382
384
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
383
385
|
# @return [nil]
|
|
384
386
|
def spaces_projects_create(account_id, space_id, spaces_projects_create_parameters, opts = {})
|
|
385
|
-
spaces_projects_create_with_http_info(account_id, space_id, spaces_projects_create_parameters, opts)
|
|
386
|
-
|
|
387
|
+
data, _status_code, _headers = spaces_projects_create_with_http_info(account_id, space_id, spaces_projects_create_parameters, opts)
|
|
388
|
+
data
|
|
387
389
|
end
|
|
388
390
|
|
|
389
391
|
# Add Project
|
|
@@ -393,7 +395,7 @@ module Phrase
|
|
|
393
395
|
# @param spaces_projects_create_parameters [SpacesProjectsCreateParameters]
|
|
394
396
|
# @param [Hash] opts the optional parameters
|
|
395
397
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
396
|
-
# @return [Array<(Response
|
|
398
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
397
399
|
def spaces_projects_create_with_http_info(account_id, space_id, spaces_projects_create_parameters, opts = {})
|
|
398
400
|
if @api_client.config.debugging
|
|
399
401
|
@api_client.config.logger.debug 'Calling API: SpacesApi.spaces_projects_create ...'
|
|
@@ -460,8 +462,8 @@ module Phrase
|
|
|
460
462
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
461
463
|
# @return [nil]
|
|
462
464
|
def spaces_projects_delete(account_id, space_id, id, opts = {})
|
|
463
|
-
spaces_projects_delete_with_http_info(account_id, space_id, id, opts)
|
|
464
|
-
|
|
465
|
+
data, _status_code, _headers = spaces_projects_delete_with_http_info(account_id, space_id, id, opts)
|
|
466
|
+
data
|
|
465
467
|
end
|
|
466
468
|
|
|
467
469
|
# Remove Project
|
|
@@ -471,7 +473,7 @@ module Phrase
|
|
|
471
473
|
# @param id [String] ID
|
|
472
474
|
# @param [Hash] opts the optional parameters
|
|
473
475
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
474
|
-
# @return [Array<(Response
|
|
476
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
475
477
|
def spaces_projects_delete_with_http_info(account_id, space_id, id, opts = {})
|
|
476
478
|
if @api_client.config.debugging
|
|
477
479
|
@api_client.config.logger.debug 'Calling API: SpacesApi.spaces_projects_delete ...'
|
|
@@ -13,10 +13,10 @@ module Phrase
|
|
|
13
13
|
# @param styleguide_create_parameters [StyleguideCreateParameters]
|
|
14
14
|
# @param [Hash] opts the optional parameters
|
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
-
# @return [
|
|
16
|
+
# @return [StyleguideDetails]
|
|
17
17
|
def styleguide_create(project_id, styleguide_create_parameters, opts = {})
|
|
18
|
-
styleguide_create_with_http_info(project_id, styleguide_create_parameters, opts)
|
|
19
|
-
|
|
18
|
+
data, _status_code, _headers = styleguide_create_with_http_info(project_id, styleguide_create_parameters, opts)
|
|
19
|
+
data
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Create a style guide
|
|
@@ -25,7 +25,7 @@ module Phrase
|
|
|
25
25
|
# @param styleguide_create_parameters [StyleguideCreateParameters]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
-
# @return [Array<(Response<(
|
|
28
|
+
# @return [Array<(Response<(StyleguideDetails)>, Integer, Hash)>] Response<(StyleguideDetails)> data, response status code and response headers
|
|
29
29
|
def styleguide_create_with_http_info(project_id, styleguide_create_parameters, opts = {})
|
|
30
30
|
if @api_client.config.debugging
|
|
31
31
|
@api_client.config.logger.debug 'Calling API: StyleGuidesApi.styleguide_create ...'
|
|
@@ -46,6 +46,8 @@ module Phrase
|
|
|
46
46
|
|
|
47
47
|
# header parameters
|
|
48
48
|
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
51
|
# HTTP header 'Content-Type'
|
|
50
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
51
53
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -57,7 +59,7 @@ module Phrase
|
|
|
57
59
|
post_body = opts[:body] || @api_client.object_to_http_body(styleguide_create_parameters)
|
|
58
60
|
|
|
59
61
|
# return_type
|
|
60
|
-
return_type = opts[:return_type]
|
|
62
|
+
return_type = opts[:return_type] || 'StyleguideDetails'
|
|
61
63
|
|
|
62
64
|
# auth_names
|
|
63
65
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -87,8 +89,8 @@ module Phrase
|
|
|
87
89
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
88
90
|
# @return [nil]
|
|
89
91
|
def styleguide_delete(project_id, id, opts = {})
|
|
90
|
-
styleguide_delete_with_http_info(project_id, id, opts)
|
|
91
|
-
|
|
92
|
+
data, _status_code, _headers = styleguide_delete_with_http_info(project_id, id, opts)
|
|
93
|
+
data
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
# Delete a style guide
|
|
@@ -97,7 +99,7 @@ module Phrase
|
|
|
97
99
|
# @param id [String] ID
|
|
98
100
|
# @param [Hash] opts the optional parameters
|
|
99
101
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
100
|
-
# @return [Array<(Response
|
|
102
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
101
103
|
def styleguide_delete_with_http_info(project_id, id, opts = {})
|
|
102
104
|
if @api_client.config.debugging
|
|
103
105
|
@api_client.config.logger.debug 'Calling API: StyleGuidesApi.styleguide_delete ...'
|
data/lib/phrase/api/tags_api.rb
CHANGED
|
@@ -13,10 +13,10 @@ module Phrase
|
|
|
13
13
|
# @param tag_create_parameters [TagCreateParameters]
|
|
14
14
|
# @param [Hash] opts the optional parameters
|
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
-
# @return [
|
|
16
|
+
# @return [TagWithStats]
|
|
17
17
|
def tag_create(project_id, tag_create_parameters, opts = {})
|
|
18
|
-
tag_create_with_http_info(project_id, tag_create_parameters, opts)
|
|
19
|
-
|
|
18
|
+
data, _status_code, _headers = tag_create_with_http_info(project_id, tag_create_parameters, opts)
|
|
19
|
+
data
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
# Create a tag
|
|
@@ -25,7 +25,7 @@ module Phrase
|
|
|
25
25
|
# @param tag_create_parameters [TagCreateParameters]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
27
27
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
-
# @return [Array<(Response<(
|
|
28
|
+
# @return [Array<(Response<(TagWithStats)>, Integer, Hash)>] Response<(TagWithStats)> data, response status code and response headers
|
|
29
29
|
def tag_create_with_http_info(project_id, tag_create_parameters, opts = {})
|
|
30
30
|
if @api_client.config.debugging
|
|
31
31
|
@api_client.config.logger.debug 'Calling API: TagsApi.tag_create ...'
|
|
@@ -46,6 +46,8 @@ module Phrase
|
|
|
46
46
|
|
|
47
47
|
# header parameters
|
|
48
48
|
header_params = opts[:header_params] || {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
51
|
# HTTP header 'Content-Type'
|
|
50
52
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
51
53
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
@@ -57,7 +59,7 @@ module Phrase
|
|
|
57
59
|
post_body = opts[:body] || @api_client.object_to_http_body(tag_create_parameters)
|
|
58
60
|
|
|
59
61
|
# return_type
|
|
60
|
-
return_type = opts[:return_type]
|
|
62
|
+
return_type = opts[:return_type] || 'TagWithStats'
|
|
61
63
|
|
|
62
64
|
# auth_names
|
|
63
65
|
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
@@ -88,8 +90,8 @@ module Phrase
|
|
|
88
90
|
# @option opts [String] :branch specify the branch to use
|
|
89
91
|
# @return [nil]
|
|
90
92
|
def tag_delete(project_id, name, opts = {})
|
|
91
|
-
tag_delete_with_http_info(project_id, name, opts)
|
|
92
|
-
|
|
93
|
+
data, _status_code, _headers = tag_delete_with_http_info(project_id, name, opts)
|
|
94
|
+
data
|
|
93
95
|
end
|
|
94
96
|
|
|
95
97
|
# Delete a tag
|
|
@@ -99,7 +101,7 @@ module Phrase
|
|
|
99
101
|
# @param [Hash] opts the optional parameters
|
|
100
102
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
101
103
|
# @option opts [String] :branch specify the branch to use
|
|
102
|
-
# @return [Array<(Response
|
|
104
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
103
105
|
def tag_delete_with_http_info(project_id, name, opts = {})
|
|
104
106
|
if @api_client.config.debugging
|
|
105
107
|
@api_client.config.logger.debug 'Calling API: TagsApi.tag_delete ...'
|
|
@@ -0,0 +1,840 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Phrase
|
|
4
|
+
class TeamsApi
|
|
5
|
+
attr_accessor :api_client
|
|
6
|
+
|
|
7
|
+
def initialize(api_client = ApiClient.default)
|
|
8
|
+
@api_client = api_client
|
|
9
|
+
end
|
|
10
|
+
# Create a Team
|
|
11
|
+
# Create a new Team.
|
|
12
|
+
# @param account_id [String] Account ID
|
|
13
|
+
# @param team_create_parameters [TeamCreateParameters]
|
|
14
|
+
# @param [Hash] opts the optional parameters
|
|
15
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
|
+
# @return [TeamDetail]
|
|
17
|
+
def team_create(account_id, team_create_parameters, opts = {})
|
|
18
|
+
data, _status_code, _headers = team_create_with_http_info(account_id, team_create_parameters, opts)
|
|
19
|
+
data
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Create a Team
|
|
23
|
+
# Create a new Team.
|
|
24
|
+
# @param account_id [String] Account ID
|
|
25
|
+
# @param team_create_parameters [TeamCreateParameters]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
28
|
+
# @return [Array<(Response<(TeamDetail)>, Integer, Hash)>] Response<(TeamDetail)> data, response status code and response headers
|
|
29
|
+
def team_create_with_http_info(account_id, team_create_parameters, opts = {})
|
|
30
|
+
if @api_client.config.debugging
|
|
31
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_create ...'
|
|
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 TeamsApi.team_create"
|
|
36
|
+
end
|
|
37
|
+
# verify the required parameter 'team_create_parameters' is set
|
|
38
|
+
if @api_client.config.client_side_validation && team_create_parameters.nil?
|
|
39
|
+
fail ArgumentError, "Missing the required parameter 'team_create_parameters' when calling TeamsApi.team_create"
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/accounts/{account_id}/teams'.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(team_create_parameters)
|
|
60
|
+
|
|
61
|
+
# return_type
|
|
62
|
+
return_type = opts[:return_type] || 'TeamDetail'
|
|
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: TeamsApi#team_create\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
|
+
|
|
84
|
+
# Delete Team
|
|
85
|
+
# Delete the specified Team.
|
|
86
|
+
# @param account_id [String] Account ID
|
|
87
|
+
# @param id [String] ID
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
90
|
+
# @return [nil]
|
|
91
|
+
def team_delete(account_id, id, opts = {})
|
|
92
|
+
data, _status_code, _headers = team_delete_with_http_info(account_id, id, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Delete Team
|
|
97
|
+
# Delete the specified Team.
|
|
98
|
+
# @param account_id [String] Account ID
|
|
99
|
+
# @param id [String] ID
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
102
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
103
|
+
def team_delete_with_http_info(account_id, id, opts = {})
|
|
104
|
+
if @api_client.config.debugging
|
|
105
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_delete ...'
|
|
106
|
+
end
|
|
107
|
+
# verify the required parameter 'account_id' is set
|
|
108
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
109
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.team_delete"
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'id' is set
|
|
112
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.team_delete"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:body]
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:return_type]
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
response = ::Phrase::Response.new(data, headers)
|
|
151
|
+
return response, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Get Team
|
|
155
|
+
# Show the specified Team.
|
|
156
|
+
# @param account_id [String] Account ID
|
|
157
|
+
# @param id [String] ID
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
160
|
+
# @return [TeamDetail]
|
|
161
|
+
def team_show(account_id, id, opts = {})
|
|
162
|
+
data, _status_code, _headers = team_show_with_http_info(account_id, id, opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Get Team
|
|
167
|
+
# Show the specified Team.
|
|
168
|
+
# @param account_id [String] Account ID
|
|
169
|
+
# @param id [String] ID
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
172
|
+
# @return [Array<(Response<(TeamDetail)>, Integer, Hash)>] Response<(TeamDetail)> data, response status code and response headers
|
|
173
|
+
def team_show_with_http_info(account_id, id, opts = {})
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_show ...'
|
|
176
|
+
end
|
|
177
|
+
# verify the required parameter 'account_id' is set
|
|
178
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
179
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.team_show"
|
|
180
|
+
end
|
|
181
|
+
# verify the required parameter 'id' is set
|
|
182
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
183
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.team_show"
|
|
184
|
+
end
|
|
185
|
+
# resource path
|
|
186
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
187
|
+
|
|
188
|
+
# query parameters
|
|
189
|
+
query_params = opts[:query_params] || {}
|
|
190
|
+
|
|
191
|
+
# header parameters
|
|
192
|
+
header_params = opts[:header_params] || {}
|
|
193
|
+
# HTTP header 'Accept' (if needed)
|
|
194
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
195
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
196
|
+
|
|
197
|
+
# form parameters
|
|
198
|
+
form_params = opts[:form_params] || {}
|
|
199
|
+
|
|
200
|
+
# http body (model)
|
|
201
|
+
post_body = opts[:body]
|
|
202
|
+
|
|
203
|
+
# return_type
|
|
204
|
+
return_type = opts[:return_type] || 'TeamDetail'
|
|
205
|
+
|
|
206
|
+
# auth_names
|
|
207
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
208
|
+
|
|
209
|
+
new_options = opts.merge(
|
|
210
|
+
:header_params => header_params,
|
|
211
|
+
:query_params => query_params,
|
|
212
|
+
:form_params => form_params,
|
|
213
|
+
:body => post_body,
|
|
214
|
+
:auth_names => auth_names,
|
|
215
|
+
:return_type => return_type
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
219
|
+
if @api_client.config.debugging
|
|
220
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
221
|
+
end
|
|
222
|
+
response = ::Phrase::Response.new(data, headers)
|
|
223
|
+
return response, status_code, headers
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Update Team
|
|
227
|
+
# Update the specified Team.
|
|
228
|
+
# @param account_id [String] Account ID
|
|
229
|
+
# @param id [String] ID
|
|
230
|
+
# @param team_update_parameters [TeamUpdateParameters]
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
233
|
+
# @return [TeamDetail]
|
|
234
|
+
def team_update(account_id, id, team_update_parameters, opts = {})
|
|
235
|
+
data, _status_code, _headers = team_update_with_http_info(account_id, id, team_update_parameters, opts)
|
|
236
|
+
data
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Update Team
|
|
240
|
+
# Update the specified Team.
|
|
241
|
+
# @param account_id [String] Account ID
|
|
242
|
+
# @param id [String] ID
|
|
243
|
+
# @param team_update_parameters [TeamUpdateParameters]
|
|
244
|
+
# @param [Hash] opts the optional parameters
|
|
245
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
246
|
+
# @return [Array<(Response<(TeamDetail)>, Integer, Hash)>] Response<(TeamDetail)> data, response status code and response headers
|
|
247
|
+
def team_update_with_http_info(account_id, id, team_update_parameters, opts = {})
|
|
248
|
+
if @api_client.config.debugging
|
|
249
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_update ...'
|
|
250
|
+
end
|
|
251
|
+
# verify the required parameter 'account_id' is set
|
|
252
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.team_update"
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'id' is set
|
|
256
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.team_update"
|
|
258
|
+
end
|
|
259
|
+
# verify the required parameter 'team_update_parameters' is set
|
|
260
|
+
if @api_client.config.client_side_validation && team_update_parameters.nil?
|
|
261
|
+
fail ArgumentError, "Missing the required parameter 'team_update_parameters' when calling TeamsApi.team_update"
|
|
262
|
+
end
|
|
263
|
+
# resource path
|
|
264
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
265
|
+
|
|
266
|
+
# query parameters
|
|
267
|
+
query_params = opts[:query_params] || {}
|
|
268
|
+
|
|
269
|
+
# header parameters
|
|
270
|
+
header_params = opts[:header_params] || {}
|
|
271
|
+
# HTTP header 'Accept' (if needed)
|
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
273
|
+
# HTTP header 'Content-Type'
|
|
274
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
275
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
276
|
+
|
|
277
|
+
# form parameters
|
|
278
|
+
form_params = opts[:form_params] || {}
|
|
279
|
+
|
|
280
|
+
# http body (model)
|
|
281
|
+
post_body = opts[:body] || @api_client.object_to_http_body(team_update_parameters)
|
|
282
|
+
|
|
283
|
+
# return_type
|
|
284
|
+
return_type = opts[:return_type] || 'TeamDetail'
|
|
285
|
+
|
|
286
|
+
# auth_names
|
|
287
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
288
|
+
|
|
289
|
+
new_options = opts.merge(
|
|
290
|
+
:header_params => header_params,
|
|
291
|
+
:query_params => query_params,
|
|
292
|
+
:form_params => form_params,
|
|
293
|
+
:body => post_body,
|
|
294
|
+
:auth_names => auth_names,
|
|
295
|
+
:return_type => return_type
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
299
|
+
if @api_client.config.debugging
|
|
300
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
301
|
+
end
|
|
302
|
+
response = ::Phrase::Response.new(data, headers)
|
|
303
|
+
return response, status_code, headers
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# List Teams
|
|
307
|
+
# List all Teams for the given account.
|
|
308
|
+
# @param account_id [String] Account ID
|
|
309
|
+
# @param [Hash] opts the optional parameters
|
|
310
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
311
|
+
# @option opts [Integer] :page Page number
|
|
312
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
|
|
313
|
+
# @return [Array<Team>]
|
|
314
|
+
def teams_list(account_id, opts = {})
|
|
315
|
+
data, _status_code, _headers = teams_list_with_http_info(account_id, opts)
|
|
316
|
+
data
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# List Teams
|
|
320
|
+
# List all Teams for the given account.
|
|
321
|
+
# @param account_id [String] Account ID
|
|
322
|
+
# @param [Hash] opts the optional parameters
|
|
323
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
324
|
+
# @option opts [Integer] :page Page number
|
|
325
|
+
# @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 10 by default
|
|
326
|
+
# @return [Array<(Response<(Array<Team>)>, Integer, Hash)>] Response<(Array<Team>)> data, response status code and response headers
|
|
327
|
+
def teams_list_with_http_info(account_id, opts = {})
|
|
328
|
+
if @api_client.config.debugging
|
|
329
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_list ...'
|
|
330
|
+
end
|
|
331
|
+
# verify the required parameter 'account_id' is set
|
|
332
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_list"
|
|
334
|
+
end
|
|
335
|
+
# resource path
|
|
336
|
+
local_var_path = '/accounts/{account_id}/teams'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
|
|
337
|
+
|
|
338
|
+
# query parameters
|
|
339
|
+
query_params = opts[:query_params] || {}
|
|
340
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
341
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
|
342
|
+
|
|
343
|
+
# header parameters
|
|
344
|
+
header_params = opts[:header_params] || {}
|
|
345
|
+
# HTTP header 'Accept' (if needed)
|
|
346
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
347
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
348
|
+
|
|
349
|
+
# form parameters
|
|
350
|
+
form_params = opts[:form_params] || {}
|
|
351
|
+
|
|
352
|
+
# http body (model)
|
|
353
|
+
post_body = opts[:body]
|
|
354
|
+
|
|
355
|
+
# return_type
|
|
356
|
+
return_type = opts[:return_type] || 'Array<Team>'
|
|
357
|
+
|
|
358
|
+
# auth_names
|
|
359
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
360
|
+
|
|
361
|
+
new_options = opts.merge(
|
|
362
|
+
:header_params => header_params,
|
|
363
|
+
:query_params => query_params,
|
|
364
|
+
:form_params => form_params,
|
|
365
|
+
:body => post_body,
|
|
366
|
+
:auth_names => auth_names,
|
|
367
|
+
:return_type => return_type
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
371
|
+
if @api_client.config.debugging
|
|
372
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
373
|
+
end
|
|
374
|
+
response = ::Phrase::Response.new(data, headers)
|
|
375
|
+
return response, status_code, headers
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Add Project
|
|
379
|
+
# Adds an existing project to the team.
|
|
380
|
+
# @param account_id [String] Account ID
|
|
381
|
+
# @param team_id [String] Team ID
|
|
382
|
+
# @param teams_projects_create_parameters [TeamsProjectsCreateParameters]
|
|
383
|
+
# @param [Hash] opts the optional parameters
|
|
384
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
385
|
+
# @return [nil]
|
|
386
|
+
def teams_projects_create(account_id, team_id, teams_projects_create_parameters, opts = {})
|
|
387
|
+
data, _status_code, _headers = teams_projects_create_with_http_info(account_id, team_id, teams_projects_create_parameters, opts)
|
|
388
|
+
data
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# Add Project
|
|
392
|
+
# Adds an existing project to the team.
|
|
393
|
+
# @param account_id [String] Account ID
|
|
394
|
+
# @param team_id [String] Team ID
|
|
395
|
+
# @param teams_projects_create_parameters [TeamsProjectsCreateParameters]
|
|
396
|
+
# @param [Hash] opts the optional parameters
|
|
397
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
398
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
399
|
+
def teams_projects_create_with_http_info(account_id, team_id, teams_projects_create_parameters, opts = {})
|
|
400
|
+
if @api_client.config.debugging
|
|
401
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_projects_create ...'
|
|
402
|
+
end
|
|
403
|
+
# verify the required parameter 'account_id' is set
|
|
404
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
405
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_projects_create"
|
|
406
|
+
end
|
|
407
|
+
# verify the required parameter 'team_id' is set
|
|
408
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
|
409
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.teams_projects_create"
|
|
410
|
+
end
|
|
411
|
+
# verify the required parameter 'teams_projects_create_parameters' is set
|
|
412
|
+
if @api_client.config.client_side_validation && teams_projects_create_parameters.nil?
|
|
413
|
+
fail ArgumentError, "Missing the required parameter 'teams_projects_create_parameters' when calling TeamsApi.teams_projects_create"
|
|
414
|
+
end
|
|
415
|
+
# resource path
|
|
416
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}/projects'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s))
|
|
417
|
+
|
|
418
|
+
# query parameters
|
|
419
|
+
query_params = opts[:query_params] || {}
|
|
420
|
+
|
|
421
|
+
# header parameters
|
|
422
|
+
header_params = opts[:header_params] || {}
|
|
423
|
+
# HTTP header 'Content-Type'
|
|
424
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
425
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
426
|
+
|
|
427
|
+
# form parameters
|
|
428
|
+
form_params = opts[:form_params] || {}
|
|
429
|
+
|
|
430
|
+
# http body (model)
|
|
431
|
+
post_body = opts[:body] || @api_client.object_to_http_body(teams_projects_create_parameters)
|
|
432
|
+
|
|
433
|
+
# return_type
|
|
434
|
+
return_type = opts[:return_type]
|
|
435
|
+
|
|
436
|
+
# auth_names
|
|
437
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
438
|
+
|
|
439
|
+
new_options = opts.merge(
|
|
440
|
+
:header_params => header_params,
|
|
441
|
+
:query_params => query_params,
|
|
442
|
+
:form_params => form_params,
|
|
443
|
+
:body => post_body,
|
|
444
|
+
:auth_names => auth_names,
|
|
445
|
+
:return_type => return_type
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
449
|
+
if @api_client.config.debugging
|
|
450
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_projects_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
451
|
+
end
|
|
452
|
+
response = ::Phrase::Response.new(data, headers)
|
|
453
|
+
return response, status_code, headers
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Remove Project
|
|
457
|
+
# Removes a specified project from the specified team.
|
|
458
|
+
# @param account_id [String] Account ID
|
|
459
|
+
# @param team_id [String] Team ID
|
|
460
|
+
# @param id [String] ID
|
|
461
|
+
# @param [Hash] opts the optional parameters
|
|
462
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
463
|
+
# @return [nil]
|
|
464
|
+
def teams_projects_delete(account_id, team_id, id, opts = {})
|
|
465
|
+
data, _status_code, _headers = teams_projects_delete_with_http_info(account_id, team_id, id, opts)
|
|
466
|
+
data
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# Remove Project
|
|
470
|
+
# Removes a specified project from the specified team.
|
|
471
|
+
# @param account_id [String] Account ID
|
|
472
|
+
# @param team_id [String] Team ID
|
|
473
|
+
# @param id [String] ID
|
|
474
|
+
# @param [Hash] opts the optional parameters
|
|
475
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
476
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
477
|
+
def teams_projects_delete_with_http_info(account_id, team_id, id, opts = {})
|
|
478
|
+
if @api_client.config.debugging
|
|
479
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_projects_delete ...'
|
|
480
|
+
end
|
|
481
|
+
# verify the required parameter 'account_id' is set
|
|
482
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
483
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_projects_delete"
|
|
484
|
+
end
|
|
485
|
+
# verify the required parameter 'team_id' is set
|
|
486
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
|
487
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.teams_projects_delete"
|
|
488
|
+
end
|
|
489
|
+
# verify the required parameter 'id' is set
|
|
490
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
491
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_projects_delete"
|
|
492
|
+
end
|
|
493
|
+
# resource path
|
|
494
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}/projects/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
495
|
+
|
|
496
|
+
# query parameters
|
|
497
|
+
query_params = opts[:query_params] || {}
|
|
498
|
+
|
|
499
|
+
# header parameters
|
|
500
|
+
header_params = opts[:header_params] || {}
|
|
501
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
502
|
+
|
|
503
|
+
# form parameters
|
|
504
|
+
form_params = opts[:form_params] || {}
|
|
505
|
+
|
|
506
|
+
# http body (model)
|
|
507
|
+
post_body = opts[:body]
|
|
508
|
+
|
|
509
|
+
# return_type
|
|
510
|
+
return_type = opts[:return_type]
|
|
511
|
+
|
|
512
|
+
# auth_names
|
|
513
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
514
|
+
|
|
515
|
+
new_options = opts.merge(
|
|
516
|
+
:header_params => header_params,
|
|
517
|
+
:query_params => query_params,
|
|
518
|
+
:form_params => form_params,
|
|
519
|
+
:body => post_body,
|
|
520
|
+
:auth_names => auth_names,
|
|
521
|
+
:return_type => return_type
|
|
522
|
+
)
|
|
523
|
+
|
|
524
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
525
|
+
if @api_client.config.debugging
|
|
526
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_projects_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
527
|
+
end
|
|
528
|
+
response = ::Phrase::Response.new(data, headers)
|
|
529
|
+
return response, status_code, headers
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
# Add Space
|
|
533
|
+
# Adds an existing space to the team.
|
|
534
|
+
# @param account_id [String] Account ID
|
|
535
|
+
# @param team_id [String] Team ID
|
|
536
|
+
# @param teams_spaces_create_parameters [TeamsSpacesCreateParameters]
|
|
537
|
+
# @param [Hash] opts the optional parameters
|
|
538
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
539
|
+
# @return [nil]
|
|
540
|
+
def teams_spaces_create(account_id, team_id, teams_spaces_create_parameters, opts = {})
|
|
541
|
+
data, _status_code, _headers = teams_spaces_create_with_http_info(account_id, team_id, teams_spaces_create_parameters, opts)
|
|
542
|
+
data
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# Add Space
|
|
546
|
+
# Adds an existing space to the team.
|
|
547
|
+
# @param account_id [String] Account ID
|
|
548
|
+
# @param team_id [String] Team ID
|
|
549
|
+
# @param teams_spaces_create_parameters [TeamsSpacesCreateParameters]
|
|
550
|
+
# @param [Hash] opts the optional parameters
|
|
551
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
552
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
553
|
+
def teams_spaces_create_with_http_info(account_id, team_id, teams_spaces_create_parameters, opts = {})
|
|
554
|
+
if @api_client.config.debugging
|
|
555
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_spaces_create ...'
|
|
556
|
+
end
|
|
557
|
+
# verify the required parameter 'account_id' is set
|
|
558
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
559
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_spaces_create"
|
|
560
|
+
end
|
|
561
|
+
# verify the required parameter 'team_id' is set
|
|
562
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
|
563
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.teams_spaces_create"
|
|
564
|
+
end
|
|
565
|
+
# verify the required parameter 'teams_spaces_create_parameters' is set
|
|
566
|
+
if @api_client.config.client_side_validation && teams_spaces_create_parameters.nil?
|
|
567
|
+
fail ArgumentError, "Missing the required parameter 'teams_spaces_create_parameters' when calling TeamsApi.teams_spaces_create"
|
|
568
|
+
end
|
|
569
|
+
# resource path
|
|
570
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}/spaces'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s))
|
|
571
|
+
|
|
572
|
+
# query parameters
|
|
573
|
+
query_params = opts[:query_params] || {}
|
|
574
|
+
|
|
575
|
+
# header parameters
|
|
576
|
+
header_params = opts[:header_params] || {}
|
|
577
|
+
# HTTP header 'Content-Type'
|
|
578
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
579
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
580
|
+
|
|
581
|
+
# form parameters
|
|
582
|
+
form_params = opts[:form_params] || {}
|
|
583
|
+
|
|
584
|
+
# http body (model)
|
|
585
|
+
post_body = opts[:body] || @api_client.object_to_http_body(teams_spaces_create_parameters)
|
|
586
|
+
|
|
587
|
+
# return_type
|
|
588
|
+
return_type = opts[:return_type]
|
|
589
|
+
|
|
590
|
+
# auth_names
|
|
591
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
592
|
+
|
|
593
|
+
new_options = opts.merge(
|
|
594
|
+
:header_params => header_params,
|
|
595
|
+
:query_params => query_params,
|
|
596
|
+
:form_params => form_params,
|
|
597
|
+
:body => post_body,
|
|
598
|
+
:auth_names => auth_names,
|
|
599
|
+
:return_type => return_type
|
|
600
|
+
)
|
|
601
|
+
|
|
602
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
603
|
+
if @api_client.config.debugging
|
|
604
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_spaces_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
605
|
+
end
|
|
606
|
+
response = ::Phrase::Response.new(data, headers)
|
|
607
|
+
return response, status_code, headers
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
# Remove Space
|
|
611
|
+
# Removes a specified space from the specified team.
|
|
612
|
+
# @param account_id [String] Account ID
|
|
613
|
+
# @param team_id [String] Team ID
|
|
614
|
+
# @param id [String] ID
|
|
615
|
+
# @param [Hash] opts the optional parameters
|
|
616
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
617
|
+
# @return [nil]
|
|
618
|
+
def teams_spaces_delete(account_id, team_id, id, opts = {})
|
|
619
|
+
data, _status_code, _headers = teams_spaces_delete_with_http_info(account_id, team_id, id, opts)
|
|
620
|
+
data
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
# Remove Space
|
|
624
|
+
# Removes a specified space from the specified team.
|
|
625
|
+
# @param account_id [String] Account ID
|
|
626
|
+
# @param team_id [String] Team ID
|
|
627
|
+
# @param id [String] ID
|
|
628
|
+
# @param [Hash] opts the optional parameters
|
|
629
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
630
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
631
|
+
def teams_spaces_delete_with_http_info(account_id, team_id, id, opts = {})
|
|
632
|
+
if @api_client.config.debugging
|
|
633
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_spaces_delete ...'
|
|
634
|
+
end
|
|
635
|
+
# verify the required parameter 'account_id' is set
|
|
636
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
637
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_spaces_delete"
|
|
638
|
+
end
|
|
639
|
+
# verify the required parameter 'team_id' is set
|
|
640
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
|
641
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.teams_spaces_delete"
|
|
642
|
+
end
|
|
643
|
+
# verify the required parameter 'id' is set
|
|
644
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
645
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_spaces_delete"
|
|
646
|
+
end
|
|
647
|
+
# resource path
|
|
648
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}/spaces/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
649
|
+
|
|
650
|
+
# query parameters
|
|
651
|
+
query_params = opts[:query_params] || {}
|
|
652
|
+
|
|
653
|
+
# header parameters
|
|
654
|
+
header_params = opts[:header_params] || {}
|
|
655
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
656
|
+
|
|
657
|
+
# form parameters
|
|
658
|
+
form_params = opts[:form_params] || {}
|
|
659
|
+
|
|
660
|
+
# http body (model)
|
|
661
|
+
post_body = opts[:body]
|
|
662
|
+
|
|
663
|
+
# return_type
|
|
664
|
+
return_type = opts[:return_type]
|
|
665
|
+
|
|
666
|
+
# auth_names
|
|
667
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
668
|
+
|
|
669
|
+
new_options = opts.merge(
|
|
670
|
+
:header_params => header_params,
|
|
671
|
+
:query_params => query_params,
|
|
672
|
+
:form_params => form_params,
|
|
673
|
+
:body => post_body,
|
|
674
|
+
:auth_names => auth_names,
|
|
675
|
+
:return_type => return_type
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
679
|
+
if @api_client.config.debugging
|
|
680
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_spaces_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
681
|
+
end
|
|
682
|
+
response = ::Phrase::Response.new(data, headers)
|
|
683
|
+
return response, status_code, headers
|
|
684
|
+
end
|
|
685
|
+
|
|
686
|
+
# Add User
|
|
687
|
+
# Adds an existing user to the team.
|
|
688
|
+
# @param account_id [String] Account ID
|
|
689
|
+
# @param team_id [String] Team ID
|
|
690
|
+
# @param teams_users_create_parameters [TeamsUsersCreateParameters]
|
|
691
|
+
# @param [Hash] opts the optional parameters
|
|
692
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
693
|
+
# @return [nil]
|
|
694
|
+
def teams_users_create(account_id, team_id, teams_users_create_parameters, opts = {})
|
|
695
|
+
data, _status_code, _headers = teams_users_create_with_http_info(account_id, team_id, teams_users_create_parameters, opts)
|
|
696
|
+
data
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
# Add User
|
|
700
|
+
# Adds an existing user to the team.
|
|
701
|
+
# @param account_id [String] Account ID
|
|
702
|
+
# @param team_id [String] Team ID
|
|
703
|
+
# @param teams_users_create_parameters [TeamsUsersCreateParameters]
|
|
704
|
+
# @param [Hash] opts the optional parameters
|
|
705
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
706
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
707
|
+
def teams_users_create_with_http_info(account_id, team_id, teams_users_create_parameters, opts = {})
|
|
708
|
+
if @api_client.config.debugging
|
|
709
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_users_create ...'
|
|
710
|
+
end
|
|
711
|
+
# verify the required parameter 'account_id' is set
|
|
712
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
713
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_users_create"
|
|
714
|
+
end
|
|
715
|
+
# verify the required parameter 'team_id' is set
|
|
716
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
|
717
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.teams_users_create"
|
|
718
|
+
end
|
|
719
|
+
# verify the required parameter 'teams_users_create_parameters' is set
|
|
720
|
+
if @api_client.config.client_side_validation && teams_users_create_parameters.nil?
|
|
721
|
+
fail ArgumentError, "Missing the required parameter 'teams_users_create_parameters' when calling TeamsApi.teams_users_create"
|
|
722
|
+
end
|
|
723
|
+
# resource path
|
|
724
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}/users'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s))
|
|
725
|
+
|
|
726
|
+
# query parameters
|
|
727
|
+
query_params = opts[:query_params] || {}
|
|
728
|
+
|
|
729
|
+
# header parameters
|
|
730
|
+
header_params = opts[:header_params] || {}
|
|
731
|
+
# HTTP header 'Content-Type'
|
|
732
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
733
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
734
|
+
|
|
735
|
+
# form parameters
|
|
736
|
+
form_params = opts[:form_params] || {}
|
|
737
|
+
|
|
738
|
+
# http body (model)
|
|
739
|
+
post_body = opts[:body] || @api_client.object_to_http_body(teams_users_create_parameters)
|
|
740
|
+
|
|
741
|
+
# return_type
|
|
742
|
+
return_type = opts[:return_type]
|
|
743
|
+
|
|
744
|
+
# auth_names
|
|
745
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
746
|
+
|
|
747
|
+
new_options = opts.merge(
|
|
748
|
+
:header_params => header_params,
|
|
749
|
+
:query_params => query_params,
|
|
750
|
+
:form_params => form_params,
|
|
751
|
+
:body => post_body,
|
|
752
|
+
:auth_names => auth_names,
|
|
753
|
+
:return_type => return_type
|
|
754
|
+
)
|
|
755
|
+
|
|
756
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
757
|
+
if @api_client.config.debugging
|
|
758
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_users_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
759
|
+
end
|
|
760
|
+
response = ::Phrase::Response.new(data, headers)
|
|
761
|
+
return response, status_code, headers
|
|
762
|
+
end
|
|
763
|
+
|
|
764
|
+
# Remove User
|
|
765
|
+
# Removes a specified user from the specified team.
|
|
766
|
+
# @param account_id [String] Account ID
|
|
767
|
+
# @param team_id [String] Team ID
|
|
768
|
+
# @param id [String] ID
|
|
769
|
+
# @param [Hash] opts the optional parameters
|
|
770
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
771
|
+
# @return [nil]
|
|
772
|
+
def teams_users_delete(account_id, team_id, id, opts = {})
|
|
773
|
+
data, _status_code, _headers = teams_users_delete_with_http_info(account_id, team_id, id, opts)
|
|
774
|
+
data
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
# Remove User
|
|
778
|
+
# Removes a specified user from the specified team.
|
|
779
|
+
# @param account_id [String] Account ID
|
|
780
|
+
# @param team_id [String] Team ID
|
|
781
|
+
# @param id [String] ID
|
|
782
|
+
# @param [Hash] opts the optional parameters
|
|
783
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
784
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
|
785
|
+
def teams_users_delete_with_http_info(account_id, team_id, id, opts = {})
|
|
786
|
+
if @api_client.config.debugging
|
|
787
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.teams_users_delete ...'
|
|
788
|
+
end
|
|
789
|
+
# verify the required parameter 'account_id' is set
|
|
790
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
791
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TeamsApi.teams_users_delete"
|
|
792
|
+
end
|
|
793
|
+
# verify the required parameter 'team_id' is set
|
|
794
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
|
795
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.teams_users_delete"
|
|
796
|
+
end
|
|
797
|
+
# verify the required parameter 'id' is set
|
|
798
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
799
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TeamsApi.teams_users_delete"
|
|
800
|
+
end
|
|
801
|
+
# resource path
|
|
802
|
+
local_var_path = '/accounts/{account_id}/teams/{team_id}/users/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'team_id' + '}', CGI.escape(team_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
803
|
+
|
|
804
|
+
# query parameters
|
|
805
|
+
query_params = opts[:query_params] || {}
|
|
806
|
+
|
|
807
|
+
# header parameters
|
|
808
|
+
header_params = opts[:header_params] || {}
|
|
809
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
|
810
|
+
|
|
811
|
+
# form parameters
|
|
812
|
+
form_params = opts[:form_params] || {}
|
|
813
|
+
|
|
814
|
+
# http body (model)
|
|
815
|
+
post_body = opts[:body]
|
|
816
|
+
|
|
817
|
+
# return_type
|
|
818
|
+
return_type = opts[:return_type]
|
|
819
|
+
|
|
820
|
+
# auth_names
|
|
821
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
|
822
|
+
|
|
823
|
+
new_options = opts.merge(
|
|
824
|
+
:header_params => header_params,
|
|
825
|
+
:query_params => query_params,
|
|
826
|
+
:form_params => form_params,
|
|
827
|
+
:body => post_body,
|
|
828
|
+
:auth_names => auth_names,
|
|
829
|
+
:return_type => return_type
|
|
830
|
+
)
|
|
831
|
+
|
|
832
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
833
|
+
if @api_client.config.debugging
|
|
834
|
+
@api_client.config.logger.debug "API called: TeamsApi#teams_users_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
835
|
+
end
|
|
836
|
+
response = ::Phrase::Response.new(data, headers)
|
|
837
|
+
return response, status_code, headers
|
|
838
|
+
end
|
|
839
|
+
end
|
|
840
|
+
end
|