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,154 @@
|
|
|
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 AccountsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get account
|
|
23
|
+
# Returns a single social media account.
|
|
24
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
25
|
+
# @param account_uuid [String] UUID of the social media account.
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [Account]
|
|
28
|
+
def get_account(workspace_uuid, account_uuid, opts = {})
|
|
29
|
+
data, _status_code, _headers = get_account_with_http_info(workspace_uuid, account_uuid, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Get account
|
|
34
|
+
# Returns a single social media account.
|
|
35
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
36
|
+
# @param account_uuid [String] UUID of the social media account.
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers
|
|
39
|
+
def get_account_with_http_info(workspace_uuid, account_uuid, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: AccountsApi.get_account ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
44
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling AccountsApi.get_account"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'account_uuid' is set
|
|
48
|
+
if @api_client.config.client_side_validation && account_uuid.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'account_uuid' when calling AccountsApi.get_account"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/{workspaceUuid}/accounts/{accountUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'accountUuid' + '}', CGI.escape(account_uuid.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = opts[:form_params] || {}
|
|
64
|
+
|
|
65
|
+
# http body (model)
|
|
66
|
+
post_body = opts[:debug_body]
|
|
67
|
+
|
|
68
|
+
# return_type
|
|
69
|
+
return_type = opts[:debug_return_type] || 'Account'
|
|
70
|
+
|
|
71
|
+
# auth_names
|
|
72
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
73
|
+
|
|
74
|
+
new_options = opts.merge(
|
|
75
|
+
:operation => :"AccountsApi.get_account",
|
|
76
|
+
:header_params => header_params,
|
|
77
|
+
:query_params => query_params,
|
|
78
|
+
:form_params => form_params,
|
|
79
|
+
:body => post_body,
|
|
80
|
+
:auth_names => auth_names,
|
|
81
|
+
:return_type => return_type
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
85
|
+
if @api_client.config.debugging
|
|
86
|
+
@api_client.config.logger.debug "API called: AccountsApi#get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
+
end
|
|
88
|
+
return data, status_code, headers
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List accounts
|
|
92
|
+
# Returns all social media accounts connected to the workspace.
|
|
93
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
94
|
+
# @param [Hash] opts the optional parameters
|
|
95
|
+
# @return [ListAccounts200Response]
|
|
96
|
+
def list_accounts(workspace_uuid, opts = {})
|
|
97
|
+
data, _status_code, _headers = list_accounts_with_http_info(workspace_uuid, opts)
|
|
98
|
+
data
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List accounts
|
|
102
|
+
# Returns all social media accounts connected to the workspace.
|
|
103
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
104
|
+
# @param [Hash] opts the optional parameters
|
|
105
|
+
# @return [Array<(ListAccounts200Response, Integer, Hash)>] ListAccounts200Response data, response status code and response headers
|
|
106
|
+
def list_accounts_with_http_info(workspace_uuid, opts = {})
|
|
107
|
+
if @api_client.config.debugging
|
|
108
|
+
@api_client.config.logger.debug 'Calling API: AccountsApi.list_accounts ...'
|
|
109
|
+
end
|
|
110
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
111
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
112
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling AccountsApi.list_accounts"
|
|
113
|
+
end
|
|
114
|
+
# resource path
|
|
115
|
+
local_var_path = '/{workspaceUuid}/accounts'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
116
|
+
|
|
117
|
+
# query parameters
|
|
118
|
+
query_params = opts[:query_params] || {}
|
|
119
|
+
|
|
120
|
+
# header parameters
|
|
121
|
+
header_params = opts[:header_params] || {}
|
|
122
|
+
# HTTP header 'Accept' (if needed)
|
|
123
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:debug_body]
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:debug_return_type] || 'ListAccounts200Response'
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:operation => :"AccountsApi.list_accounts",
|
|
139
|
+
:header_params => header_params,
|
|
140
|
+
:query_params => query_params,
|
|
141
|
+
:form_params => form_params,
|
|
142
|
+
:body => post_body,
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
148
|
+
if @api_client.config.debugging
|
|
149
|
+
@api_client.config.logger.debug "API called: AccountsApi#list_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
+
end
|
|
151
|
+
return data, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|