postboost 1.0.0 → 1.8.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 +4 -4
- data/README.md +119 -0
- data/docs/AIApi.md +439 -0
- data/docs/AICredits.md +22 -0
- data/docs/Account.md +14 -8
- data/docs/AccountAnalytics.md +28 -0
- data/docs/AccountAnalyticsInitialSync.md +20 -0
- data/docs/AccountSchedule.md +22 -0
- data/docs/AccountsApi.md +15 -5
- data/docs/AddPostToQueueRequest.md +18 -0
- data/docs/AnalyticsApi.md +401 -0
- data/docs/AnalyticsPeriod.md +24 -0
- data/docs/AnalyticsSummary.md +20 -0
- data/docs/AnalyticsSummaryData.md +38 -0
- data/docs/ApprovePostRequest.md +24 -0
- data/docs/BestPostingTimes.md +20 -0
- data/docs/BestPostingTimesTimesInner.md +24 -0
- data/docs/BlogToSocial200Response.md +18 -0
- data/docs/BlogToSocial429Response.md +18 -0
- data/docs/BlogToSocialCaption.md +28 -0
- data/docs/BlogToSocialInput.md +42 -0
- data/docs/BlogToSocialMedia.md +20 -0
- data/docs/BlogToSocialResponse.md +30 -0
- data/docs/CancelSubscription422Response.md +20 -0
- data/docs/CancelSubscription422ResponseErrors.md +18 -0
- data/docs/CancelSubscriptionRequest.md +18 -0
- data/docs/CompleteChunkedUploadRequest.md +20 -0
- data/docs/CreateMediaFolderRequest.md +20 -0
- data/docs/CreateMention201Response.md +18 -0
- data/docs/DeleteMediaBulkRequest.md +1 -1
- data/docs/DeleteMediaBulkRequestItemsInner.md +49 -0
- data/docs/DeleteMediaFolderRequest.md +18 -0
- data/docs/DeleteResult.md +3 -3
- data/docs/ImageAltText200Response.md +18 -0
- data/docs/ImageAltTextInput.md +18 -0
- data/docs/ImageAltTextResponse.md +24 -0
- data/docs/ImageEditInput.md +28 -0
- data/docs/ImageGenerate200Response.md +18 -0
- data/docs/ImageGenerate429Response.md +18 -0
- data/docs/ImageGenerateInput.md +36 -0
- data/docs/ImageGenerationResponse.md +30 -0
- data/docs/ImagePrompt200Response.md +18 -0
- data/docs/ImagePrompt429Response.md +18 -0
- data/docs/ImagePromptInput.md +28 -0
- data/docs/ImagePromptResponse.md +18 -0
- data/docs/ImageVariations200Response.md +18 -0
- data/docs/ImageVariationsInput.md +24 -0
- data/docs/ImageVariationsResponse.md +26 -0
- data/docs/{InitiateChunkedUpload200Response.md → InitiateChunkedUpload201Response.md} +2 -2
- data/docs/{InitiateRemoteUpload200Response.md → InitiateRemoteUpload201Response.md} +7 -7
- data/docs/{InitiateRemoteUpload200ResponseOneOf.md → InitiateRemoteUpload201ResponseOneOf.md} +2 -2
- data/docs/InitiateRemoteUploadRequest.md +3 -1
- data/docs/ListMediaFolders200Response.md +18 -0
- data/docs/ListMentions200Response.md +22 -0
- data/docs/ListMyWorkspaces200Response.md +18 -0
- data/docs/Media.md +22 -8
- data/docs/MediaApi.md +340 -26
- data/docs/MediaFolder.md +24 -0
- data/docs/MediaFolderInput.md +20 -0
- data/docs/MediaFolderRef.md +20 -0
- data/docs/Mention.md +28 -0
- data/docs/MentionIdentity.md +24 -0
- data/docs/MentionIdentityInput.md +26 -0
- data/docs/MentionInput.md +22 -0
- data/docs/MentionsApi.md +375 -0
- data/docs/Post.md +10 -8
- data/docs/PostAnalytics.md +22 -0
- data/docs/PostInput.md +3 -1
- data/docs/PostVersion.md +2 -0
- data/docs/PostingTimeSlot.md +22 -0
- data/docs/PostingTimes.md +32 -0
- data/docs/PostingTimesBestInner.md +24 -0
- data/docs/PostingTimesDayIntervalsInnerInner.md +28 -0
- data/docs/PostingTimesDaysInner.md +24 -0
- data/docs/PostsApi.md +174 -14
- data/docs/PublicWorkspace.md +24 -0
- data/docs/PublicWorkspacePivot.md +22 -0
- data/docs/PublishProgress.md +22 -0
- data/docs/Receipt.md +8 -8
- data/docs/ReceiptsApi.md +15 -1
- data/docs/RemoveGenericSubscription422Response.md +18 -0
- data/docs/RetryPostAccountResult.md +22 -0
- data/docs/SchedulePostRequest.md +9 -1
- data/docs/ScheduleResult.md +4 -2
- data/docs/Subscription.md +5 -5
- data/docs/SubscriptionsApi.md +27 -5
- data/docs/Tag.md +4 -4
- data/docs/TagsApi.md +10 -0
- data/docs/UpdateMediaRequest.md +6 -2
- data/docs/{UploadChunk200Response.md → UploadChunk201Response.md} +2 -2
- data/docs/User.md +7 -5
- data/docs/UsersApi.md +15 -1
- data/docs/Workspace.md +8 -6
- data/docs/WorkspaceInput.md +1 -1
- data/docs/WorkspacesApi.md +156 -3
- data/lib/postboost/api/accounts_api.rb +16 -4
- data/lib/postboost/api/ai_api.rb +466 -0
- data/lib/postboost/api/analytics_api.rb +425 -0
- data/lib/postboost/api/media_api.rb +365 -22
- data/lib/postboost/api/mentions_api.rb +386 -0
- data/lib/postboost/api/posts_api.rb +176 -12
- data/lib/postboost/api/receipts_api.rb +17 -2
- data/lib/postboost/api/subscriptions_api.rb +28 -3
- data/lib/postboost/api/tags_api.rb +12 -2
- data/lib/postboost/api/users_api.rb +17 -2
- data/lib/postboost/api/workspaces_api.rb +139 -2
- data/lib/postboost/api_client.rb +2 -2
- data/lib/postboost/api_error.rb +2 -2
- data/lib/postboost/configuration.rb +2 -2
- data/lib/postboost/models/account.rb +120 -3
- data/lib/postboost/models/account_analytics.rb +308 -0
- data/lib/postboost/models/account_analytics_initial_sync.rb +231 -0
- data/lib/postboost/models/account_schedule.rb +255 -0
- data/lib/postboost/models/add_generic_subscription_request.rb +2 -2
- data/lib/postboost/models/add_post_to_queue_request.rb +215 -0
- data/lib/postboost/models/ai_credits.rb +256 -0
- data/lib/postboost/models/analytics_period.rb +270 -0
- data/lib/postboost/models/analytics_summary.rb +237 -0
- data/lib/postboost/models/analytics_summary_data.rb +327 -0
- data/lib/postboost/models/approve_post_request.rb +247 -0
- data/lib/postboost/models/best_posting_times.rb +240 -0
- data/lib/postboost/models/best_posting_times_times_inner.rb +269 -0
- data/lib/postboost/models/blog_to_social200_response.rb +214 -0
- data/lib/postboost/models/blog_to_social429_response.rb +214 -0
- data/lib/postboost/models/blog_to_social_caption.rb +265 -0
- data/lib/postboost/models/blog_to_social_input.rb +536 -0
- data/lib/postboost/models/blog_to_social_media.rb +226 -0
- data/lib/postboost/models/blog_to_social_response.rb +276 -0
- data/lib/postboost/models/cancel_subscription422_response.rb +223 -0
- data/lib/postboost/models/cancel_subscription422_response_errors.rb +216 -0
- data/lib/postboost/models/cancel_subscription_request.rb +217 -0
- data/lib/postboost/models/change_subscription_plan_request.rb +2 -2
- data/lib/postboost/models/checkout_subscription200_response.rb +2 -2
- data/lib/postboost/models/checkout_subscription_request.rb +2 -2
- data/lib/postboost/models/complete_chunked_upload_request.rb +243 -0
- data/lib/postboost/models/create_media_folder_request.rb +258 -0
- data/lib/postboost/models/create_mention201_response.rb +214 -0
- data/lib/postboost/models/delete_media_bulk_request.rb +23 -4
- data/lib/postboost/models/{initiate_remote_upload200_response.rb → delete_media_bulk_request_items_inner.rb} +5 -5
- data/lib/postboost/models/delete_media_folder_request.rb +216 -0
- data/lib/postboost/models/delete_mode.rb +2 -2
- data/lib/postboost/models/delete_post_request.rb +2 -2
- data/lib/postboost/models/delete_posts_bulk_request.rb +2 -2
- data/lib/postboost/models/delete_receipts_bulk_request.rb +2 -2
- data/lib/postboost/models/delete_result.rb +23 -2
- data/lib/postboost/models/delete_user400_response.rb +2 -2
- data/lib/postboost/models/delete_users_bulk_request.rb +2 -2
- data/lib/postboost/models/delete_workspaces_bulk_request.rb +2 -2
- data/lib/postboost/models/get_remote_upload_status200_response.rb +2 -2
- data/lib/postboost/models/image_alt_text200_response.rb +221 -0
- data/lib/postboost/models/image_alt_text_input.rb +221 -0
- data/lib/postboost/models/image_alt_text_response.rb +262 -0
- data/lib/postboost/models/image_edit_input.rb +375 -0
- data/lib/postboost/models/image_generate200_response.rb +221 -0
- data/lib/postboost/models/image_generate429_response.rb +214 -0
- data/lib/postboost/models/image_generate_input.rb +447 -0
- data/lib/postboost/models/image_generation_response.rb +305 -0
- data/lib/postboost/models/image_prompt200_response.rb +221 -0
- data/lib/postboost/models/image_prompt429_response.rb +214 -0
- data/lib/postboost/models/image_prompt_input.rb +345 -0
- data/lib/postboost/models/image_prompt_response.rb +221 -0
- data/lib/postboost/models/image_variations200_response.rb +221 -0
- data/lib/postboost/models/image_variations_input.rb +328 -0
- data/lib/postboost/models/image_variations_response.rb +280 -0
- data/lib/postboost/models/{initiate_chunked_upload200_response.rb → initiate_chunked_upload201_response.rb} +5 -5
- data/lib/postboost/models/initiate_chunked_upload_request.rb +2 -2
- data/lib/postboost/models/initiate_remote_upload201_response.rb +105 -0
- data/lib/postboost/models/{initiate_remote_upload200_response_one_of.rb → initiate_remote_upload201_response_one_of.rb} +5 -5
- data/lib/postboost/models/initiate_remote_upload_request.rb +16 -6
- data/lib/postboost/models/list_accounts200_response.rb +2 -2
- data/lib/postboost/models/list_media200_response.rb +2 -2
- data/lib/postboost/models/list_media_folders200_response.rb +216 -0
- data/lib/postboost/models/list_mentions200_response.rb +241 -0
- data/lib/postboost/models/list_my_workspaces200_response.rb +216 -0
- data/lib/postboost/models/list_posts200_response.rb +2 -2
- data/lib/postboost/models/list_receipts200_response.rb +2 -2
- data/lib/postboost/models/list_tags200_response.rb +2 -2
- data/lib/postboost/models/list_users200_response.rb +2 -2
- data/lib/postboost/models/list_workspaces200_response.rb +2 -2
- data/lib/postboost/models/media.rb +128 -3
- data/lib/postboost/models/media_folder.rb +271 -0
- data/lib/postboost/models/media_folder_input.rb +244 -0
- data/lib/postboost/models/media_folder_ref.rb +237 -0
- data/lib/postboost/models/mention.rb +290 -0
- data/lib/postboost/models/mention_identity.rb +257 -0
- data/lib/postboost/models/mention_identity_input.rb +325 -0
- data/lib/postboost/models/mention_input.rb +279 -0
- data/lib/postboost/models/pagination_meta.rb +2 -2
- data/lib/postboost/models/pagination_meta_links.rb +2 -2
- data/lib/postboost/models/pagination_meta_meta.rb +2 -2
- data/lib/postboost/models/post.rb +69 -3
- data/lib/postboost/models/post_analytics.rb +252 -0
- data/lib/postboost/models/post_content.rb +2 -2
- data/lib/postboost/models/post_input.rb +16 -3
- data/lib/postboost/models/post_status.rb +6 -3
- data/lib/postboost/models/post_version.rb +32 -3
- data/lib/postboost/models/posting_time_slot.rb +315 -0
- data/lib/postboost/models/posting_times.rb +362 -0
- data/lib/postboost/models/posting_times_best_inner.rb +269 -0
- data/lib/postboost/models/posting_times_day_intervals_inner_inner.rb +370 -0
- data/lib/postboost/models/posting_times_days_inner.rb +366 -0
- data/lib/postboost/models/public_workspace.rb +262 -0
- data/lib/postboost/models/public_workspace_pivot.rb +267 -0
- data/lib/postboost/models/publish_progress.rb +254 -0
- data/lib/postboost/models/receipt.rb +58 -2
- data/lib/postboost/models/receipt_input.rb +2 -2
- data/lib/postboost/models/receipt_update_input.rb +2 -2
- data/lib/postboost/models/remove_generic_subscription422_response.rb +214 -0
- data/lib/postboost/models/remove_user_from_workspace_request.rb +2 -2
- data/lib/postboost/models/retry_post_account_result.rb +275 -0
- data/lib/postboost/models/schedule_post_request.rb +48 -6
- data/lib/postboost/models/schedule_result.rb +23 -6
- data/lib/postboost/models/subscription.rb +37 -2
- data/lib/postboost/models/subscription_input.rb +2 -2
- data/lib/postboost/models/subscription_status.rb +2 -2
- data/lib/postboost/models/subscription_update_input.rb +2 -2
- data/lib/postboost/models/tag.rb +30 -2
- data/lib/postboost/models/tag_input.rb +2 -2
- data/lib/postboost/models/update_media_request.rb +61 -11
- data/lib/postboost/models/{upload_chunk200_response.rb → upload_chunk201_response.rb} +5 -5
- data/lib/postboost/models/user.rb +48 -3
- data/lib/postboost/models/user_input.rb +2 -2
- data/lib/postboost/models/user_update_input.rb +2 -2
- data/lib/postboost/models/workspace.rb +42 -3
- data/lib/postboost/models/workspace_input.rb +3 -9
- data/lib/postboost/models/workspace_user_input.rb +2 -2
- data/lib/postboost/version.rb +3 -3
- data/lib/postboost.rb +70 -6
- data/postboost.gemspec +3 -3
- data/spec/api/accounts_api_spec.rb +7 -3
- data/spec/api/ai_api_spec.rb +113 -0
- data/spec/api/analytics_api_spec.rb +113 -0
- data/spec/api/media_api_spec.rb +73 -10
- data/spec/api/mentions_api_spec.rb +103 -0
- data/spec/api/posts_api_spec.rb +38 -6
- data/spec/api/receipts_api_spec.rb +9 -2
- data/spec/api/subscriptions_api_spec.rb +12 -2
- data/spec/api/tags_api_spec.rb +7 -2
- data/spec/api/users_api_spec.rb +9 -2
- data/spec/api/workspaces_api_spec.rb +33 -2
- data/spec/models/account_analytics_initial_sync_spec.rb +42 -0
- data/spec/models/account_analytics_spec.rb +66 -0
- data/spec/models/account_schedule_spec.rb +48 -0
- data/spec/models/account_spec.rb +24 -2
- data/spec/models/add_generic_subscription_request_spec.rb +2 -2
- data/spec/models/add_post_to_queue_request_spec.rb +36 -0
- data/spec/models/ai_credits_spec.rb +48 -0
- data/spec/models/analytics_period_spec.rb +54 -0
- data/spec/models/analytics_summary_data_spec.rb +96 -0
- data/spec/models/analytics_summary_spec.rb +42 -0
- data/spec/models/approve_post_request_spec.rb +54 -0
- data/spec/models/best_posting_times_spec.rb +42 -0
- data/spec/models/best_posting_times_times_inner_spec.rb +54 -0
- data/spec/models/blog_to_social200_response_spec.rb +36 -0
- data/spec/models/blog_to_social429_response_spec.rb +36 -0
- data/spec/models/blog_to_social_caption_spec.rb +66 -0
- data/spec/models/blog_to_social_input_spec.rb +128 -0
- data/spec/models/blog_to_social_media_spec.rb +42 -0
- data/spec/models/blog_to_social_response_spec.rb +72 -0
- data/spec/models/cancel_subscription422_response_errors_spec.rb +36 -0
- data/spec/models/cancel_subscription422_response_spec.rb +42 -0
- data/spec/models/cancel_subscription_request_spec.rb +36 -0
- data/spec/models/change_subscription_plan_request_spec.rb +2 -2
- data/spec/models/checkout_subscription200_response_spec.rb +2 -2
- data/spec/models/checkout_subscription_request_spec.rb +2 -2
- data/spec/models/complete_chunked_upload_request_spec.rb +42 -0
- data/spec/models/create_media_folder_request_spec.rb +42 -0
- data/spec/models/create_mention201_response_spec.rb +36 -0
- data/spec/models/delete_media_bulk_request_items_inner_spec.rb +32 -0
- data/spec/models/delete_media_bulk_request_spec.rb +2 -2
- data/spec/models/delete_media_folder_request_spec.rb +36 -0
- data/spec/models/delete_mode_spec.rb +2 -2
- data/spec/models/delete_post_request_spec.rb +2 -2
- data/spec/models/delete_posts_bulk_request_spec.rb +2 -2
- data/spec/models/delete_receipts_bulk_request_spec.rb +2 -2
- data/spec/models/delete_result_spec.rb +2 -2
- data/spec/models/delete_user400_response_spec.rb +2 -2
- data/spec/models/delete_users_bulk_request_spec.rb +2 -2
- data/spec/models/delete_workspaces_bulk_request_spec.rb +2 -2
- data/spec/models/get_remote_upload_status200_response_spec.rb +2 -2
- data/spec/models/image_alt_text200_response_spec.rb +36 -0
- data/spec/models/image_alt_text_input_spec.rb +36 -0
- data/spec/models/image_alt_text_response_spec.rb +54 -0
- data/spec/models/image_edit_input_spec.rb +74 -0
- data/spec/models/image_generate200_response_spec.rb +36 -0
- data/spec/models/image_generate429_response_spec.rb +36 -0
- data/spec/models/image_generate_input_spec.rb +102 -0
- data/spec/models/image_generation_response_spec.rb +72 -0
- data/spec/models/image_prompt200_response_spec.rb +36 -0
- data/spec/models/image_prompt429_response_spec.rb +36 -0
- data/spec/models/image_prompt_input_spec.rb +70 -0
- data/spec/models/image_prompt_response_spec.rb +36 -0
- data/spec/models/image_variations200_response_spec.rb +36 -0
- data/spec/models/image_variations_input_spec.rb +62 -0
- data/spec/models/image_variations_response_spec.rb +60 -0
- data/spec/models/initiate_chunked_upload201_response_spec.rb +48 -0
- data/spec/models/initiate_chunked_upload_request_spec.rb +2 -2
- data/spec/models/initiate_remote_upload201_response_one_of_spec.rb +36 -0
- data/spec/models/initiate_remote_upload201_response_spec.rb +32 -0
- data/spec/models/initiate_remote_upload_request_spec.rb +8 -2
- data/spec/models/list_accounts200_response_spec.rb +2 -2
- data/spec/models/list_media200_response_spec.rb +2 -2
- data/spec/models/list_media_folders200_response_spec.rb +36 -0
- data/spec/models/list_mentions200_response_spec.rb +48 -0
- data/spec/models/list_my_workspaces200_response_spec.rb +36 -0
- data/spec/models/list_posts200_response_spec.rb +2 -2
- data/spec/models/list_receipts200_response_spec.rb +2 -2
- data/spec/models/list_tags200_response_spec.rb +2 -2
- data/spec/models/list_users200_response_spec.rb +2 -2
- data/spec/models/list_workspaces200_response_spec.rb +2 -2
- data/spec/models/media_folder_input_spec.rb +42 -0
- data/spec/models/media_folder_ref_spec.rb +42 -0
- data/spec/models/media_folder_spec.rb +54 -0
- data/spec/models/media_spec.rb +44 -2
- data/spec/models/mention_identity_input_spec.rb +60 -0
- data/spec/models/mention_identity_spec.rb +54 -0
- data/spec/models/mention_input_spec.rb +48 -0
- data/spec/models/mention_spec.rb +66 -0
- data/spec/models/pagination_meta_links_spec.rb +2 -2
- data/spec/models/pagination_meta_meta_spec.rb +2 -2
- data/spec/models/pagination_meta_spec.rb +2 -2
- data/spec/models/post_analytics_spec.rb +48 -0
- data/spec/models/post_content_spec.rb +2 -2
- data/spec/models/post_input_spec.rb +8 -2
- data/spec/models/post_spec.rb +8 -2
- data/spec/models/post_status_spec.rb +2 -2
- data/spec/models/post_version_spec.rb +8 -2
- data/spec/models/posting_time_slot_spec.rb +52 -0
- data/spec/models/posting_times_best_inner_spec.rb +54 -0
- data/spec/models/posting_times_day_intervals_inner_inner_spec.rb +70 -0
- data/spec/models/posting_times_days_inner_spec.rb +58 -0
- data/spec/models/posting_times_spec.rb +78 -0
- data/spec/models/public_workspace_pivot_spec.rb +52 -0
- data/spec/models/public_workspace_spec.rb +54 -0
- data/spec/models/publish_progress_spec.rb +48 -0
- data/spec/models/receipt_input_spec.rb +2 -2
- data/spec/models/receipt_spec.rb +2 -2
- data/spec/models/receipt_update_input_spec.rb +2 -2
- data/spec/models/remove_generic_subscription422_response_spec.rb +36 -0
- data/spec/models/remove_user_from_workspace_request_spec.rb +2 -2
- data/spec/models/retry_post_account_result_spec.rb +48 -0
- data/spec/models/schedule_post_request_spec.rb +26 -2
- data/spec/models/schedule_result_spec.rb +8 -2
- data/spec/models/subscription_input_spec.rb +2 -2
- data/spec/models/subscription_spec.rb +2 -2
- data/spec/models/subscription_status_spec.rb +2 -2
- data/spec/models/subscription_update_input_spec.rb +2 -2
- data/spec/models/tag_input_spec.rb +2 -2
- data/spec/models/tag_spec.rb +2 -2
- data/spec/models/update_media_request_spec.rb +14 -2
- data/spec/models/upload_chunk201_response_spec.rb +36 -0
- data/spec/models/user_input_spec.rb +2 -2
- data/spec/models/user_spec.rb +8 -2
- data/spec/models/user_update_input_spec.rb +2 -2
- data/spec/models/workspace_input_spec.rb +2 -2
- data/spec/models/workspace_spec.rb +8 -2
- data/spec/models/workspace_user_input_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +331 -75
- data/git_push.sh +0 -57
- data/spec/models/initiate_chunked_upload200_response_spec.rb +0 -48
- data/spec/models/initiate_remote_upload200_response_one_of_spec.rb +0 -36
- data/spec/models/initiate_remote_upload200_response_spec.rb +0 -32
- data/spec/models/upload_chunk200_response_spec.rb +0 -36
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#PostBoost API
|
|
3
3
|
|
|
4
|
-
#The PostBoost REST API lets you publish, schedule, and analyze social media posts across
|
|
4
|
+
#The PostBoost REST API lets you publish, schedule, and analyze social media posts across 12+ 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`. ## Plan access Every workspace-scoped endpoint returns `403` when the workspace's plan does not include API access (capability `api`). ## Dates and times Post dates and times (`date`, `time`, `accounts_schedule`) are read in the request's `timezone` when one is given, otherwise in the workspace timezone. ## 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
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.8.0
|
|
7
7
|
Contact: hi@postboost.co
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.9.0
|
|
@@ -89,10 +89,11 @@ module PostBoost
|
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
# Complete chunked upload
|
|
92
|
-
# Signal that all chunks have been uploaded. Returns the final media object.
|
|
92
|
+
# Signal that all chunks have been uploaded. Returns the final media object. A video may come back with `is_processing` set to `true` while its conversion runs.
|
|
93
93
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
94
94
|
# @param upload_uuid [String]
|
|
95
95
|
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @option opts [CompleteChunkedUploadRequest] :complete_chunked_upload_request
|
|
96
97
|
# @return [Media]
|
|
97
98
|
def complete_chunked_upload(workspace_uuid, upload_uuid, opts = {})
|
|
98
99
|
data, _status_code, _headers = complete_chunked_upload_with_http_info(workspace_uuid, upload_uuid, opts)
|
|
@@ -100,10 +101,11 @@ module PostBoost
|
|
|
100
101
|
end
|
|
101
102
|
|
|
102
103
|
# Complete chunked upload
|
|
103
|
-
# Signal that all chunks have been uploaded. Returns the final media object.
|
|
104
|
+
# Signal that all chunks have been uploaded. Returns the final media object. A video may come back with `is_processing` set to `true` while its conversion runs.
|
|
104
105
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
105
106
|
# @param upload_uuid [String]
|
|
106
107
|
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @option opts [CompleteChunkedUploadRequest] :complete_chunked_upload_request
|
|
107
109
|
# @return [Array<(Media, Integer, Hash)>] Media data, response status code and response headers
|
|
108
110
|
def complete_chunked_upload_with_http_info(workspace_uuid, upload_uuid, opts = {})
|
|
109
111
|
if @api_client.config.debugging
|
|
@@ -127,12 +129,17 @@ module PostBoost
|
|
|
127
129
|
header_params = opts[:header_params] || {}
|
|
128
130
|
# HTTP header 'Accept' (if needed)
|
|
129
131
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
132
|
+
# HTTP header 'Content-Type'
|
|
133
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
134
|
+
if !content_type.nil?
|
|
135
|
+
header_params['Content-Type'] = content_type
|
|
136
|
+
end
|
|
130
137
|
|
|
131
138
|
# form parameters
|
|
132
139
|
form_params = opts[:form_params] || {}
|
|
133
140
|
|
|
134
141
|
# http body (model)
|
|
135
|
-
post_body = opts[:debug_body]
|
|
142
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'complete_chunked_upload_request'])
|
|
136
143
|
|
|
137
144
|
# return_type
|
|
138
145
|
return_type = opts[:debug_return_type] || 'Media'
|
|
@@ -157,8 +164,82 @@ module PostBoost
|
|
|
157
164
|
return data, status_code, headers
|
|
158
165
|
end
|
|
159
166
|
|
|
167
|
+
# Create media folder
|
|
168
|
+
# Creates a folder at the top level or under `parent`. The name must be unique among its siblings.
|
|
169
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
170
|
+
# @param create_media_folder_request [CreateMediaFolderRequest]
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @return [MediaFolder]
|
|
173
|
+
def create_media_folder(workspace_uuid, create_media_folder_request, opts = {})
|
|
174
|
+
data, _status_code, _headers = create_media_folder_with_http_info(workspace_uuid, create_media_folder_request, opts)
|
|
175
|
+
data
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Create media folder
|
|
179
|
+
# Creates a folder at the top level or under `parent`. The name must be unique among its siblings.
|
|
180
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
181
|
+
# @param create_media_folder_request [CreateMediaFolderRequest]
|
|
182
|
+
# @param [Hash] opts the optional parameters
|
|
183
|
+
# @return [Array<(MediaFolder, Integer, Hash)>] MediaFolder data, response status code and response headers
|
|
184
|
+
def create_media_folder_with_http_info(workspace_uuid, create_media_folder_request, opts = {})
|
|
185
|
+
if @api_client.config.debugging
|
|
186
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.create_media_folder ...'
|
|
187
|
+
end
|
|
188
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
189
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
190
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling MediaApi.create_media_folder"
|
|
191
|
+
end
|
|
192
|
+
# verify the required parameter 'create_media_folder_request' is set
|
|
193
|
+
if @api_client.config.client_side_validation && create_media_folder_request.nil?
|
|
194
|
+
fail ArgumentError, "Missing the required parameter 'create_media_folder_request' when calling MediaApi.create_media_folder"
|
|
195
|
+
end
|
|
196
|
+
# resource path
|
|
197
|
+
local_var_path = '/{workspaceUuid}/media/folders'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
198
|
+
|
|
199
|
+
# query parameters
|
|
200
|
+
query_params = opts[:query_params] || {}
|
|
201
|
+
|
|
202
|
+
# header parameters
|
|
203
|
+
header_params = opts[:header_params] || {}
|
|
204
|
+
# HTTP header 'Accept' (if needed)
|
|
205
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
206
|
+
# HTTP header 'Content-Type'
|
|
207
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
208
|
+
if !content_type.nil?
|
|
209
|
+
header_params['Content-Type'] = content_type
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# form parameters
|
|
213
|
+
form_params = opts[:form_params] || {}
|
|
214
|
+
|
|
215
|
+
# http body (model)
|
|
216
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_media_folder_request)
|
|
217
|
+
|
|
218
|
+
# return_type
|
|
219
|
+
return_type = opts[:debug_return_type] || 'MediaFolder'
|
|
220
|
+
|
|
221
|
+
# auth_names
|
|
222
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
223
|
+
|
|
224
|
+
new_options = opts.merge(
|
|
225
|
+
:operation => :"MediaApi.create_media_folder",
|
|
226
|
+
:header_params => header_params,
|
|
227
|
+
:query_params => query_params,
|
|
228
|
+
:form_params => form_params,
|
|
229
|
+
:body => post_body,
|
|
230
|
+
:auth_names => auth_names,
|
|
231
|
+
:return_type => return_type
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug "API called: MediaApi#create_media_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
237
|
+
end
|
|
238
|
+
return data, status_code, headers
|
|
239
|
+
end
|
|
240
|
+
|
|
160
241
|
# Delete media (bulk)
|
|
161
|
-
# Delete one or more media items by their IDs.
|
|
242
|
+
# Delete one or more media items by their numeric IDs or UUIDs (both may be mixed, up to 500 per request).
|
|
162
243
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
163
244
|
# @param delete_media_bulk_request [DeleteMediaBulkRequest]
|
|
164
245
|
# @param [Hash] opts the optional parameters
|
|
@@ -169,7 +250,7 @@ module PostBoost
|
|
|
169
250
|
end
|
|
170
251
|
|
|
171
252
|
# Delete media (bulk)
|
|
172
|
-
# Delete one or more media items by their IDs.
|
|
253
|
+
# Delete one or more media items by their numeric IDs or UUIDs (both may be mixed, up to 500 per request).
|
|
173
254
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
174
255
|
# @param delete_media_bulk_request [DeleteMediaBulkRequest]
|
|
175
256
|
# @param [Hash] opts the optional parameters
|
|
@@ -231,6 +312,82 @@ module PostBoost
|
|
|
231
312
|
return data, status_code, headers
|
|
232
313
|
end
|
|
233
314
|
|
|
315
|
+
# Delete media folder
|
|
316
|
+
# Deletes a folder. By default its media and sub-folders move up to the folder's parent; with `delete_media` set to true every media item below the folder is deleted as well.
|
|
317
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
318
|
+
# @param folder_uuid [String] UUID of the media folder.
|
|
319
|
+
# @param [Hash] opts the optional parameters
|
|
320
|
+
# @option opts [DeleteMediaFolderRequest] :delete_media_folder_request
|
|
321
|
+
# @return [Object]
|
|
322
|
+
def delete_media_folder(workspace_uuid, folder_uuid, opts = {})
|
|
323
|
+
data, _status_code, _headers = delete_media_folder_with_http_info(workspace_uuid, folder_uuid, opts)
|
|
324
|
+
data
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Delete media folder
|
|
328
|
+
# Deletes a folder. By default its media and sub-folders move up to the folder's parent; with `delete_media` set to true every media item below the folder is deleted as well.
|
|
329
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
330
|
+
# @param folder_uuid [String] UUID of the media folder.
|
|
331
|
+
# @param [Hash] opts the optional parameters
|
|
332
|
+
# @option opts [DeleteMediaFolderRequest] :delete_media_folder_request
|
|
333
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
334
|
+
def delete_media_folder_with_http_info(workspace_uuid, folder_uuid, opts = {})
|
|
335
|
+
if @api_client.config.debugging
|
|
336
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.delete_media_folder ...'
|
|
337
|
+
end
|
|
338
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
339
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
340
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling MediaApi.delete_media_folder"
|
|
341
|
+
end
|
|
342
|
+
# verify the required parameter 'folder_uuid' is set
|
|
343
|
+
if @api_client.config.client_side_validation && folder_uuid.nil?
|
|
344
|
+
fail ArgumentError, "Missing the required parameter 'folder_uuid' when calling MediaApi.delete_media_folder"
|
|
345
|
+
end
|
|
346
|
+
# resource path
|
|
347
|
+
local_var_path = '/{workspaceUuid}/media/folders/{folderUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'folderUuid' + '}', CGI.escape(folder_uuid.to_s))
|
|
348
|
+
|
|
349
|
+
# query parameters
|
|
350
|
+
query_params = opts[:query_params] || {}
|
|
351
|
+
|
|
352
|
+
# header parameters
|
|
353
|
+
header_params = opts[:header_params] || {}
|
|
354
|
+
# HTTP header 'Accept' (if needed)
|
|
355
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
356
|
+
# HTTP header 'Content-Type'
|
|
357
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
358
|
+
if !content_type.nil?
|
|
359
|
+
header_params['Content-Type'] = content_type
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# form parameters
|
|
363
|
+
form_params = opts[:form_params] || {}
|
|
364
|
+
|
|
365
|
+
# http body (model)
|
|
366
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'delete_media_folder_request'])
|
|
367
|
+
|
|
368
|
+
# return_type
|
|
369
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
370
|
+
|
|
371
|
+
# auth_names
|
|
372
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
373
|
+
|
|
374
|
+
new_options = opts.merge(
|
|
375
|
+
:operation => :"MediaApi.delete_media_folder",
|
|
376
|
+
:header_params => header_params,
|
|
377
|
+
:query_params => query_params,
|
|
378
|
+
:form_params => form_params,
|
|
379
|
+
:body => post_body,
|
|
380
|
+
:auth_names => auth_names,
|
|
381
|
+
:return_type => return_type
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
385
|
+
if @api_client.config.debugging
|
|
386
|
+
@api_client.config.logger.debug "API called: MediaApi#delete_media_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
387
|
+
end
|
|
388
|
+
return data, status_code, headers
|
|
389
|
+
end
|
|
390
|
+
|
|
234
391
|
# Get media
|
|
235
392
|
# Returns a single media asset.
|
|
236
393
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
@@ -374,7 +531,7 @@ module PostBoost
|
|
|
374
531
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
375
532
|
# @param initiate_chunked_upload_request [InitiateChunkedUploadRequest]
|
|
376
533
|
# @param [Hash] opts the optional parameters
|
|
377
|
-
# @return [
|
|
534
|
+
# @return [InitiateChunkedUpload201Response]
|
|
378
535
|
def initiate_chunked_upload(workspace_uuid, initiate_chunked_upload_request, opts = {})
|
|
379
536
|
data, _status_code, _headers = initiate_chunked_upload_with_http_info(workspace_uuid, initiate_chunked_upload_request, opts)
|
|
380
537
|
data
|
|
@@ -385,7 +542,7 @@ module PostBoost
|
|
|
385
542
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
386
543
|
# @param initiate_chunked_upload_request [InitiateChunkedUploadRequest]
|
|
387
544
|
# @param [Hash] opts the optional parameters
|
|
388
|
-
# @return [Array<(
|
|
545
|
+
# @return [Array<(InitiateChunkedUpload201Response, Integer, Hash)>] InitiateChunkedUpload201Response data, response status code and response headers
|
|
389
546
|
def initiate_chunked_upload_with_http_info(workspace_uuid, initiate_chunked_upload_request, opts = {})
|
|
390
547
|
if @api_client.config.debugging
|
|
391
548
|
@api_client.config.logger.debug 'Calling API: MediaApi.initiate_chunked_upload ...'
|
|
@@ -421,7 +578,7 @@ module PostBoost
|
|
|
421
578
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(initiate_chunked_upload_request)
|
|
422
579
|
|
|
423
580
|
# return_type
|
|
424
|
-
return_type = opts[:debug_return_type] || '
|
|
581
|
+
return_type = opts[:debug_return_type] || 'InitiateChunkedUpload201Response'
|
|
425
582
|
|
|
426
583
|
# auth_names
|
|
427
584
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -448,7 +605,7 @@ module PostBoost
|
|
|
448
605
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
449
606
|
# @param initiate_remote_upload_request [InitiateRemoteUploadRequest]
|
|
450
607
|
# @param [Hash] opts the optional parameters
|
|
451
|
-
# @return [
|
|
608
|
+
# @return [InitiateRemoteUpload201Response]
|
|
452
609
|
def initiate_remote_upload(workspace_uuid, initiate_remote_upload_request, opts = {})
|
|
453
610
|
data, _status_code, _headers = initiate_remote_upload_with_http_info(workspace_uuid, initiate_remote_upload_request, opts)
|
|
454
611
|
data
|
|
@@ -459,7 +616,7 @@ module PostBoost
|
|
|
459
616
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
460
617
|
# @param initiate_remote_upload_request [InitiateRemoteUploadRequest]
|
|
461
618
|
# @param [Hash] opts the optional parameters
|
|
462
|
-
# @return [Array<(
|
|
619
|
+
# @return [Array<(InitiateRemoteUpload201Response, Integer, Hash)>] InitiateRemoteUpload201Response data, response status code and response headers
|
|
463
620
|
def initiate_remote_upload_with_http_info(workspace_uuid, initiate_remote_upload_request, opts = {})
|
|
464
621
|
if @api_client.config.debugging
|
|
465
622
|
@api_client.config.logger.debug 'Calling API: MediaApi.initiate_remote_upload ...'
|
|
@@ -495,7 +652,7 @@ module PostBoost
|
|
|
495
652
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(initiate_remote_upload_request)
|
|
496
653
|
|
|
497
654
|
# return_type
|
|
498
|
-
return_type = opts[:debug_return_type] || '
|
|
655
|
+
return_type = opts[:debug_return_type] || 'InitiateRemoteUpload201Response'
|
|
499
656
|
|
|
500
657
|
# auth_names
|
|
501
658
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -518,10 +675,18 @@ module PostBoost
|
|
|
518
675
|
end
|
|
519
676
|
|
|
520
677
|
# List media
|
|
521
|
-
# Returns a paginated list of media assets in the workspace library.
|
|
678
|
+
# Returns a paginated list of media assets in the workspace library. Without `folder` every item is listed, whatever folder it is filed in. A `keyword` search always looks at the whole library and ignores `folder` and `favorite`.
|
|
522
679
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
523
680
|
# @param [Hash] opts the optional parameters
|
|
524
|
-
# @option opts [Integer] :page Page number
|
|
681
|
+
# @option opts [Integer] :page Page number. (default to 1)
|
|
682
|
+
# @option opts [Integer] :limit Items per page. Values below 1 fall back to 50; values above 100 are capped at 100. (default to 50)
|
|
683
|
+
# @option opts [String] :folder Media folder UUID, or `root` for items not filed in any folder.
|
|
684
|
+
# @option opts [Array<String>] :mime_types Only these MIME types (for example `image/png`).
|
|
685
|
+
# @option opts [String] :type Only this media type.
|
|
686
|
+
# @option opts [String] :keyword Search media by name.
|
|
687
|
+
# @option opts [String] :usage Filter by how the media is used in posts.
|
|
688
|
+
# @option opts [Boolean] :favorite When `true`, only media the caller marked as favorite.
|
|
689
|
+
# @option opts [String] :sort (default to 'newest')
|
|
525
690
|
# @return [ListMedia200Response]
|
|
526
691
|
def list_media(workspace_uuid, opts = {})
|
|
527
692
|
data, _status_code, _headers = list_media_with_http_info(workspace_uuid, opts)
|
|
@@ -529,10 +694,18 @@ module PostBoost
|
|
|
529
694
|
end
|
|
530
695
|
|
|
531
696
|
# List media
|
|
532
|
-
# Returns a paginated list of media assets in the workspace library.
|
|
697
|
+
# Returns a paginated list of media assets in the workspace library. Without `folder` every item is listed, whatever folder it is filed in. A `keyword` search always looks at the whole library and ignores `folder` and `favorite`.
|
|
533
698
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
534
699
|
# @param [Hash] opts the optional parameters
|
|
535
|
-
# @option opts [Integer] :page Page number
|
|
700
|
+
# @option opts [Integer] :page Page number. (default to 1)
|
|
701
|
+
# @option opts [Integer] :limit Items per page. Values below 1 fall back to 50; values above 100 are capped at 100. (default to 50)
|
|
702
|
+
# @option opts [String] :folder Media folder UUID, or `root` for items not filed in any folder.
|
|
703
|
+
# @option opts [Array<String>] :mime_types Only these MIME types (for example `image/png`).
|
|
704
|
+
# @option opts [String] :type Only this media type.
|
|
705
|
+
# @option opts [String] :keyword Search media by name.
|
|
706
|
+
# @option opts [String] :usage Filter by how the media is used in posts.
|
|
707
|
+
# @option opts [Boolean] :favorite When `true`, only media the caller marked as favorite.
|
|
708
|
+
# @option opts [String] :sort (default to 'newest')
|
|
536
709
|
# @return [Array<(ListMedia200Response, Integer, Hash)>] ListMedia200Response data, response status code and response headers
|
|
537
710
|
def list_media_with_http_info(workspace_uuid, opts = {})
|
|
538
711
|
if @api_client.config.debugging
|
|
@@ -542,12 +715,36 @@ module PostBoost
|
|
|
542
715
|
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
543
716
|
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling MediaApi.list_media"
|
|
544
717
|
end
|
|
718
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
719
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MediaApi.list_media, must be smaller than or equal to 100.'
|
|
720
|
+
end
|
|
721
|
+
|
|
722
|
+
allowable_values = ["image", "gif", "video"]
|
|
723
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
|
|
724
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
|
725
|
+
end
|
|
726
|
+
allowable_values = ["unused", "draft", "scheduled", "published"]
|
|
727
|
+
if @api_client.config.client_side_validation && opts[:'usage'] && !allowable_values.include?(opts[:'usage'])
|
|
728
|
+
fail ArgumentError, "invalid value for \"usage\", must be one of #{allowable_values}"
|
|
729
|
+
end
|
|
730
|
+
allowable_values = ["newest", "oldest", "name", "size"]
|
|
731
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
732
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
733
|
+
end
|
|
545
734
|
# resource path
|
|
546
735
|
local_var_path = '/{workspaceUuid}/media'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
547
736
|
|
|
548
737
|
# query parameters
|
|
549
738
|
query_params = opts[:query_params] || {}
|
|
550
739
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
740
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
741
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
|
742
|
+
query_params[:'mime_types[]'] = @api_client.build_collection_param(opts[:'mime_types'], :multi) if !opts[:'mime_types'].nil?
|
|
743
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
744
|
+
query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil?
|
|
745
|
+
query_params[:'usage'] = opts[:'usage'] if !opts[:'usage'].nil?
|
|
746
|
+
query_params[:'favorite'] = opts[:'favorite'] if !opts[:'favorite'].nil?
|
|
747
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
551
748
|
|
|
552
749
|
# header parameters
|
|
553
750
|
header_params = opts[:header_params] || {}
|
|
@@ -583,8 +780,71 @@ module PostBoost
|
|
|
583
780
|
return data, status_code, headers
|
|
584
781
|
end
|
|
585
782
|
|
|
783
|
+
# List media folders
|
|
784
|
+
# Returns the whole folder tree of the media library in one response (not paginated). Rebuild the tree from each folder's `parent`.
|
|
785
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
786
|
+
# @param [Hash] opts the optional parameters
|
|
787
|
+
# @return [ListMediaFolders200Response]
|
|
788
|
+
def list_media_folders(workspace_uuid, opts = {})
|
|
789
|
+
data, _status_code, _headers = list_media_folders_with_http_info(workspace_uuid, opts)
|
|
790
|
+
data
|
|
791
|
+
end
|
|
792
|
+
|
|
793
|
+
# List media folders
|
|
794
|
+
# Returns the whole folder tree of the media library in one response (not paginated). Rebuild the tree from each folder's `parent`.
|
|
795
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
796
|
+
# @param [Hash] opts the optional parameters
|
|
797
|
+
# @return [Array<(ListMediaFolders200Response, Integer, Hash)>] ListMediaFolders200Response data, response status code and response headers
|
|
798
|
+
def list_media_folders_with_http_info(workspace_uuid, opts = {})
|
|
799
|
+
if @api_client.config.debugging
|
|
800
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.list_media_folders ...'
|
|
801
|
+
end
|
|
802
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
803
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
804
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling MediaApi.list_media_folders"
|
|
805
|
+
end
|
|
806
|
+
# resource path
|
|
807
|
+
local_var_path = '/{workspaceUuid}/media/folders'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s))
|
|
808
|
+
|
|
809
|
+
# query parameters
|
|
810
|
+
query_params = opts[:query_params] || {}
|
|
811
|
+
|
|
812
|
+
# header parameters
|
|
813
|
+
header_params = opts[:header_params] || {}
|
|
814
|
+
# HTTP header 'Accept' (if needed)
|
|
815
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
816
|
+
|
|
817
|
+
# form parameters
|
|
818
|
+
form_params = opts[:form_params] || {}
|
|
819
|
+
|
|
820
|
+
# http body (model)
|
|
821
|
+
post_body = opts[:debug_body]
|
|
822
|
+
|
|
823
|
+
# return_type
|
|
824
|
+
return_type = opts[:debug_return_type] || 'ListMediaFolders200Response'
|
|
825
|
+
|
|
826
|
+
# auth_names
|
|
827
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
828
|
+
|
|
829
|
+
new_options = opts.merge(
|
|
830
|
+
:operation => :"MediaApi.list_media_folders",
|
|
831
|
+
:header_params => header_params,
|
|
832
|
+
:query_params => query_params,
|
|
833
|
+
:form_params => form_params,
|
|
834
|
+
:body => post_body,
|
|
835
|
+
:auth_names => auth_names,
|
|
836
|
+
:return_type => return_type
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
840
|
+
if @api_client.config.debugging
|
|
841
|
+
@api_client.config.logger.debug "API called: MediaApi#list_media_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
842
|
+
end
|
|
843
|
+
return data, status_code, headers
|
|
844
|
+
end
|
|
845
|
+
|
|
586
846
|
# Update media
|
|
587
|
-
# Update the alt text of a media asset.
|
|
847
|
+
# Update the name, alt text, or folder of a media asset. Only the keys present in the body are written. Sending `folder: null` moves the item to the library root; omitting `folder` leaves it where it is.
|
|
588
848
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
589
849
|
# @param media_uuid [String] UUID of the media asset.
|
|
590
850
|
# @param update_media_request [UpdateMediaRequest]
|
|
@@ -596,7 +856,7 @@ module PostBoost
|
|
|
596
856
|
end
|
|
597
857
|
|
|
598
858
|
# Update media
|
|
599
|
-
# Update the alt text of a media asset.
|
|
859
|
+
# Update the name, alt text, or folder of a media asset. Only the keys present in the body are written. Sending `folder: null` moves the item to the library root; omitting `folder` leaves it where it is.
|
|
600
860
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
601
861
|
# @param media_uuid [String] UUID of the media asset.
|
|
602
862
|
# @param update_media_request [UpdateMediaRequest]
|
|
@@ -663,6 +923,86 @@ module PostBoost
|
|
|
663
923
|
return data, status_code, headers
|
|
664
924
|
end
|
|
665
925
|
|
|
926
|
+
# Update media folder
|
|
927
|
+
# Renames a folder and/or moves it. Sending `parent` moves the folder (null = top level); omitting it keeps the current parent. A folder cannot be moved into itself or one of its descendants.
|
|
928
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
929
|
+
# @param folder_uuid [String] UUID of the media folder.
|
|
930
|
+
# @param media_folder_input [MediaFolderInput]
|
|
931
|
+
# @param [Hash] opts the optional parameters
|
|
932
|
+
# @return [MediaFolder]
|
|
933
|
+
def update_media_folder(workspace_uuid, folder_uuid, media_folder_input, opts = {})
|
|
934
|
+
data, _status_code, _headers = update_media_folder_with_http_info(workspace_uuid, folder_uuid, media_folder_input, opts)
|
|
935
|
+
data
|
|
936
|
+
end
|
|
937
|
+
|
|
938
|
+
# Update media folder
|
|
939
|
+
# Renames a folder and/or moves it. Sending `parent` moves the folder (null = top level); omitting it keeps the current parent. A folder cannot be moved into itself or one of its descendants.
|
|
940
|
+
# @param workspace_uuid [String] UUID of the workspace.
|
|
941
|
+
# @param folder_uuid [String] UUID of the media folder.
|
|
942
|
+
# @param media_folder_input [MediaFolderInput]
|
|
943
|
+
# @param [Hash] opts the optional parameters
|
|
944
|
+
# @return [Array<(MediaFolder, Integer, Hash)>] MediaFolder data, response status code and response headers
|
|
945
|
+
def update_media_folder_with_http_info(workspace_uuid, folder_uuid, media_folder_input, opts = {})
|
|
946
|
+
if @api_client.config.debugging
|
|
947
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.update_media_folder ...'
|
|
948
|
+
end
|
|
949
|
+
# verify the required parameter 'workspace_uuid' is set
|
|
950
|
+
if @api_client.config.client_side_validation && workspace_uuid.nil?
|
|
951
|
+
fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling MediaApi.update_media_folder"
|
|
952
|
+
end
|
|
953
|
+
# verify the required parameter 'folder_uuid' is set
|
|
954
|
+
if @api_client.config.client_side_validation && folder_uuid.nil?
|
|
955
|
+
fail ArgumentError, "Missing the required parameter 'folder_uuid' when calling MediaApi.update_media_folder"
|
|
956
|
+
end
|
|
957
|
+
# verify the required parameter 'media_folder_input' is set
|
|
958
|
+
if @api_client.config.client_side_validation && media_folder_input.nil?
|
|
959
|
+
fail ArgumentError, "Missing the required parameter 'media_folder_input' when calling MediaApi.update_media_folder"
|
|
960
|
+
end
|
|
961
|
+
# resource path
|
|
962
|
+
local_var_path = '/{workspaceUuid}/media/folders/{folderUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'folderUuid' + '}', CGI.escape(folder_uuid.to_s))
|
|
963
|
+
|
|
964
|
+
# query parameters
|
|
965
|
+
query_params = opts[:query_params] || {}
|
|
966
|
+
|
|
967
|
+
# header parameters
|
|
968
|
+
header_params = opts[:header_params] || {}
|
|
969
|
+
# HTTP header 'Accept' (if needed)
|
|
970
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
971
|
+
# HTTP header 'Content-Type'
|
|
972
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
973
|
+
if !content_type.nil?
|
|
974
|
+
header_params['Content-Type'] = content_type
|
|
975
|
+
end
|
|
976
|
+
|
|
977
|
+
# form parameters
|
|
978
|
+
form_params = opts[:form_params] || {}
|
|
979
|
+
|
|
980
|
+
# http body (model)
|
|
981
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(media_folder_input)
|
|
982
|
+
|
|
983
|
+
# return_type
|
|
984
|
+
return_type = opts[:debug_return_type] || 'MediaFolder'
|
|
985
|
+
|
|
986
|
+
# auth_names
|
|
987
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
988
|
+
|
|
989
|
+
new_options = opts.merge(
|
|
990
|
+
:operation => :"MediaApi.update_media_folder",
|
|
991
|
+
:header_params => header_params,
|
|
992
|
+
:query_params => query_params,
|
|
993
|
+
:form_params => form_params,
|
|
994
|
+
:body => post_body,
|
|
995
|
+
:auth_names => auth_names,
|
|
996
|
+
:return_type => return_type
|
|
997
|
+
)
|
|
998
|
+
|
|
999
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1000
|
+
if @api_client.config.debugging
|
|
1001
|
+
@api_client.config.logger.debug "API called: MediaApi#update_media_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1002
|
+
end
|
|
1003
|
+
return data, status_code, headers
|
|
1004
|
+
end
|
|
1005
|
+
|
|
666
1006
|
# Upload a chunk
|
|
667
1007
|
# Upload a single chunk of a chunked upload session.
|
|
668
1008
|
# @param workspace_uuid [String] UUID of the workspace.
|
|
@@ -670,7 +1010,7 @@ module PostBoost
|
|
|
670
1010
|
# @param chunk [File]
|
|
671
1011
|
# @param chunk_index [Integer] Zero-based index of this chunk.
|
|
672
1012
|
# @param [Hash] opts the optional parameters
|
|
673
|
-
# @return [
|
|
1013
|
+
# @return [UploadChunk201Response]
|
|
674
1014
|
def upload_chunk(workspace_uuid, upload_uuid, chunk, chunk_index, opts = {})
|
|
675
1015
|
data, _status_code, _headers = upload_chunk_with_http_info(workspace_uuid, upload_uuid, chunk, chunk_index, opts)
|
|
676
1016
|
data
|
|
@@ -683,7 +1023,7 @@ module PostBoost
|
|
|
683
1023
|
# @param chunk [File]
|
|
684
1024
|
# @param chunk_index [Integer] Zero-based index of this chunk.
|
|
685
1025
|
# @param [Hash] opts the optional parameters
|
|
686
|
-
# @return [Array<(
|
|
1026
|
+
# @return [Array<(UploadChunk201Response, Integer, Hash)>] UploadChunk201Response data, response status code and response headers
|
|
687
1027
|
def upload_chunk_with_http_info(workspace_uuid, upload_uuid, chunk, chunk_index, opts = {})
|
|
688
1028
|
if @api_client.config.debugging
|
|
689
1029
|
@api_client.config.logger.debug 'Calling API: MediaApi.upload_chunk ...'
|
|
@@ -729,7 +1069,7 @@ module PostBoost
|
|
|
729
1069
|
post_body = opts[:debug_body]
|
|
730
1070
|
|
|
731
1071
|
# return_type
|
|
732
|
-
return_type = opts[:debug_return_type] || '
|
|
1072
|
+
return_type = opts[:debug_return_type] || 'UploadChunk201Response'
|
|
733
1073
|
|
|
734
1074
|
# auth_names
|
|
735
1075
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -757,6 +1097,7 @@ module PostBoost
|
|
|
757
1097
|
# @param file [File] The file to upload.
|
|
758
1098
|
# @param [Hash] opts the optional parameters
|
|
759
1099
|
# @option opts [String] :alt_text Alternative text for accessibility.
|
|
1100
|
+
# @option opts [String] :folder UUID of the media folder to file the upload in. Omit or null for the library root.
|
|
760
1101
|
# @return [Media]
|
|
761
1102
|
def upload_media(workspace_uuid, file, opts = {})
|
|
762
1103
|
data, _status_code, _headers = upload_media_with_http_info(workspace_uuid, file, opts)
|
|
@@ -769,6 +1110,7 @@ module PostBoost
|
|
|
769
1110
|
# @param file [File] The file to upload.
|
|
770
1111
|
# @param [Hash] opts the optional parameters
|
|
771
1112
|
# @option opts [String] :alt_text Alternative text for accessibility.
|
|
1113
|
+
# @option opts [String] :folder UUID of the media folder to file the upload in. Omit or null for the library root.
|
|
772
1114
|
# @return [Array<(Media, Integer, Hash)>] Media data, response status code and response headers
|
|
773
1115
|
def upload_media_with_http_info(workspace_uuid, file, opts = {})
|
|
774
1116
|
if @api_client.config.debugging
|
|
@@ -806,6 +1148,7 @@ module PostBoost
|
|
|
806
1148
|
form_params = opts[:form_params] || {}
|
|
807
1149
|
form_params['file'] = file
|
|
808
1150
|
form_params['alt_text'] = opts[:'alt_text'] if !opts[:'alt_text'].nil?
|
|
1151
|
+
form_params['folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
|
809
1152
|
|
|
810
1153
|
# http body (model)
|
|
811
1154
|
post_body = opts[:debug_body]
|