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,637 @@
|
|
|
1
|
+
# PostBoost::WorkspacesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://postboost.co/app/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**add_user_to_workspace**](WorkspacesApi.md#add_user_to_workspace) | **POST** /panel/workspaces/{workspaceUuid}/users | Add user to workspace |
|
|
8
|
+
| [**create_workspace**](WorkspacesApi.md#create_workspace) | **POST** /panel/workspaces | Create workspace |
|
|
9
|
+
| [**delete_workspace**](WorkspacesApi.md#delete_workspace) | **DELETE** /panel/workspaces/{workspaceUuid} | Delete workspace |
|
|
10
|
+
| [**delete_workspaces_bulk**](WorkspacesApi.md#delete_workspaces_bulk) | **DELETE** /panel/workspaces | Delete workspaces (bulk) |
|
|
11
|
+
| [**get_workspace**](WorkspacesApi.md#get_workspace) | **GET** /panel/workspaces/{workspaceUuid} | Get workspace |
|
|
12
|
+
| [**list_workspaces**](WorkspacesApi.md#list_workspaces) | **GET** /panel/workspaces | List workspaces |
|
|
13
|
+
| [**remove_user_from_workspace**](WorkspacesApi.md#remove_user_from_workspace) | **DELETE** /panel/workspaces/{workspaceUuid}/users | Remove user from workspace |
|
|
14
|
+
| [**update_workspace**](WorkspacesApi.md#update_workspace) | **PUT** /panel/workspaces/{workspaceUuid} | Update workspace |
|
|
15
|
+
| [**update_workspace_user**](WorkspacesApi.md#update_workspace_user) | **PUT** /panel/workspaces/{workspaceUuid}/users | Update user role in workspace |
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## add_user_to_workspace
|
|
19
|
+
|
|
20
|
+
> Object add_user_to_workspace(workspace_uuid, workspace_user_input)
|
|
21
|
+
|
|
22
|
+
Add user to workspace
|
|
23
|
+
|
|
24
|
+
### Examples
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
require 'time'
|
|
28
|
+
require 'postboost'
|
|
29
|
+
# setup authorization
|
|
30
|
+
PostBoost.configure do |config|
|
|
31
|
+
# Configure Bearer authorization: bearerAuth
|
|
32
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
36
|
+
workspace_uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | UUID of the workspace.
|
|
37
|
+
workspace_user_input = PostBoost::WorkspaceUserInput.new({user_id: 37, role: 'admin', can_approve: false, is_owner: false}) # WorkspaceUserInput |
|
|
38
|
+
|
|
39
|
+
begin
|
|
40
|
+
# Add user to workspace
|
|
41
|
+
result = api_instance.add_user_to_workspace(workspace_uuid, workspace_user_input)
|
|
42
|
+
p result
|
|
43
|
+
rescue PostBoost::ApiError => e
|
|
44
|
+
puts "Error when calling WorkspacesApi->add_user_to_workspace: #{e}"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Using the add_user_to_workspace_with_http_info variant
|
|
49
|
+
|
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
|
51
|
+
|
|
52
|
+
> <Array(Object, Integer, Hash)> add_user_to_workspace_with_http_info(workspace_uuid, workspace_user_input)
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
begin
|
|
56
|
+
# Add user to workspace
|
|
57
|
+
data, status_code, headers = api_instance.add_user_to_workspace_with_http_info(workspace_uuid, workspace_user_input)
|
|
58
|
+
p status_code # => 2xx
|
|
59
|
+
p headers # => { ... }
|
|
60
|
+
p data # => Object
|
|
61
|
+
rescue PostBoost::ApiError => e
|
|
62
|
+
puts "Error when calling WorkspacesApi->add_user_to_workspace_with_http_info: #{e}"
|
|
63
|
+
end
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
|
70
|
+
| **workspace_uuid** | **String** | UUID of the workspace. | |
|
|
71
|
+
| **workspace_user_input** | [**WorkspaceUserInput**](WorkspaceUserInput.md) | | |
|
|
72
|
+
|
|
73
|
+
### Return type
|
|
74
|
+
|
|
75
|
+
**Object**
|
|
76
|
+
|
|
77
|
+
### Authorization
|
|
78
|
+
|
|
79
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
80
|
+
|
|
81
|
+
### HTTP request headers
|
|
82
|
+
|
|
83
|
+
- **Content-Type**: application/json
|
|
84
|
+
- **Accept**: application/json
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## create_workspace
|
|
88
|
+
|
|
89
|
+
> <Workspace> create_workspace(workspace_input)
|
|
90
|
+
|
|
91
|
+
Create workspace
|
|
92
|
+
|
|
93
|
+
Create a new workspace. Admin only.
|
|
94
|
+
|
|
95
|
+
### Examples
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
require 'time'
|
|
99
|
+
require 'postboost'
|
|
100
|
+
# setup authorization
|
|
101
|
+
PostBoost.configure do |config|
|
|
102
|
+
# Configure Bearer authorization: bearerAuth
|
|
103
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
107
|
+
workspace_input = PostBoost::WorkspaceInput.new({name: 'name_example', hex_color: '#1d4ed8', access_status: 'subscription'}) # WorkspaceInput |
|
|
108
|
+
|
|
109
|
+
begin
|
|
110
|
+
# Create workspace
|
|
111
|
+
result = api_instance.create_workspace(workspace_input)
|
|
112
|
+
p result
|
|
113
|
+
rescue PostBoost::ApiError => e
|
|
114
|
+
puts "Error when calling WorkspacesApi->create_workspace: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the create_workspace_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(<Workspace>, Integer, Hash)> create_workspace_with_http_info(workspace_input)
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
# Create workspace
|
|
127
|
+
data, status_code, headers = api_instance.create_workspace_with_http_info(workspace_input)
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => <Workspace>
|
|
131
|
+
rescue PostBoost::ApiError => e
|
|
132
|
+
puts "Error when calling WorkspacesApi->create_workspace_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
|
140
|
+
| **workspace_input** | [**WorkspaceInput**](WorkspaceInput.md) | | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
[**Workspace**](Workspace.md)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: application/json
|
|
153
|
+
- **Accept**: application/json
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## delete_workspace
|
|
157
|
+
|
|
158
|
+
> Object delete_workspace(workspace_uuid)
|
|
159
|
+
|
|
160
|
+
Delete workspace
|
|
161
|
+
|
|
162
|
+
### Examples
|
|
163
|
+
|
|
164
|
+
```ruby
|
|
165
|
+
require 'time'
|
|
166
|
+
require 'postboost'
|
|
167
|
+
# setup authorization
|
|
168
|
+
PostBoost.configure do |config|
|
|
169
|
+
# Configure Bearer authorization: bearerAuth
|
|
170
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
174
|
+
workspace_uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | UUID of the workspace.
|
|
175
|
+
|
|
176
|
+
begin
|
|
177
|
+
# Delete workspace
|
|
178
|
+
result = api_instance.delete_workspace(workspace_uuid)
|
|
179
|
+
p result
|
|
180
|
+
rescue PostBoost::ApiError => e
|
|
181
|
+
puts "Error when calling WorkspacesApi->delete_workspace: #{e}"
|
|
182
|
+
end
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### Using the delete_workspace_with_http_info variant
|
|
186
|
+
|
|
187
|
+
This returns an Array which contains the response data, status code and headers.
|
|
188
|
+
|
|
189
|
+
> <Array(Object, Integer, Hash)> delete_workspace_with_http_info(workspace_uuid)
|
|
190
|
+
|
|
191
|
+
```ruby
|
|
192
|
+
begin
|
|
193
|
+
# Delete workspace
|
|
194
|
+
data, status_code, headers = api_instance.delete_workspace_with_http_info(workspace_uuid)
|
|
195
|
+
p status_code # => 2xx
|
|
196
|
+
p headers # => { ... }
|
|
197
|
+
p data # => Object
|
|
198
|
+
rescue PostBoost::ApiError => e
|
|
199
|
+
puts "Error when calling WorkspacesApi->delete_workspace_with_http_info: #{e}"
|
|
200
|
+
end
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Parameters
|
|
204
|
+
|
|
205
|
+
| Name | Type | Description | Notes |
|
|
206
|
+
| ---- | ---- | ----------- | ----- |
|
|
207
|
+
| **workspace_uuid** | **String** | UUID of the workspace. | |
|
|
208
|
+
|
|
209
|
+
### Return type
|
|
210
|
+
|
|
211
|
+
**Object**
|
|
212
|
+
|
|
213
|
+
### Authorization
|
|
214
|
+
|
|
215
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
216
|
+
|
|
217
|
+
### HTTP request headers
|
|
218
|
+
|
|
219
|
+
- **Content-Type**: Not defined
|
|
220
|
+
- **Accept**: application/json
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
## delete_workspaces_bulk
|
|
224
|
+
|
|
225
|
+
> Object delete_workspaces_bulk(delete_workspaces_bulk_request)
|
|
226
|
+
|
|
227
|
+
Delete workspaces (bulk)
|
|
228
|
+
|
|
229
|
+
### Examples
|
|
230
|
+
|
|
231
|
+
```ruby
|
|
232
|
+
require 'time'
|
|
233
|
+
require 'postboost'
|
|
234
|
+
# setup authorization
|
|
235
|
+
PostBoost.configure do |config|
|
|
236
|
+
# Configure Bearer authorization: bearerAuth
|
|
237
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
241
|
+
delete_workspaces_bulk_request = PostBoost::DeleteWorkspacesBulkRequest.new({workspaces: ['workspaces_example']}) # DeleteWorkspacesBulkRequest |
|
|
242
|
+
|
|
243
|
+
begin
|
|
244
|
+
# Delete workspaces (bulk)
|
|
245
|
+
result = api_instance.delete_workspaces_bulk(delete_workspaces_bulk_request)
|
|
246
|
+
p result
|
|
247
|
+
rescue PostBoost::ApiError => e
|
|
248
|
+
puts "Error when calling WorkspacesApi->delete_workspaces_bulk: #{e}"
|
|
249
|
+
end
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
#### Using the delete_workspaces_bulk_with_http_info variant
|
|
253
|
+
|
|
254
|
+
This returns an Array which contains the response data, status code and headers.
|
|
255
|
+
|
|
256
|
+
> <Array(Object, Integer, Hash)> delete_workspaces_bulk_with_http_info(delete_workspaces_bulk_request)
|
|
257
|
+
|
|
258
|
+
```ruby
|
|
259
|
+
begin
|
|
260
|
+
# Delete workspaces (bulk)
|
|
261
|
+
data, status_code, headers = api_instance.delete_workspaces_bulk_with_http_info(delete_workspaces_bulk_request)
|
|
262
|
+
p status_code # => 2xx
|
|
263
|
+
p headers # => { ... }
|
|
264
|
+
p data # => Object
|
|
265
|
+
rescue PostBoost::ApiError => e
|
|
266
|
+
puts "Error when calling WorkspacesApi->delete_workspaces_bulk_with_http_info: #{e}"
|
|
267
|
+
end
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Parameters
|
|
271
|
+
|
|
272
|
+
| Name | Type | Description | Notes |
|
|
273
|
+
| ---- | ---- | ----------- | ----- |
|
|
274
|
+
| **delete_workspaces_bulk_request** | [**DeleteWorkspacesBulkRequest**](DeleteWorkspacesBulkRequest.md) | | |
|
|
275
|
+
|
|
276
|
+
### Return type
|
|
277
|
+
|
|
278
|
+
**Object**
|
|
279
|
+
|
|
280
|
+
### Authorization
|
|
281
|
+
|
|
282
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
283
|
+
|
|
284
|
+
### HTTP request headers
|
|
285
|
+
|
|
286
|
+
- **Content-Type**: application/json
|
|
287
|
+
- **Accept**: application/json
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
## get_workspace
|
|
291
|
+
|
|
292
|
+
> <Workspace> get_workspace(workspace_uuid)
|
|
293
|
+
|
|
294
|
+
Get workspace
|
|
295
|
+
|
|
296
|
+
### Examples
|
|
297
|
+
|
|
298
|
+
```ruby
|
|
299
|
+
require 'time'
|
|
300
|
+
require 'postboost'
|
|
301
|
+
# setup authorization
|
|
302
|
+
PostBoost.configure do |config|
|
|
303
|
+
# Configure Bearer authorization: bearerAuth
|
|
304
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
308
|
+
workspace_uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | UUID of the workspace.
|
|
309
|
+
|
|
310
|
+
begin
|
|
311
|
+
# Get workspace
|
|
312
|
+
result = api_instance.get_workspace(workspace_uuid)
|
|
313
|
+
p result
|
|
314
|
+
rescue PostBoost::ApiError => e
|
|
315
|
+
puts "Error when calling WorkspacesApi->get_workspace: #{e}"
|
|
316
|
+
end
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
#### Using the get_workspace_with_http_info variant
|
|
320
|
+
|
|
321
|
+
This returns an Array which contains the response data, status code and headers.
|
|
322
|
+
|
|
323
|
+
> <Array(<Workspace>, Integer, Hash)> get_workspace_with_http_info(workspace_uuid)
|
|
324
|
+
|
|
325
|
+
```ruby
|
|
326
|
+
begin
|
|
327
|
+
# Get workspace
|
|
328
|
+
data, status_code, headers = api_instance.get_workspace_with_http_info(workspace_uuid)
|
|
329
|
+
p status_code # => 2xx
|
|
330
|
+
p headers # => { ... }
|
|
331
|
+
p data # => <Workspace>
|
|
332
|
+
rescue PostBoost::ApiError => e
|
|
333
|
+
puts "Error when calling WorkspacesApi->get_workspace_with_http_info: #{e}"
|
|
334
|
+
end
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Parameters
|
|
338
|
+
|
|
339
|
+
| Name | Type | Description | Notes |
|
|
340
|
+
| ---- | ---- | ----------- | ----- |
|
|
341
|
+
| **workspace_uuid** | **String** | UUID of the workspace. | |
|
|
342
|
+
|
|
343
|
+
### Return type
|
|
344
|
+
|
|
345
|
+
[**Workspace**](Workspace.md)
|
|
346
|
+
|
|
347
|
+
### Authorization
|
|
348
|
+
|
|
349
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
350
|
+
|
|
351
|
+
### HTTP request headers
|
|
352
|
+
|
|
353
|
+
- **Content-Type**: Not defined
|
|
354
|
+
- **Accept**: application/json
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
## list_workspaces
|
|
358
|
+
|
|
359
|
+
> <ListWorkspaces200Response> list_workspaces(opts)
|
|
360
|
+
|
|
361
|
+
List workspaces
|
|
362
|
+
|
|
363
|
+
Returns a paginated list of all workspaces. Admin only.
|
|
364
|
+
|
|
365
|
+
### Examples
|
|
366
|
+
|
|
367
|
+
```ruby
|
|
368
|
+
require 'time'
|
|
369
|
+
require 'postboost'
|
|
370
|
+
# setup authorization
|
|
371
|
+
PostBoost.configure do |config|
|
|
372
|
+
# Configure Bearer authorization: bearerAuth
|
|
373
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
377
|
+
opts = {
|
|
378
|
+
keyword: 'keyword_example', # String |
|
|
379
|
+
subscription_status: 'active', # String |
|
|
380
|
+
access_status: 'subscription' # String |
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
begin
|
|
384
|
+
# List workspaces
|
|
385
|
+
result = api_instance.list_workspaces(opts)
|
|
386
|
+
p result
|
|
387
|
+
rescue PostBoost::ApiError => e
|
|
388
|
+
puts "Error when calling WorkspacesApi->list_workspaces: #{e}"
|
|
389
|
+
end
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
#### Using the list_workspaces_with_http_info variant
|
|
393
|
+
|
|
394
|
+
This returns an Array which contains the response data, status code and headers.
|
|
395
|
+
|
|
396
|
+
> <Array(<ListWorkspaces200Response>, Integer, Hash)> list_workspaces_with_http_info(opts)
|
|
397
|
+
|
|
398
|
+
```ruby
|
|
399
|
+
begin
|
|
400
|
+
# List workspaces
|
|
401
|
+
data, status_code, headers = api_instance.list_workspaces_with_http_info(opts)
|
|
402
|
+
p status_code # => 2xx
|
|
403
|
+
p headers # => { ... }
|
|
404
|
+
p data # => <ListWorkspaces200Response>
|
|
405
|
+
rescue PostBoost::ApiError => e
|
|
406
|
+
puts "Error when calling WorkspacesApi->list_workspaces_with_http_info: #{e}"
|
|
407
|
+
end
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Parameters
|
|
411
|
+
|
|
412
|
+
| Name | Type | Description | Notes |
|
|
413
|
+
| ---- | ---- | ----------- | ----- |
|
|
414
|
+
| **keyword** | **String** | | [optional] |
|
|
415
|
+
| **subscription_status** | **String** | | [optional] |
|
|
416
|
+
| **access_status** | **String** | | [optional] |
|
|
417
|
+
|
|
418
|
+
### Return type
|
|
419
|
+
|
|
420
|
+
[**ListWorkspaces200Response**](ListWorkspaces200Response.md)
|
|
421
|
+
|
|
422
|
+
### Authorization
|
|
423
|
+
|
|
424
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
425
|
+
|
|
426
|
+
### HTTP request headers
|
|
427
|
+
|
|
428
|
+
- **Content-Type**: Not defined
|
|
429
|
+
- **Accept**: application/json
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
## remove_user_from_workspace
|
|
433
|
+
|
|
434
|
+
> Object remove_user_from_workspace(workspace_uuid, remove_user_from_workspace_request)
|
|
435
|
+
|
|
436
|
+
Remove user from workspace
|
|
437
|
+
|
|
438
|
+
### Examples
|
|
439
|
+
|
|
440
|
+
```ruby
|
|
441
|
+
require 'time'
|
|
442
|
+
require 'postboost'
|
|
443
|
+
# setup authorization
|
|
444
|
+
PostBoost.configure do |config|
|
|
445
|
+
# Configure Bearer authorization: bearerAuth
|
|
446
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
450
|
+
workspace_uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | UUID of the workspace.
|
|
451
|
+
remove_user_from_workspace_request = PostBoost::RemoveUserFromWorkspaceRequest.new({user_id: 37}) # RemoveUserFromWorkspaceRequest |
|
|
452
|
+
|
|
453
|
+
begin
|
|
454
|
+
# Remove user from workspace
|
|
455
|
+
result = api_instance.remove_user_from_workspace(workspace_uuid, remove_user_from_workspace_request)
|
|
456
|
+
p result
|
|
457
|
+
rescue PostBoost::ApiError => e
|
|
458
|
+
puts "Error when calling WorkspacesApi->remove_user_from_workspace: #{e}"
|
|
459
|
+
end
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
#### Using the remove_user_from_workspace_with_http_info variant
|
|
463
|
+
|
|
464
|
+
This returns an Array which contains the response data, status code and headers.
|
|
465
|
+
|
|
466
|
+
> <Array(Object, Integer, Hash)> remove_user_from_workspace_with_http_info(workspace_uuid, remove_user_from_workspace_request)
|
|
467
|
+
|
|
468
|
+
```ruby
|
|
469
|
+
begin
|
|
470
|
+
# Remove user from workspace
|
|
471
|
+
data, status_code, headers = api_instance.remove_user_from_workspace_with_http_info(workspace_uuid, remove_user_from_workspace_request)
|
|
472
|
+
p status_code # => 2xx
|
|
473
|
+
p headers # => { ... }
|
|
474
|
+
p data # => Object
|
|
475
|
+
rescue PostBoost::ApiError => e
|
|
476
|
+
puts "Error when calling WorkspacesApi->remove_user_from_workspace_with_http_info: #{e}"
|
|
477
|
+
end
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
### Parameters
|
|
481
|
+
|
|
482
|
+
| Name | Type | Description | Notes |
|
|
483
|
+
| ---- | ---- | ----------- | ----- |
|
|
484
|
+
| **workspace_uuid** | **String** | UUID of the workspace. | |
|
|
485
|
+
| **remove_user_from_workspace_request** | [**RemoveUserFromWorkspaceRequest**](RemoveUserFromWorkspaceRequest.md) | | |
|
|
486
|
+
|
|
487
|
+
### Return type
|
|
488
|
+
|
|
489
|
+
**Object**
|
|
490
|
+
|
|
491
|
+
### Authorization
|
|
492
|
+
|
|
493
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
494
|
+
|
|
495
|
+
### HTTP request headers
|
|
496
|
+
|
|
497
|
+
- **Content-Type**: application/json
|
|
498
|
+
- **Accept**: application/json
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
## update_workspace
|
|
502
|
+
|
|
503
|
+
> Object update_workspace(workspace_uuid, workspace_input)
|
|
504
|
+
|
|
505
|
+
Update workspace
|
|
506
|
+
|
|
507
|
+
### Examples
|
|
508
|
+
|
|
509
|
+
```ruby
|
|
510
|
+
require 'time'
|
|
511
|
+
require 'postboost'
|
|
512
|
+
# setup authorization
|
|
513
|
+
PostBoost.configure do |config|
|
|
514
|
+
# Configure Bearer authorization: bearerAuth
|
|
515
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
519
|
+
workspace_uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | UUID of the workspace.
|
|
520
|
+
workspace_input = PostBoost::WorkspaceInput.new({name: 'name_example', hex_color: '#1d4ed8', access_status: 'subscription'}) # WorkspaceInput |
|
|
521
|
+
|
|
522
|
+
begin
|
|
523
|
+
# Update workspace
|
|
524
|
+
result = api_instance.update_workspace(workspace_uuid, workspace_input)
|
|
525
|
+
p result
|
|
526
|
+
rescue PostBoost::ApiError => e
|
|
527
|
+
puts "Error when calling WorkspacesApi->update_workspace: #{e}"
|
|
528
|
+
end
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
#### Using the update_workspace_with_http_info variant
|
|
532
|
+
|
|
533
|
+
This returns an Array which contains the response data, status code and headers.
|
|
534
|
+
|
|
535
|
+
> <Array(Object, Integer, Hash)> update_workspace_with_http_info(workspace_uuid, workspace_input)
|
|
536
|
+
|
|
537
|
+
```ruby
|
|
538
|
+
begin
|
|
539
|
+
# Update workspace
|
|
540
|
+
data, status_code, headers = api_instance.update_workspace_with_http_info(workspace_uuid, workspace_input)
|
|
541
|
+
p status_code # => 2xx
|
|
542
|
+
p headers # => { ... }
|
|
543
|
+
p data # => Object
|
|
544
|
+
rescue PostBoost::ApiError => e
|
|
545
|
+
puts "Error when calling WorkspacesApi->update_workspace_with_http_info: #{e}"
|
|
546
|
+
end
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
### Parameters
|
|
550
|
+
|
|
551
|
+
| Name | Type | Description | Notes |
|
|
552
|
+
| ---- | ---- | ----------- | ----- |
|
|
553
|
+
| **workspace_uuid** | **String** | UUID of the workspace. | |
|
|
554
|
+
| **workspace_input** | [**WorkspaceInput**](WorkspaceInput.md) | | |
|
|
555
|
+
|
|
556
|
+
### Return type
|
|
557
|
+
|
|
558
|
+
**Object**
|
|
559
|
+
|
|
560
|
+
### Authorization
|
|
561
|
+
|
|
562
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
563
|
+
|
|
564
|
+
### HTTP request headers
|
|
565
|
+
|
|
566
|
+
- **Content-Type**: application/json
|
|
567
|
+
- **Accept**: application/json
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
## update_workspace_user
|
|
571
|
+
|
|
572
|
+
> Object update_workspace_user(workspace_uuid, workspace_user_input)
|
|
573
|
+
|
|
574
|
+
Update user role in workspace
|
|
575
|
+
|
|
576
|
+
### Examples
|
|
577
|
+
|
|
578
|
+
```ruby
|
|
579
|
+
require 'time'
|
|
580
|
+
require 'postboost'
|
|
581
|
+
# setup authorization
|
|
582
|
+
PostBoost.configure do |config|
|
|
583
|
+
# Configure Bearer authorization: bearerAuth
|
|
584
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
api_instance = PostBoost::WorkspacesApi.new
|
|
588
|
+
workspace_uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | UUID of the workspace.
|
|
589
|
+
workspace_user_input = PostBoost::WorkspaceUserInput.new({user_id: 37, role: 'admin', can_approve: false, is_owner: false}) # WorkspaceUserInput |
|
|
590
|
+
|
|
591
|
+
begin
|
|
592
|
+
# Update user role in workspace
|
|
593
|
+
result = api_instance.update_workspace_user(workspace_uuid, workspace_user_input)
|
|
594
|
+
p result
|
|
595
|
+
rescue PostBoost::ApiError => e
|
|
596
|
+
puts "Error when calling WorkspacesApi->update_workspace_user: #{e}"
|
|
597
|
+
end
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
#### Using the update_workspace_user_with_http_info variant
|
|
601
|
+
|
|
602
|
+
This returns an Array which contains the response data, status code and headers.
|
|
603
|
+
|
|
604
|
+
> <Array(Object, Integer, Hash)> update_workspace_user_with_http_info(workspace_uuid, workspace_user_input)
|
|
605
|
+
|
|
606
|
+
```ruby
|
|
607
|
+
begin
|
|
608
|
+
# Update user role in workspace
|
|
609
|
+
data, status_code, headers = api_instance.update_workspace_user_with_http_info(workspace_uuid, workspace_user_input)
|
|
610
|
+
p status_code # => 2xx
|
|
611
|
+
p headers # => { ... }
|
|
612
|
+
p data # => Object
|
|
613
|
+
rescue PostBoost::ApiError => e
|
|
614
|
+
puts "Error when calling WorkspacesApi->update_workspace_user_with_http_info: #{e}"
|
|
615
|
+
end
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
### Parameters
|
|
619
|
+
|
|
620
|
+
| Name | Type | Description | Notes |
|
|
621
|
+
| ---- | ---- | ----------- | ----- |
|
|
622
|
+
| **workspace_uuid** | **String** | UUID of the workspace. | |
|
|
623
|
+
| **workspace_user_input** | [**WorkspaceUserInput**](WorkspaceUserInput.md) | | |
|
|
624
|
+
|
|
625
|
+
### Return type
|
|
626
|
+
|
|
627
|
+
**Object**
|
|
628
|
+
|
|
629
|
+
### Authorization
|
|
630
|
+
|
|
631
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
632
|
+
|
|
633
|
+
### HTTP request headers
|
|
634
|
+
|
|
635
|
+
- **Content-Type**: application/json
|
|
636
|
+
- **Accept**: application/json
|
|
637
|
+
|
data/git_push.sh
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
+
#
|
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
+
|
|
6
|
+
git_user_id=$1
|
|
7
|
+
git_repo_id=$2
|
|
8
|
+
release_note=$3
|
|
9
|
+
git_host=$4
|
|
10
|
+
|
|
11
|
+
if [ "$git_host" = "" ]; then
|
|
12
|
+
git_host="github.com"
|
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
|
17
|
+
git_user_id="GIT_USER_ID"
|
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ "$release_note" = "" ]; then
|
|
27
|
+
release_note="Minor update"
|
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Initialize the local directory as a Git repository
|
|
32
|
+
git init
|
|
33
|
+
|
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
|
35
|
+
git add .
|
|
36
|
+
|
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
+
git commit -m "$release_note"
|
|
39
|
+
|
|
40
|
+
# Sets the new remote
|
|
41
|
+
git_remote=$(git remote)
|
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
+
|
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
+
else
|
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
git pull origin master
|
|
54
|
+
|
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|