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
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PostBoost API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.8.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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PostBoost
|
|
17
|
+
class MentionIdentityInput
|
|
18
|
+
# Mention provider key. One identity per provider.
|
|
19
|
+
attr_accessor :provider
|
|
20
|
+
|
|
21
|
+
# Profile handle; a leading `@` is stripped.
|
|
22
|
+
attr_accessor :handle
|
|
23
|
+
|
|
24
|
+
attr_accessor :label
|
|
25
|
+
|
|
26
|
+
# Sealed lookup result that names the profile's network ID.
|
|
27
|
+
attr_accessor :token
|
|
28
|
+
|
|
29
|
+
# A connected account of this workspace that names the profile. Wins over `token` when both are sent.
|
|
30
|
+
attr_accessor :account_uuid
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'provider' => :'provider',
|
|
36
|
+
:'handle' => :'handle',
|
|
37
|
+
:'label' => :'label',
|
|
38
|
+
:'token' => :'token',
|
|
39
|
+
:'account_uuid' => :'account_uuid'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'provider' => :'String',
|
|
52
|
+
:'handle' => :'String',
|
|
53
|
+
:'label' => :'String',
|
|
54
|
+
:'token' => :'String',
|
|
55
|
+
:'account_uuid' => :'String'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PostBoost::MentionIdentityInput` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PostBoost::MentionIdentityInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'provider')
|
|
81
|
+
self.provider = attributes[:'provider']
|
|
82
|
+
else
|
|
83
|
+
self.provider = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'handle')
|
|
87
|
+
self.handle = attributes[:'handle']
|
|
88
|
+
else
|
|
89
|
+
self.handle = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'label')
|
|
93
|
+
self.label = attributes[:'label']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'token')
|
|
97
|
+
self.token = attributes[:'token']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'account_uuid')
|
|
101
|
+
self.account_uuid = attributes[:'account_uuid']
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @provider.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "provider", provider cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @handle.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "handle", handle cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @handle.to_s.length > 255
|
|
119
|
+
invalid_properties.push('invalid value for "handle", the character length must be smaller than or equal to 255.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if !@label.nil? && @label.to_s.length > 255
|
|
123
|
+
invalid_properties.push('invalid value for "label", the character length must be smaller than or equal to 255.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if !@token.nil? && @token.to_s.length > 2048
|
|
127
|
+
invalid_properties.push('invalid value for "token", the character length must be smaller than or equal to 2048.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
invalid_properties
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Check to see if the all the properties in the model are valid
|
|
134
|
+
# @return true if the model is valid
|
|
135
|
+
def valid?
|
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
137
|
+
return false if @provider.nil?
|
|
138
|
+
return false if @handle.nil?
|
|
139
|
+
return false if @handle.to_s.length > 255
|
|
140
|
+
return false if !@label.nil? && @label.to_s.length > 255
|
|
141
|
+
return false if !@token.nil? && @token.to_s.length > 2048
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] handle Value to be assigned
|
|
147
|
+
def handle=(handle)
|
|
148
|
+
if handle.nil?
|
|
149
|
+
fail ArgumentError, 'handle cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if handle.to_s.length > 255
|
|
153
|
+
fail ArgumentError, 'invalid value for "handle", the character length must be smaller than or equal to 255.'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@handle = handle
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] label Value to be assigned
|
|
161
|
+
def label=(label)
|
|
162
|
+
if label.nil?
|
|
163
|
+
fail ArgumentError, 'label cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if label.to_s.length > 255
|
|
167
|
+
fail ArgumentError, 'invalid value for "label", the character length must be smaller than or equal to 255.'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@label = label
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] token Value to be assigned
|
|
175
|
+
def token=(token)
|
|
176
|
+
if token.nil?
|
|
177
|
+
fail ArgumentError, 'token cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if token.to_s.length > 2048
|
|
181
|
+
fail ArgumentError, 'invalid value for "token", the character length must be smaller than or equal to 2048.'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@token = token
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Checks equality by comparing each attribute.
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def ==(o)
|
|
190
|
+
return true if self.equal?(o)
|
|
191
|
+
self.class == o.class &&
|
|
192
|
+
provider == o.provider &&
|
|
193
|
+
handle == o.handle &&
|
|
194
|
+
label == o.label &&
|
|
195
|
+
token == o.token &&
|
|
196
|
+
account_uuid == o.account_uuid
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# @see the `==` method
|
|
200
|
+
# @param [Object] Object to be compared
|
|
201
|
+
def eql?(o)
|
|
202
|
+
self == o
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Calculates hash code according to all attributes.
|
|
206
|
+
# @return [Integer] Hash code
|
|
207
|
+
def hash
|
|
208
|
+
[provider, handle, label, token, account_uuid].hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Builds the object from hash
|
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
213
|
+
# @return [Object] Returns the model itself
|
|
214
|
+
def self.build_from_hash(attributes)
|
|
215
|
+
return nil unless attributes.is_a?(Hash)
|
|
216
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
217
|
+
transformed_hash = {}
|
|
218
|
+
openapi_types.each_pair do |key, type|
|
|
219
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
220
|
+
transformed_hash["#{key}"] = nil
|
|
221
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
222
|
+
# check to ensure the input is an array given that the attribute
|
|
223
|
+
# is documented as an array but the input is not
|
|
224
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
225
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
226
|
+
end
|
|
227
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
228
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
new(transformed_hash)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Deserializes the data based on type
|
|
235
|
+
# @param string type Data type
|
|
236
|
+
# @param string value Value to be deserialized
|
|
237
|
+
# @return [Object] Deserialized data
|
|
238
|
+
def self._deserialize(type, value)
|
|
239
|
+
case type.to_sym
|
|
240
|
+
when :Time
|
|
241
|
+
Time.parse(value)
|
|
242
|
+
when :Date
|
|
243
|
+
Date.parse(value)
|
|
244
|
+
when :String
|
|
245
|
+
value.to_s
|
|
246
|
+
when :Integer
|
|
247
|
+
value.to_i
|
|
248
|
+
when :Float
|
|
249
|
+
value.to_f
|
|
250
|
+
when :Boolean
|
|
251
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
252
|
+
true
|
|
253
|
+
else
|
|
254
|
+
false
|
|
255
|
+
end
|
|
256
|
+
when :Object
|
|
257
|
+
# generic object (usually a Hash), return directly
|
|
258
|
+
value
|
|
259
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
260
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
261
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
262
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
263
|
+
k_type = Regexp.last_match[:k_type]
|
|
264
|
+
v_type = Regexp.last_match[:v_type]
|
|
265
|
+
{}.tap do |hash|
|
|
266
|
+
value.each do |k, v|
|
|
267
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
else # model
|
|
271
|
+
# models (e.g. Pet) or oneOf
|
|
272
|
+
klass = PostBoost.const_get(type)
|
|
273
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Returns the string representation of the object
|
|
278
|
+
# @return [String] String presentation of the object
|
|
279
|
+
def to_s
|
|
280
|
+
to_hash.to_s
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
|
285
|
+
def to_body
|
|
286
|
+
to_hash
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Returns the object in the form of hash
|
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
|
291
|
+
def to_hash
|
|
292
|
+
hash = {}
|
|
293
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
294
|
+
value = self.send(attr)
|
|
295
|
+
if value.nil?
|
|
296
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
297
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
hash[param] = _to_hash(value)
|
|
301
|
+
end
|
|
302
|
+
hash
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Outputs non-array value in the form of hash
|
|
306
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
307
|
+
# @param [Object] value Any valid value
|
|
308
|
+
# @return [Hash] Returns the value in the form of hash
|
|
309
|
+
def _to_hash(value)
|
|
310
|
+
if value.is_a?(Array)
|
|
311
|
+
value.compact.map { |v| _to_hash(v) }
|
|
312
|
+
elsif value.is_a?(Hash)
|
|
313
|
+
{}.tap do |hash|
|
|
314
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
315
|
+
end
|
|
316
|
+
elsif value.respond_to? :to_hash
|
|
317
|
+
value.to_hash
|
|
318
|
+
else
|
|
319
|
+
value
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
end
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PostBoost API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.8.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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PostBoost
|
|
17
|
+
class MentionInput
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
attr_accessor :avatar
|
|
21
|
+
|
|
22
|
+
attr_accessor :identities
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'name' => :'name',
|
|
28
|
+
:'avatar' => :'avatar',
|
|
29
|
+
:'identities' => :'identities'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'name' => :'String',
|
|
42
|
+
:'avatar' => :'String',
|
|
43
|
+
:'identities' => :'Array<MentionIdentityInput>'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List of attributes with nullable: true
|
|
48
|
+
def self.openapi_nullable
|
|
49
|
+
Set.new([
|
|
50
|
+
])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
if (!attributes.is_a?(Hash))
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PostBoost::MentionInput` initialize method"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PostBoost::MentionInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'name')
|
|
69
|
+
self.name = attributes[:'name']
|
|
70
|
+
else
|
|
71
|
+
self.name = nil
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'avatar')
|
|
75
|
+
self.avatar = attributes[:'avatar']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'identities')
|
|
79
|
+
if (value = attributes[:'identities']).is_a?(Array)
|
|
80
|
+
self.identities = value
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @name.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @name.to_s.length > 255
|
|
95
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if !@avatar.nil? && @avatar.to_s.length > 2048
|
|
99
|
+
invalid_properties.push('invalid value for "avatar", the character length must be smaller than or equal to 2048.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
invalid_properties
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Check to see if the all the properties in the model are valid
|
|
106
|
+
# @return true if the model is valid
|
|
107
|
+
def valid?
|
|
108
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
109
|
+
return false if @name.nil?
|
|
110
|
+
return false if @name.to_s.length > 255
|
|
111
|
+
return false if !@avatar.nil? && @avatar.to_s.length > 2048
|
|
112
|
+
true
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Custom attribute writer method with validation
|
|
116
|
+
# @param [Object] name Value to be assigned
|
|
117
|
+
def name=(name)
|
|
118
|
+
if name.nil?
|
|
119
|
+
fail ArgumentError, 'name cannot be nil'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if name.to_s.length > 255
|
|
123
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@name = name
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] avatar Value to be assigned
|
|
131
|
+
def avatar=(avatar)
|
|
132
|
+
if avatar.nil?
|
|
133
|
+
fail ArgumentError, 'avatar cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if avatar.to_s.length > 2048
|
|
137
|
+
fail ArgumentError, 'invalid value for "avatar", the character length must be smaller than or equal to 2048.'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
@avatar = avatar
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Checks equality by comparing each attribute.
|
|
144
|
+
# @param [Object] Object to be compared
|
|
145
|
+
def ==(o)
|
|
146
|
+
return true if self.equal?(o)
|
|
147
|
+
self.class == o.class &&
|
|
148
|
+
name == o.name &&
|
|
149
|
+
avatar == o.avatar &&
|
|
150
|
+
identities == o.identities
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# @see the `==` method
|
|
154
|
+
# @param [Object] Object to be compared
|
|
155
|
+
def eql?(o)
|
|
156
|
+
self == o
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Calculates hash code according to all attributes.
|
|
160
|
+
# @return [Integer] Hash code
|
|
161
|
+
def hash
|
|
162
|
+
[name, avatar, identities].hash
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Builds the object from hash
|
|
166
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
167
|
+
# @return [Object] Returns the model itself
|
|
168
|
+
def self.build_from_hash(attributes)
|
|
169
|
+
return nil unless attributes.is_a?(Hash)
|
|
170
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
171
|
+
transformed_hash = {}
|
|
172
|
+
openapi_types.each_pair do |key, type|
|
|
173
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
174
|
+
transformed_hash["#{key}"] = nil
|
|
175
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
176
|
+
# check to ensure the input is an array given that the attribute
|
|
177
|
+
# is documented as an array but the input is not
|
|
178
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
179
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
180
|
+
end
|
|
181
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
182
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
new(transformed_hash)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Deserializes the data based on type
|
|
189
|
+
# @param string type Data type
|
|
190
|
+
# @param string value Value to be deserialized
|
|
191
|
+
# @return [Object] Deserialized data
|
|
192
|
+
def self._deserialize(type, value)
|
|
193
|
+
case type.to_sym
|
|
194
|
+
when :Time
|
|
195
|
+
Time.parse(value)
|
|
196
|
+
when :Date
|
|
197
|
+
Date.parse(value)
|
|
198
|
+
when :String
|
|
199
|
+
value.to_s
|
|
200
|
+
when :Integer
|
|
201
|
+
value.to_i
|
|
202
|
+
when :Float
|
|
203
|
+
value.to_f
|
|
204
|
+
when :Boolean
|
|
205
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
206
|
+
true
|
|
207
|
+
else
|
|
208
|
+
false
|
|
209
|
+
end
|
|
210
|
+
when :Object
|
|
211
|
+
# generic object (usually a Hash), return directly
|
|
212
|
+
value
|
|
213
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
214
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
215
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
216
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
217
|
+
k_type = Regexp.last_match[:k_type]
|
|
218
|
+
v_type = Regexp.last_match[:v_type]
|
|
219
|
+
{}.tap do |hash|
|
|
220
|
+
value.each do |k, v|
|
|
221
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
else # model
|
|
225
|
+
# models (e.g. Pet) or oneOf
|
|
226
|
+
klass = PostBoost.const_get(type)
|
|
227
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Returns the string representation of the object
|
|
232
|
+
# @return [String] String presentation of the object
|
|
233
|
+
def to_s
|
|
234
|
+
to_hash.to_s
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
|
239
|
+
def to_body
|
|
240
|
+
to_hash
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Returns the object in the form of hash
|
|
244
|
+
# @return [Hash] Returns the object in the form of hash
|
|
245
|
+
def to_hash
|
|
246
|
+
hash = {}
|
|
247
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
248
|
+
value = self.send(attr)
|
|
249
|
+
if value.nil?
|
|
250
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
251
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
hash[param] = _to_hash(value)
|
|
255
|
+
end
|
|
256
|
+
hash
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Outputs non-array value in the form of hash
|
|
260
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
261
|
+
# @param [Object] value Any valid value
|
|
262
|
+
# @return [Hash] Returns the value in the form of hash
|
|
263
|
+
def _to_hash(value)
|
|
264
|
+
if value.is_a?(Array)
|
|
265
|
+
value.compact.map { |v| _to_hash(v) }
|
|
266
|
+
elsif value.is_a?(Hash)
|
|
267
|
+
{}.tap do |hash|
|
|
268
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
269
|
+
end
|
|
270
|
+
elsif value.respond_to? :to_hash
|
|
271
|
+
value.to_hash
|
|
272
|
+
else
|
|
273
|
+
value
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
end
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|