postboost 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +0 -0
- data/Rakefile +10 -0
- data/docs/Account.md +34 -0
- data/docs/AccountsApi.md +149 -0
- data/docs/AddGenericSubscriptionRequest.md +22 -0
- data/docs/ChangeSubscriptionPlanRequest.md +24 -0
- data/docs/CheckoutSubscription200Response.md +18 -0
- data/docs/CheckoutSubscriptionRequest.md +22 -0
- data/docs/DeleteMediaBulkRequest.md +18 -0
- data/docs/DeleteMode.md +15 -0
- data/docs/DeletePostRequest.md +20 -0
- data/docs/DeletePostsBulkRequest.md +22 -0
- data/docs/DeleteReceiptsBulkRequest.md +18 -0
- data/docs/DeleteResult.md +22 -0
- data/docs/DeleteUser400Response.md +20 -0
- data/docs/DeleteUsersBulkRequest.md +18 -0
- data/docs/DeleteWorkspacesBulkRequest.md +18 -0
- data/docs/GetRemoteUploadStatus200Response.md +20 -0
- data/docs/InitiateChunkedUpload200Response.md +22 -0
- data/docs/InitiateChunkedUploadRequest.md +22 -0
- data/docs/InitiateRemoteUpload200Response.md +49 -0
- data/docs/InitiateRemoteUpload200ResponseOneOf.md +18 -0
- data/docs/InitiateRemoteUploadRequest.md +20 -0
- data/docs/ListAccounts200Response.md +18 -0
- data/docs/ListMedia200Response.md +22 -0
- data/docs/ListPosts200Response.md +22 -0
- data/docs/ListReceipts200Response.md +22 -0
- data/docs/ListTags200Response.md +18 -0
- data/docs/ListUsers200Response.md +22 -0
- data/docs/ListWorkspaces200Response.md +22 -0
- data/docs/Media.md +34 -0
- data/docs/MediaApi.md +810 -0
- data/docs/PaginationMeta.md +20 -0
- data/docs/PaginationMetaLinks.md +24 -0
- data/docs/PaginationMetaMeta.md +28 -0
- data/docs/Post.md +36 -0
- data/docs/PostContent.md +24 -0
- data/docs/PostInput.md +34 -0
- data/docs/PostStatus.md +15 -0
- data/docs/PostVersion.md +24 -0
- data/docs/PostsApi.md +659 -0
- data/docs/Receipt.md +36 -0
- data/docs/ReceiptInput.md +34 -0
- data/docs/ReceiptUpdateInput.md +32 -0
- data/docs/ReceiptsApi.md +421 -0
- data/docs/RemoveUserFromWorkspaceRequest.md +18 -0
- data/docs/SchedulePostRequest.md +18 -0
- data/docs/ScheduleResult.md +20 -0
- data/docs/Subscription.md +32 -0
- data/docs/SubscriptionInput.md +24 -0
- data/docs/SubscriptionStatus.md +15 -0
- data/docs/SubscriptionUpdateInput.md +24 -0
- data/docs/SubscriptionsApi.md +699 -0
- data/docs/Tag.md +24 -0
- data/docs/TagInput.md +20 -0
- data/docs/TagsApi.md +357 -0
- data/docs/UpdateMediaRequest.md +18 -0
- data/docs/UploadChunk200Response.md +18 -0
- data/docs/User.md +28 -0
- data/docs/UserInput.md +26 -0
- data/docs/UserUpdateInput.md +26 -0
- data/docs/UsersApi.md +419 -0
- data/docs/Workspace.md +28 -0
- data/docs/WorkspaceInput.md +24 -0
- data/docs/WorkspaceUserInput.md +24 -0
- data/docs/WorkspacesApi.md +637 -0
- data/git_push.sh +57 -0
- data/lib/postboost/api/accounts_api.rb +154 -0
- data/lib/postboost/api/media_api.rb +836 -0
- data/lib/postboost/api/posts_api.rb +673 -0
- data/lib/postboost/api/receipts_api.rb +409 -0
- data/lib/postboost/api/subscriptions_api.rb +689 -0
- data/lib/postboost/api/tags_api.rb +367 -0
- data/lib/postboost/api/users_api.rb +406 -0
- data/lib/postboost/api/workspaces_api.rb +640 -0
- data/lib/postboost/api_client.rb +394 -0
- data/lib/postboost/api_error.rb +58 -0
- data/lib/postboost/configuration.rb +308 -0
- data/lib/postboost/models/account.rb +321 -0
- data/lib/postboost/models/add_generic_subscription_request.rb +274 -0
- data/lib/postboost/models/change_subscription_plan_request.rb +303 -0
- data/lib/postboost/models/checkout_subscription200_response.rb +214 -0
- data/lib/postboost/models/checkout_subscription_request.rb +280 -0
- data/lib/postboost/models/delete_media_bulk_request.rb +224 -0
- data/lib/postboost/models/delete_mode.rb +41 -0
- data/lib/postboost/models/delete_post_request.rb +249 -0
- data/lib/postboost/models/delete_posts_bulk_request.rb +269 -0
- data/lib/postboost/models/delete_receipts_bulk_request.rb +223 -0
- data/lib/postboost/models/delete_result.rb +232 -0
- data/lib/postboost/models/delete_user400_response.rb +223 -0
- data/lib/postboost/models/delete_users_bulk_request.rb +223 -0
- data/lib/postboost/models/delete_workspaces_bulk_request.rb +223 -0
- data/lib/postboost/models/get_remote_upload_status200_response.rb +258 -0
- data/lib/postboost/models/initiate_chunked_upload200_response.rb +232 -0
- data/lib/postboost/models/initiate_chunked_upload_request.rb +273 -0
- data/lib/postboost/models/initiate_remote_upload200_response.rb +105 -0
- data/lib/postboost/models/initiate_remote_upload200_response_one_of.rb +214 -0
- data/lib/postboost/models/initiate_remote_upload_request.rb +250 -0
- data/lib/postboost/models/list_accounts200_response.rb +216 -0
- data/lib/postboost/models/list_media200_response.rb +241 -0
- data/lib/postboost/models/list_posts200_response.rb +241 -0
- data/lib/postboost/models/list_receipts200_response.rb +241 -0
- data/lib/postboost/models/list_tags200_response.rb +216 -0
- data/lib/postboost/models/list_users200_response.rb +241 -0
- data/lib/postboost/models/list_workspaces200_response.rb +241 -0
- data/lib/postboost/models/media.rb +320 -0
- data/lib/postboost/models/pagination_meta.rb +223 -0
- data/lib/postboost/models/pagination_meta_links.rb +241 -0
- data/lib/postboost/models/pagination_meta_meta.rb +259 -0
- data/lib/postboost/models/post.rb +323 -0
- data/lib/postboost/models/post_content.rb +247 -0
- data/lib/postboost/models/post_input.rb +324 -0
- data/lib/postboost/models/post_status.rb +41 -0
- data/lib/postboost/models/post_version.rb +267 -0
- data/lib/postboost/models/receipt.rb +295 -0
- data/lib/postboost/models/receipt_input.rb +335 -0
- data/lib/postboost/models/receipt_update_input.rb +312 -0
- data/lib/postboost/models/remove_user_from_workspace_request.rb +221 -0
- data/lib/postboost/models/schedule_post_request.rb +221 -0
- data/lib/postboost/models/schedule_result.rb +223 -0
- data/lib/postboost/models/subscription.rb +299 -0
- data/lib/postboost/models/subscription_input.rb +285 -0
- data/lib/postboost/models/subscription_status.rb +44 -0
- data/lib/postboost/models/subscription_update_input.rb +279 -0
- data/lib/postboost/models/tag.rb +241 -0
- data/lib/postboost/models/tag_input.rb +237 -0
- data/lib/postboost/models/update_media_request.rb +222 -0
- data/lib/postboost/models/upload_chunk200_response.rb +215 -0
- data/lib/postboost/models/user.rb +259 -0
- data/lib/postboost/models/user_input.rb +304 -0
- data/lib/postboost/models/user_update_input.rb +272 -0
- data/lib/postboost/models/workspace.rb +293 -0
- data/lib/postboost/models/workspace_input.rb +315 -0
- data/lib/postboost/models/workspace_user_input.rb +303 -0
- data/lib/postboost/version.rb +15 -0
- data/lib/postboost.rb +103 -0
- data/postboost.gemspec +39 -0
- data/spec/api/accounts_api_spec.rb +60 -0
- data/spec/api/media_api_spec.rb +182 -0
- data/spec/api/posts_api_spec.rb +152 -0
- data/spec/api/receipts_api_spec.rb +103 -0
- data/spec/api/subscriptions_api_spec.rb +151 -0
- data/spec/api/tags_api_spec.rb +95 -0
- data/spec/api/users_api_spec.rb +102 -0
- data/spec/api/workspaces_api_spec.rb +142 -0
- data/spec/models/account_spec.rb +88 -0
- data/spec/models/add_generic_subscription_request_spec.rb +48 -0
- data/spec/models/change_subscription_plan_request_spec.rb +58 -0
- data/spec/models/checkout_subscription200_response_spec.rb +36 -0
- data/spec/models/checkout_subscription_request_spec.rb +52 -0
- data/spec/models/delete_media_bulk_request_spec.rb +36 -0
- data/spec/models/delete_mode_spec.rb +30 -0
- data/spec/models/delete_post_request_spec.rb +42 -0
- data/spec/models/delete_posts_bulk_request_spec.rb +48 -0
- data/spec/models/delete_receipts_bulk_request_spec.rb +36 -0
- data/spec/models/delete_result_spec.rb +48 -0
- data/spec/models/delete_user400_response_spec.rb +42 -0
- data/spec/models/delete_users_bulk_request_spec.rb +36 -0
- data/spec/models/delete_workspaces_bulk_request_spec.rb +36 -0
- data/spec/models/get_remote_upload_status200_response_spec.rb +46 -0
- data/spec/models/initiate_chunked_upload200_response_spec.rb +48 -0
- data/spec/models/initiate_chunked_upload_request_spec.rb +48 -0
- data/spec/models/initiate_remote_upload200_response_one_of_spec.rb +36 -0
- data/spec/models/initiate_remote_upload200_response_spec.rb +32 -0
- data/spec/models/initiate_remote_upload_request_spec.rb +42 -0
- data/spec/models/list_accounts200_response_spec.rb +36 -0
- data/spec/models/list_media200_response_spec.rb +48 -0
- data/spec/models/list_posts200_response_spec.rb +48 -0
- data/spec/models/list_receipts200_response_spec.rb +48 -0
- data/spec/models/list_tags200_response_spec.rb +36 -0
- data/spec/models/list_users200_response_spec.rb +48 -0
- data/spec/models/list_workspaces200_response_spec.rb +48 -0
- data/spec/models/media_spec.rb +88 -0
- data/spec/models/pagination_meta_links_spec.rb +54 -0
- data/spec/models/pagination_meta_meta_spec.rb +66 -0
- data/spec/models/pagination_meta_spec.rb +42 -0
- data/spec/models/post_content_spec.rb +54 -0
- data/spec/models/post_input_spec.rb +84 -0
- data/spec/models/post_spec.rb +90 -0
- data/spec/models/post_status_spec.rb +30 -0
- data/spec/models/post_version_spec.rb +54 -0
- data/spec/models/receipt_input_spec.rb +84 -0
- data/spec/models/receipt_spec.rb +90 -0
- data/spec/models/receipt_update_input_spec.rb +78 -0
- data/spec/models/remove_user_from_workspace_request_spec.rb +36 -0
- data/spec/models/schedule_post_request_spec.rb +36 -0
- data/spec/models/schedule_result_spec.rb +42 -0
- data/spec/models/subscription_input_spec.rb +54 -0
- data/spec/models/subscription_spec.rb +78 -0
- data/spec/models/subscription_status_spec.rb +30 -0
- data/spec/models/subscription_update_input_spec.rb +54 -0
- data/spec/models/tag_input_spec.rb +42 -0
- data/spec/models/tag_spec.rb +54 -0
- data/spec/models/update_media_request_spec.rb +36 -0
- data/spec/models/upload_chunk200_response_spec.rb +36 -0
- data/spec/models/user_input_spec.rb +60 -0
- data/spec/models/user_spec.rb +66 -0
- data/spec/models/user_update_input_spec.rb +60 -0
- data/spec/models/workspace_input_spec.rb +58 -0
- data/spec/models/workspace_spec.rb +70 -0
- data/spec/models/workspace_user_input_spec.rb +58 -0
- data/spec/spec_helper.rb +111 -0
- metadata +358 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PostBoost API
|
|
3
|
+
|
|
4
|
+
#The PostBoost REST API lets you publish, schedule, and analyze social media posts across 8+ platforms from a single integration. No OAuth apps to maintain — PostBoost handles platform authorization for you. ## Base URL All workspace-scoped endpoints are prefixed with `/{workspaceUuid}`. Panel/admin endpoints are prefixed with `/panel`. ## Authentication All requests require a Bearer token in the `Authorization` header. Generate tokens in your PostBoost dashboard under **Settings → Access Tokens**. ``` Authorization: Bearer YOUR_API_TOKEN ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: hi@postboost.co
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PostBoost
|
|
16
|
+
class TagsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create tag
|
|
23
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
24
|
+
# @param tag_input [TagInput]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Tag]
|
|
27
|
+
def create_tag(workspace_uuid, tag_input, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_tag_with_http_info(workspace_uuid, tag_input, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create tag
|
|
33
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
34
|
+
# @param tag_input [TagInput]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Tag, Integer, Hash)>] Tag data, response status code and response headers
|
|
37
|
+
def create_tag_with_http_info(workspace_uuid, tag_input, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.create_tag ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
42
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling TagsApi.create_tag"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'tag_input' is set
|
|
46
|
+
if @api_client.config.client_side_validation && tag_input.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'tag_input' when calling TagsApi.create_tag"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/{workspaceUuid}/tags'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = opts[:header_params] || {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
59
|
+
# HTTP header 'Content-Type'
|
|
60
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
61
|
+
if !content_type.nil?
|
|
62
|
+
header_params['Content-Type'] = content_type
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# form parameters
|
|
66
|
+
form_params = opts[:form_params] || {}
|
|
67
|
+
|
|
68
|
+
# http body (model)
|
|
69
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_input)
|
|
70
|
+
|
|
71
|
+
# return_type
|
|
72
|
+
return_type = opts[:debug_return_type] || 'Tag'
|
|
73
|
+
|
|
74
|
+
# auth_names
|
|
75
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
76
|
+
|
|
77
|
+
new_options = opts.merge(
|
|
78
|
+
:operation => :"TagsApi.create_tag",
|
|
79
|
+
:header_params => header_params,
|
|
80
|
+
:query_params => query_params,
|
|
81
|
+
:form_params => form_params,
|
|
82
|
+
:body => post_body,
|
|
83
|
+
:auth_names => auth_names,
|
|
84
|
+
:return_type => return_type
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
88
|
+
if @api_client.config.debugging
|
|
89
|
+
@api_client.config.logger.debug "API called: TagsApi#create_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
+
end
|
|
91
|
+
return data, status_code, headers
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Delete tag
|
|
95
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
96
|
+
# @param tag_uuid [String] UUID of the tag.
|
|
97
|
+
# @param [Hash] opts the optional parameters
|
|
98
|
+
# @return [Object]
|
|
99
|
+
def delete_tag(workspace_uuid, tag_uuid, opts = {})
|
|
100
|
+
data, _status_code, _headers = delete_tag_with_http_info(workspace_uuid, tag_uuid, opts)
|
|
101
|
+
data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Delete tag
|
|
105
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
106
|
+
# @param tag_uuid [String] UUID of the tag.
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
109
|
+
def delete_tag_with_http_info(workspace_uuid, tag_uuid, opts = {})
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.delete_tag ...'
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
114
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling TagsApi.delete_tag"
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'tag_uuid' is set
|
|
118
|
+
if @api_client.config.client_side_validation && tag_uuid.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'tag_uuid' when calling TagsApi.delete_tag"
|
|
120
|
+
end
|
|
121
|
+
# resource path
|
|
122
|
+
local_var_path = '/{workspaceUuid}/tags/{tagUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'tagUuid' + '}', CGI.escape(tag_uuid.to_s))
|
|
123
|
+
|
|
124
|
+
# query parameters
|
|
125
|
+
query_params = opts[:query_params] || {}
|
|
126
|
+
|
|
127
|
+
# header parameters
|
|
128
|
+
header_params = opts[:header_params] || {}
|
|
129
|
+
# HTTP header 'Accept' (if needed)
|
|
130
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
131
|
+
|
|
132
|
+
# form parameters
|
|
133
|
+
form_params = opts[:form_params] || {}
|
|
134
|
+
|
|
135
|
+
# http body (model)
|
|
136
|
+
post_body = opts[:debug_body]
|
|
137
|
+
|
|
138
|
+
# return_type
|
|
139
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
140
|
+
|
|
141
|
+
# auth_names
|
|
142
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
143
|
+
|
|
144
|
+
new_options = opts.merge(
|
|
145
|
+
:operation => :"TagsApi.delete_tag",
|
|
146
|
+
:header_params => header_params,
|
|
147
|
+
:query_params => query_params,
|
|
148
|
+
:form_params => form_params,
|
|
149
|
+
:body => post_body,
|
|
150
|
+
:auth_names => auth_names,
|
|
151
|
+
:return_type => return_type
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
155
|
+
if @api_client.config.debugging
|
|
156
|
+
@api_client.config.logger.debug "API called: TagsApi#delete_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
157
|
+
end
|
|
158
|
+
return data, status_code, headers
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get tag
|
|
162
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
163
|
+
# @param tag_uuid [String] UUID of the tag.
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Tag]
|
|
166
|
+
def get_tag(workspace_uuid, tag_uuid, opts = {})
|
|
167
|
+
data, _status_code, _headers = get_tag_with_http_info(workspace_uuid, tag_uuid, opts)
|
|
168
|
+
data
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Get tag
|
|
172
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
173
|
+
# @param tag_uuid [String] UUID of the tag.
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @return [Array<(Tag, Integer, Hash)>] Tag data, response status code and response headers
|
|
176
|
+
def get_tag_with_http_info(workspace_uuid, tag_uuid, opts = {})
|
|
177
|
+
if @api_client.config.debugging
|
|
178
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.get_tag ...'
|
|
179
|
+
end
|
|
180
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
181
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
182
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling TagsApi.get_tag"
|
|
183
|
+
end
|
|
184
|
+
# verify the required parameter 'tag_uuid' is set
|
|
185
|
+
if @api_client.config.client_side_validation && tag_uuid.nil?
|
|
186
|
+
fail ArgumentError, "Missing the required parameter 'tag_uuid' when calling TagsApi.get_tag"
|
|
187
|
+
end
|
|
188
|
+
# resource path
|
|
189
|
+
local_var_path = '/{workspaceUuid}/tags/{tagUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'tagUuid' + '}', CGI.escape(tag_uuid.to_s))
|
|
190
|
+
|
|
191
|
+
# query parameters
|
|
192
|
+
query_params = opts[:query_params] || {}
|
|
193
|
+
|
|
194
|
+
# header parameters
|
|
195
|
+
header_params = opts[:header_params] || {}
|
|
196
|
+
# HTTP header 'Accept' (if needed)
|
|
197
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
198
|
+
|
|
199
|
+
# form parameters
|
|
200
|
+
form_params = opts[:form_params] || {}
|
|
201
|
+
|
|
202
|
+
# http body (model)
|
|
203
|
+
post_body = opts[:debug_body]
|
|
204
|
+
|
|
205
|
+
# return_type
|
|
206
|
+
return_type = opts[:debug_return_type] || 'Tag'
|
|
207
|
+
|
|
208
|
+
# auth_names
|
|
209
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
210
|
+
|
|
211
|
+
new_options = opts.merge(
|
|
212
|
+
:operation => :"TagsApi.get_tag",
|
|
213
|
+
:header_params => header_params,
|
|
214
|
+
:query_params => query_params,
|
|
215
|
+
:form_params => form_params,
|
|
216
|
+
:body => post_body,
|
|
217
|
+
:auth_names => auth_names,
|
|
218
|
+
:return_type => return_type
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug "API called: TagsApi#get_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
224
|
+
end
|
|
225
|
+
return data, status_code, headers
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# List tags
|
|
229
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @return [ListTags200Response]
|
|
232
|
+
def list_tags(workspace_uuid, opts = {})
|
|
233
|
+
data, _status_code, _headers = list_tags_with_http_info(workspace_uuid, opts)
|
|
234
|
+
data
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# List tags
|
|
238
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @return [Array<(ListTags200Response, Integer, Hash)>] ListTags200Response data, response status code and response headers
|
|
241
|
+
def list_tags_with_http_info(workspace_uuid, opts = {})
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.list_tags ...'
|
|
244
|
+
end
|
|
245
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
246
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
247
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling TagsApi.list_tags"
|
|
248
|
+
end
|
|
249
|
+
# resource path
|
|
250
|
+
local_var_path = '/{workspaceUuid}/tags'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
251
|
+
|
|
252
|
+
# query parameters
|
|
253
|
+
query_params = opts[:query_params] || {}
|
|
254
|
+
|
|
255
|
+
# header parameters
|
|
256
|
+
header_params = opts[:header_params] || {}
|
|
257
|
+
# HTTP header 'Accept' (if needed)
|
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
259
|
+
|
|
260
|
+
# form parameters
|
|
261
|
+
form_params = opts[:form_params] || {}
|
|
262
|
+
|
|
263
|
+
# http body (model)
|
|
264
|
+
post_body = opts[:debug_body]
|
|
265
|
+
|
|
266
|
+
# return_type
|
|
267
|
+
return_type = opts[:debug_return_type] || 'ListTags200Response'
|
|
268
|
+
|
|
269
|
+
# auth_names
|
|
270
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
271
|
+
|
|
272
|
+
new_options = opts.merge(
|
|
273
|
+
:operation => :"TagsApi.list_tags",
|
|
274
|
+
:header_params => header_params,
|
|
275
|
+
:query_params => query_params,
|
|
276
|
+
:form_params => form_params,
|
|
277
|
+
:body => post_body,
|
|
278
|
+
:auth_names => auth_names,
|
|
279
|
+
:return_type => return_type
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
283
|
+
if @api_client.config.debugging
|
|
284
|
+
@api_client.config.logger.debug "API called: TagsApi#list_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
285
|
+
end
|
|
286
|
+
return data, status_code, headers
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Update tag
|
|
290
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
291
|
+
# @param tag_uuid [String] UUID of the tag.
|
|
292
|
+
# @param tag_input [TagInput]
|
|
293
|
+
# @param [Hash] opts the optional parameters
|
|
294
|
+
# @return [Object]
|
|
295
|
+
def update_tag(workspace_uuid, tag_uuid, tag_input, opts = {})
|
|
296
|
+
data, _status_code, _headers = update_tag_with_http_info(workspace_uuid, tag_uuid, tag_input, opts)
|
|
297
|
+
data
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Update tag
|
|
301
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
302
|
+
# @param tag_uuid [String] UUID of the tag.
|
|
303
|
+
# @param tag_input [TagInput]
|
|
304
|
+
# @param [Hash] opts the optional parameters
|
|
305
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
306
|
+
def update_tag_with_http_info(workspace_uuid, tag_uuid, tag_input, opts = {})
|
|
307
|
+
if @api_client.config.debugging
|
|
308
|
+
@api_client.config.logger.debug 'Calling API: TagsApi.update_tag ...'
|
|
309
|
+
end
|
|
310
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
311
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
312
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling TagsApi.update_tag"
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'tag_uuid' is set
|
|
315
|
+
if @api_client.config.client_side_validation && tag_uuid.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'tag_uuid' when calling TagsApi.update_tag"
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'tag_input' is set
|
|
319
|
+
if @api_client.config.client_side_validation && tag_input.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'tag_input' when calling TagsApi.update_tag"
|
|
321
|
+
end
|
|
322
|
+
# resource path
|
|
323
|
+
local_var_path = '/{workspaceUuid}/tags/{tagUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'tagUuid' + '}', CGI.escape(tag_uuid.to_s))
|
|
324
|
+
|
|
325
|
+
# query parameters
|
|
326
|
+
query_params = opts[:query_params] || {}
|
|
327
|
+
|
|
328
|
+
# header parameters
|
|
329
|
+
header_params = opts[:header_params] || {}
|
|
330
|
+
# HTTP header 'Accept' (if needed)
|
|
331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
332
|
+
# HTTP header 'Content-Type'
|
|
333
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
334
|
+
if !content_type.nil?
|
|
335
|
+
header_params['Content-Type'] = content_type
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# form parameters
|
|
339
|
+
form_params = opts[:form_params] || {}
|
|
340
|
+
|
|
341
|
+
# http body (model)
|
|
342
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_input)
|
|
343
|
+
|
|
344
|
+
# return_type
|
|
345
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
346
|
+
|
|
347
|
+
# auth_names
|
|
348
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
349
|
+
|
|
350
|
+
new_options = opts.merge(
|
|
351
|
+
:operation => :"TagsApi.update_tag",
|
|
352
|
+
:header_params => header_params,
|
|
353
|
+
:query_params => query_params,
|
|
354
|
+
:form_params => form_params,
|
|
355
|
+
:body => post_body,
|
|
356
|
+
:auth_names => auth_names,
|
|
357
|
+
:return_type => return_type
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
361
|
+
if @api_client.config.debugging
|
|
362
|
+
@api_client.config.logger.debug "API called: TagsApi#update_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
363
|
+
end
|
|
364
|
+
return data, status_code, headers
|
|
365
|
+
end
|
|
366
|
+
end
|
|
367
|
+
end
|