late-sdk 0.0.716 → 0.0.718
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 +81 -0
- data/docs/AccountsApi.md +142 -1
- data/docs/AdCampaignsApi.md +22 -10
- data/docs/AdCreative.md +2 -0
- data/docs/AdDailyMetrics.md +1 -1
- data/docs/AdEngagementCounts.md +4 -4
- data/docs/AdInsightsApi.md +164 -0
- data/docs/AdMetrics.md +1 -1
- data/docs/AdTargetingApi.md +3 -3
- data/docs/AdTreeCampaign.md +1 -1
- data/docs/AddBroadcastRecipientsRequest.md +1 -1
- data/docs/AnalyticsListResponsePostsInner.md +1 -1
- data/docs/AnalyticsListResponsePostsInnerMediaItemsInner.md +24 -0
- data/docs/AnalyticsSinglePostResponseMediaItemsInner.md +7 -3
- data/docs/BillingSnapshot.md +2 -0
- data/docs/BillingSnapshotPlan.md +3 -1
- data/docs/Blog.md +24 -0
- data/docs/BlogArticle.md +44 -0
- data/docs/BlogArticleImage.md +20 -0
- data/docs/BlogsApi.md +747 -0
- data/docs/BlueskyPlatformData.md +2 -0
- data/docs/BoostPostRequest.md +2 -2
- data/docs/CampaignAnalyticsResponseAnalyticsDailyInner.md +1 -1
- data/docs/CommentsApi.md +8 -8
- data/docs/ConnectApi.md +149 -1
- data/docs/ConnectShopifyWithToken200Response.md +18 -0
- data/docs/ConnectShopifyWithToken200ResponseAccount.md +26 -0
- data/docs/ConnectShopifyWithTokenRequest.md +22 -0
- data/docs/CreateBlog201Response.md +20 -0
- data/docs/CreateBlogArticle201Response.md +20 -0
- data/docs/CreateBlogArticleRequest.md +36 -0
- data/docs/CreateBlogArticleRequestImage.md +20 -0
- data/docs/CreateBlogArticleRequestSeo.md +20 -0
- data/docs/CreateBlogRequest.md +20 -0
- data/docs/CreateCallAdRequest.md +1 -1
- data/docs/CreateInboxConversationRequest.md +2 -0
- data/docs/CreateMessagingAdRequest.md +1 -1
- data/docs/CreatePostRequest.md +1 -1
- data/docs/CreateStandaloneAdRequest.md +10 -6
- data/docs/CreateStandaloneAdRequestPromotedObject.md +2 -2
- data/docs/CreateStandaloneAdRequestVideo.md +1 -1
- data/docs/CtwaAdRequestBody.md +1 -1
- data/docs/ExternalPostMediaItem.md +7 -3
- data/docs/ExternalPostSummary.md +0 -2
- data/docs/ExternalPostSummaryAnalytics.md +1 -1
- data/docs/GetAccountHealth200Response.md +3 -1
- data/docs/GetAccountHealth200ResponsePlatformConnection.md +24 -0
- data/docs/GetAccountHealth200ResponsePlatformConnectionMetaError.md +22 -0
- data/docs/GetAdAnalytics202Response.md +1 -1
- data/docs/GetAdTree202Response.md +1 -1
- data/docs/GetAdsTimeline202Response.md +1 -1
- data/docs/GetBlueskySettings200Response.md +18 -0
- data/docs/GetCampaignAnalytics202Response.md +1 -1
- data/docs/GetInboxPostComments200ResponseCommentsInner.md +4 -2
- data/docs/GetLinkedInPostAnalytics200ResponseAnalytics.md +1 -1
- data/docs/GetPhoneNumberKycForm200Response.md +3 -1
- data/docs/GetWhatsAppNumberKycForm200Response.md +3 -1
- data/docs/LinkedInAggregateAnalyticsTotalResponseAnalytics.md +1 -1
- data/docs/LinkedInPlatformData.md +4 -2
- data/docs/LinkedInPlatformDataPoll.md +22 -0
- data/docs/ListAds202Response.md +1 -1
- data/docs/ListBlogArticles200Response.md +22 -0
- data/docs/ListBlogs200Response.md +22 -0
- data/docs/ListInboxConversations200ResponseDataInnerMetadata.md +3 -3
- data/docs/ListLeads200ResponseLeadsInner.md +3 -3
- data/docs/ListLocalServicesLeadConversations200Response.md +22 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInner.md +28 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInnerMessage.md +20 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInnerPhoneCall.md +20 -0
- data/docs/ListLocalServicesLeads200Response.md +22 -0
- data/docs/ListLocalServicesLeads200ResponseDataInner.md +38 -0
- data/docs/ListLocalServicesLeads200ResponseDataInnerContact.md +22 -0
- data/docs/ListPhoneNumbers200ResponseConnectedInner.md +3 -1
- data/docs/ListPhoneNumbers200ResponseNumbersInner.md +2 -0
- data/docs/ListWhatsAppAccountEvents200Response.md +18 -0
- data/docs/ListWhatsAppAccountEvents200ResponseEventsInner.md +28 -0
- data/docs/MessagesApi.md +4 -4
- data/docs/OnVerificationApprovedRequest.md +1 -1
- data/docs/OnVerificationFailedRequest.md +1 -1
- data/docs/OnWhatsAppAutomaticEventRequest.md +1 -1
- data/docs/OnWhatsAppNumberActionRequiredRequest.md +1 -1
- data/docs/OnWhatsAppNumberActivatedRequest.md +1 -1
- data/docs/OnWhatsAppNumberDeclinedRequest.md +1 -1
- data/docs/OnWhatsAppNumberKycSubmittedRequest.md +1 -1
- data/docs/OnWhatsAppNumberReactivatedRequest.md +1 -1
- data/docs/OnWhatsAppNumberReleasedRequest.md +1 -1
- data/docs/OnWhatsAppNumberSuspendedRequest.md +1 -1
- data/docs/OnWhatsAppNumberVerificationRequiredRequest.md +1 -1
- data/docs/PlatformTarget.md +2 -2
- data/docs/PostAnalytics.md +3 -3
- data/docs/PostsApi.md +1 -1
- data/docs/SMSApi.md +1 -1
- data/docs/SearchAdTargeting200ResponseResultsInner.md +1 -1
- data/docs/SendInboxMessageRequest.md +4 -2
- data/docs/SubmitPhoneNumberKycRequest.md +1 -1
- data/docs/SubmitPhoneNumberKycRequestAddress.md +2 -0
- data/docs/SubmitWhatsAppNumberKycRequest.md +1 -1
- data/docs/TwitterPlatformData.md +2 -0
- data/docs/UpdateAdCampaignStatus200Response.md +6 -6
- data/docs/UpdateAdSet200Response.md +7 -3
- data/docs/UpdateAdSetRequest.md +1 -1
- data/docs/UpdateAdSetStatus200Response.md +9 -3
- data/docs/UpdateBlogArticleRequest.md +36 -0
- data/docs/UpdateBlogRequest.md +20 -0
- data/docs/UpdateBlueskySettingsRequest.md +18 -0
- data/docs/ValidatePhoneNumberKycAddressRequest.md +2 -0
- data/docs/WebhookEventsApi.md +138 -0
- data/docs/WebhookPayloadAccountAdsInitialSyncCompleted.md +1 -1
- data/docs/WebhookPayloadAccountConnected.md +1 -1
- data/docs/WebhookPayloadAccountDisconnected.md +1 -1
- data/docs/WebhookPayloadAdStatusChanged.md +1 -1
- data/docs/WebhookPayloadCallEnded.md +1 -1
- data/docs/WebhookPayloadCallEndedCall.md +4 -0
- data/docs/WebhookPayloadCallFailed.md +1 -1
- data/docs/WebhookPayloadCallPermissionRequest.md +1 -1
- data/docs/WebhookPayloadCallReceived.md +1 -1
- data/docs/WebhookPayloadComment.md +1 -1
- data/docs/WebhookPayloadCommentCommentAuthor.md +2 -0
- data/docs/WebhookPayloadConversationStarted.md +1 -1
- data/docs/WebhookPayloadExternalPost.md +1 -1
- data/docs/WebhookPayloadLead.md +1 -1
- data/docs/WebhookPayloadMessage.md +1 -1
- data/docs/WebhookPayloadMessageDeleted.md +1 -1
- data/docs/WebhookPayloadMessageDeliveryStatus.md +1 -1
- data/docs/WebhookPayloadMessageEdited.md +1 -1
- data/docs/WebhookPayloadMessageMetadata.md +5 -1
- data/docs/WebhookPayloadMessageMetadataReferral.md +5 -3
- data/docs/WebhookPayloadMessageMetadataUnsupported.md +22 -0
- data/docs/WebhookPayloadMessageSent.md +1 -1
- data/docs/WebhookPayloadPost.md +1 -1
- data/docs/WebhookPayloadPostPlatform.md +1 -1
- data/docs/WebhookPayloadReaction.md +1 -1
- data/docs/WebhookPayloadReferral.md +30 -0
- data/docs/WebhookPayloadReferralReferral.md +28 -0
- data/docs/WebhookPayloadReferralReferralAdsContextData.md +28 -0
- data/docs/WebhookPayloadReferralSender.md +20 -0
- data/docs/WebhookPayloadReviewNew.md +1 -1
- data/docs/WebhookPayloadReviewUpdated.md +1 -1
- data/docs/WebhookPayloadTest.md +1 -1
- data/docs/WebhookPayloadWhatsAppTemplateCategoryUpdated.md +26 -0
- data/docs/WebhookPayloadWhatsAppTemplateCategoryUpdatedTemplate.md +32 -0
- data/docs/WebhookPayloadWhatsAppTemplateStatusUpdated.md +1 -1
- data/docs/WhatsAppApi.md +74 -0
- data/docs/WorkflowNode.md +3 -1
- data/docs/XArticle.md +24 -0
- data/docs/XArticleBlock.md +28 -0
- data/docs/XArticleBlockData.md +24 -0
- data/docs/XArticleContentState.md +20 -0
- data/docs/XArticleCover.md +20 -0
- data/docs/XArticleEntity.md +57 -0
- data/docs/XArticleEntityOneOf.md +20 -0
- data/docs/XArticleEntityOneOf1.md +20 -0
- data/docs/XArticleEntityOneOf1Value.md +22 -0
- data/docs/XArticleEntityOneOf1ValueData.md +18 -0
- data/docs/XArticleEntityOneOf2.md +20 -0
- data/docs/XArticleEntityOneOf2Value.md +22 -0
- data/docs/XArticleEntityOneOf2ValueData.md +22 -0
- data/docs/XArticleEntityOneOf3.md +20 -0
- data/docs/XArticleEntityOneOf3Value.md +22 -0
- data/docs/XArticleEntityOneOf3ValueData.md +18 -0
- data/docs/XArticleEntityOneOf4.md +20 -0
- data/docs/XArticleEntityOneOf4Value.md +22 -0
- data/docs/XArticleEntityOneOf4ValueData.md +18 -0
- data/docs/XArticleEntityOneOf5.md +20 -0
- data/docs/XArticleEntityOneOf5Value.md +22 -0
- data/docs/XArticleEntityOneOfValue.md +22 -0
- data/docs/XArticleEntityOneOfValueData.md +18 -0
- data/docs/XArticleEntityRange.md +22 -0
- data/docs/XArticleInlineStyleRange.md +22 -0
- data/docs/XArticleTextRange.md +22 -0
- data/docs/YouTubeVideoRetentionResponse.md +1 -1
- data/docs/YouTubeVideoRetentionResponseRetentionCurveInner.md +2 -2
- data/lib/zernio-sdk/api/accounts_api.rb +139 -2
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +35 -8
- data/lib/zernio-sdk/api/ad_insights_api.rb +165 -0
- data/lib/zernio-sdk/api/ad_targeting_api.rb +5 -5
- data/lib/zernio-sdk/api/blogs_api.rb +845 -0
- data/lib/zernio-sdk/api/comments_api.rb +10 -10
- data/lib/zernio-sdk/api/connect_api.rb +149 -0
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/api/posts_api.rb +2 -2
- data/lib/zernio-sdk/api/sms_api.rb +2 -2
- data/lib/zernio-sdk/api/webhook_events_api.rb +132 -0
- data/lib/zernio-sdk/api/whats_app_api.rb +75 -0
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +2 -2
- data/lib/zernio-sdk/models/ad_creative.rb +12 -1
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +1 -1
- data/lib/zernio-sdk/models/ad_engagement_counts.rb +5 -5
- data/lib/zernio-sdk/models/ad_metrics.rb +1 -1
- data/lib/zernio-sdk/models/ad_tree_campaign.rb +1 -1
- data/lib/zernio-sdk/models/add_broadcast_recipients_request.rb +1 -1
- data/lib/zernio-sdk/models/analytics_list_response_posts_inner.rb +1 -1
- data/lib/zernio-sdk/models/analytics_list_response_posts_inner_media_items_inner.rb +211 -0
- data/lib/zernio-sdk/models/analytics_single_post_response_media_items_inner.rb +52 -6
- data/lib/zernio-sdk/models/billing_snapshot.rb +14 -3
- data/lib/zernio-sdk/models/billing_snapshot_plan.rb +14 -4
- data/lib/zernio-sdk/models/blog.rb +211 -0
- data/lib/zernio-sdk/models/blog_article.rb +315 -0
- data/lib/zernio-sdk/models/blog_article_image.rb +158 -0
- data/lib/zernio-sdk/models/bluesky_platform_data.rb +42 -2
- data/lib/zernio-sdk/models/boost_post_request.rb +30 -1
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_daily_inner.rb +1 -1
- data/lib/zernio-sdk/models/connect_shopify_with_token200_response.rb +147 -0
- data/lib/zernio-sdk/models/connect_shopify_with_token200_response_account.rb +218 -0
- data/lib/zernio-sdk/models/connect_shopify_with_token_request.rb +219 -0
- data/lib/zernio-sdk/models/create_blog201_response.rb +190 -0
- data/lib/zernio-sdk/models/create_blog_article201_response.rb +190 -0
- data/lib/zernio-sdk/models/create_blog_article_request.rb +262 -0
- data/lib/zernio-sdk/models/create_blog_article_request_image.rb +174 -0
- data/lib/zernio-sdk/models/create_blog_article_request_seo.rb +157 -0
- data/lib/zernio-sdk/models/create_blog_request.rb +202 -0
- data/lib/zernio-sdk/models/create_call_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +13 -1
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_post_request.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +67 -6
- data/lib/zernio-sdk/models/create_standalone_ad_request_creatives_inner_video.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +3 -3
- data/lib/zernio-sdk/models/create_standalone_ad_request_video.rb +1 -1
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +1 -1
- data/lib/zernio-sdk/models/external_post_media_item.rb +48 -16
- data/lib/zernio-sdk/models/external_post_summary.rb +1 -11
- data/lib/zernio-sdk/models/external_post_summary_analytics.rb +1 -0
- data/lib/zernio-sdk/models/facebook_settings.rb +5 -5
- data/lib/zernio-sdk/models/get_account_health200_response.rb +13 -4
- data/lib/zernio-sdk/models/get_account_health200_response_platform_connection.rb +213 -0
- data/lib/zernio-sdk/models/get_account_health200_response_platform_connection_meta_error.rb +168 -0
- data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_ad_tree202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_ads_timeline202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_bluesky_settings200_response.rb +150 -0
- data/lib/zernio-sdk/models/get_campaign_analytics202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb +13 -2
- data/lib/zernio-sdk/models/get_linked_in_post_analytics200_response_analytics.rb +1 -1
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response.rb +14 -4
- data/lib/zernio-sdk/models/get_whats_app_number_kyc_form200_response.rb +14 -4
- data/lib/zernio-sdk/models/inbox_webhook_message.rb +2 -2
- data/lib/zernio-sdk/models/linked_in_aggregate_analytics_total_response_analytics.rb +1 -1
- data/lib/zernio-sdk/models/linked_in_platform_data.rb +15 -6
- data/lib/zernio-sdk/models/linked_in_platform_data_poll.rb +277 -0
- data/lib/zernio-sdk/models/list_ads202_response.rb +6 -29
- data/lib/zernio-sdk/models/list_blog_articles200_response.rb +203 -0
- data/lib/zernio-sdk/models/list_blogs200_response.rb +203 -0
- data/lib/zernio-sdk/models/list_broadcast_recipients200_response_recipients_inner.rb +1 -0
- data/lib/zernio-sdk/models/list_inbox_conversations200_response_data_inner_metadata.rb +4 -4
- data/lib/zernio-sdk/models/list_leads200_response_leads_inner.rb +3 -2
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner.rb +198 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner_message.rb +160 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner_phone_call.rb +159 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response_data_inner.rb +249 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response_data_inner_contact.rb +169 -0
- data/lib/zernio-sdk/models/list_phone_numbers200_response_connected_inner.rb +15 -5
- data/lib/zernio-sdk/models/list_phone_numbers200_response_numbers_inner.rb +11 -1
- data/lib/zernio-sdk/models/list_sequence_enrollments200_response_enrollments_inner.rb +3 -0
- data/lib/zernio-sdk/models/list_whats_app_account_events200_response.rb +149 -0
- data/lib/zernio-sdk/models/list_whats_app_account_events200_response_events_inner.rb +228 -0
- data/lib/zernio-sdk/models/on_verification_approved_request.rb +1 -0
- data/lib/zernio-sdk/models/on_verification_failed_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_automatic_event_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_action_required_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_activated_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_declined_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_kyc_submitted_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_reactivated_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_released_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_suspended_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_verification_required_request.rb +1 -0
- data/lib/zernio-sdk/models/platform_target.rb +5 -4
- data/lib/zernio-sdk/models/post_analytics.rb +2 -1
- data/lib/zernio-sdk/models/search_ad_targeting200_response_results_inner.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message_request.rb +15 -3
- data/lib/zernio-sdk/models/social_account.rb +2 -2
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +1 -1
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request_address.rb +11 -1
- data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +1 -1
- data/lib/zernio-sdk/models/twitter_platform_data.rb +11 -2
- data/lib/zernio-sdk/models/update_ad_campaign_status200_response.rb +50 -15
- data/lib/zernio-sdk/models/update_ad_set200_response.rb +26 -1
- data/lib/zernio-sdk/models/update_ad_set_request.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_set_status200_response.rb +72 -4
- data/lib/zernio-sdk/models/update_blog_article_request.rb +257 -0
- data/lib/zernio-sdk/models/update_blog_request.rb +196 -0
- data/lib/zernio-sdk/models/update_bluesky_settings_request.rb +176 -0
- data/lib/zernio-sdk/models/validate_phone_number_kyc_address_request.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_account_ads_initial_sync_completed.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_account_connected.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_account_disconnected.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_ad_status_changed.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_call_ended.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_ended_call.rb +23 -1
- data/lib/zernio-sdk/models/webhook_payload_call_failed.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_permission_request.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_received.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_comment.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_comment_comment_author.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_conversation_started.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_external_post.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_lead.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_deleted.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_delivery_status.rb +2 -1
- data/lib/zernio-sdk/models/webhook_payload_message_edited.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_message.rb +2 -2
- data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +23 -4
- data/lib/zernio-sdk/models/webhook_payload_message_metadata_referral.rb +15 -5
- data/lib/zernio-sdk/models/webhook_payload_message_metadata_unsupported.rb +169 -0
- data/lib/zernio-sdk/models/webhook_payload_message_sent.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_post.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_post_platform.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_reaction.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_reaction_reaction_sender.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_referral.rb +347 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_referral.rb +198 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_referral_ads_context_data.rb +193 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_sender.rb +176 -0
- data/lib/zernio-sdk/models/webhook_payload_review_new.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_review_updated.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_test.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_category_updated.rb +295 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_category_updated_template.rb +353 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_status_updated.rb +1 -1
- data/lib/zernio-sdk/models/workflow_node.rb +42 -4
- data/lib/zernio-sdk/models/x_article.rb +255 -0
- data/lib/zernio-sdk/models/x_article_block.rb +273 -0
- data/lib/zernio-sdk/models/x_article_block_data.rb +182 -0
- data/lib/zernio-sdk/models/x_article_content_state.rb +204 -0
- data/lib/zernio-sdk/models/x_article_cover.rb +204 -0
- data/lib/zernio-sdk/models/x_article_entity.rb +109 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1_value_data.rb +164 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2_value_data.rb +214 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3_value_data.rb +173 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4_value_data.rb +164 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of5.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of5_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of_value_data.rb +173 -0
- data/lib/zernio-sdk/models/x_article_entity_range.rb +245 -0
- data/lib/zernio-sdk/models/x_article_inline_style_range.rb +259 -0
- data/lib/zernio-sdk/models/x_article_text_range.rb +237 -0
- data/lib/zernio-sdk/models/you_tube_video_retention_response.rb +1 -1
- data/lib/zernio-sdk/models/you_tube_video_retention_response_retention_curve_inner.rb +2 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +65 -0
- data/openapi.yaml +1956 -165
- data/spec/api/accounts_api_spec.rb +26 -1
- data/spec/api/ad_campaigns_api_spec.rb +9 -4
- data/spec/api/ad_insights_api_spec.rb +34 -0
- data/spec/api/ad_targeting_api_spec.rb +2 -2
- data/spec/api/blogs_api_spec.rb +174 -0
- data/spec/api/comments_api_spec.rb +5 -5
- data/spec/api/connect_api_spec.rb +27 -0
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/api/posts_api_spec.rb +1 -1
- data/spec/api/sms_api_spec.rb +1 -1
- data/spec/api/whats_app_api_spec.rb +13 -0
- data/spec/models/account_with_follower_stats_spec.rb +1 -1
- data/spec/models/ad_creative_spec.rb +6 -0
- data/spec/models/analytics_list_response_posts_inner_media_items_inner_spec.rb +58 -0
- data/spec/models/analytics_single_post_response_media_items_inner_spec.rb +20 -0
- data/spec/models/billing_snapshot_plan_spec.rb +6 -0
- data/spec/models/billing_snapshot_spec.rb +7 -1
- data/spec/models/blog_article_image_spec.rb +42 -0
- data/spec/models/blog_article_spec.rb +118 -0
- data/spec/models/blog_spec.rb +58 -0
- data/spec/models/bluesky_platform_data_spec.rb +6 -0
- data/spec/models/connect_shopify_with_token200_response_account_spec.rb +64 -0
- data/spec/models/connect_shopify_with_token200_response_spec.rb +36 -0
- data/spec/models/connect_shopify_with_token_request_spec.rb +48 -0
- data/spec/models/create_blog201_response_spec.rb +46 -0
- data/spec/models/create_blog_article201_response_spec.rb +46 -0
- data/spec/models/create_blog_article_request_image_spec.rb +42 -0
- data/spec/models/create_blog_article_request_seo_spec.rb +42 -0
- data/spec/models/create_blog_article_request_spec.rb +90 -0
- data/spec/models/create_blog_request_spec.rb +42 -0
- data/spec/models/create_inbox_conversation_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_spec.rb +16 -0
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/external_post_media_item_spec.rb +20 -0
- data/spec/models/external_post_summary_spec.rb +0 -6
- data/spec/models/get_account_health200_response_platform_connection_meta_error_spec.rb +48 -0
- data/spec/models/get_account_health200_response_platform_connection_spec.rb +58 -0
- data/spec/models/get_account_health200_response_spec.rb +6 -0
- data/spec/models/get_ad_analytics202_response_spec.rb +0 -4
- data/spec/models/get_ad_tree202_response_spec.rb +0 -4
- data/spec/models/get_ads_timeline202_response_spec.rb +0 -4
- data/spec/models/get_bluesky_settings200_response_spec.rb +36 -0
- data/spec/models/get_campaign_analytics202_response_spec.rb +0 -4
- data/spec/models/get_inbox_post_comments200_response_comments_inner_spec.rb +6 -0
- data/spec/models/get_phone_number_kyc_form200_response_spec.rb +6 -0
- data/spec/models/get_whats_app_number_kyc_form200_response_spec.rb +6 -0
- data/spec/models/inbox_webhook_message_spec.rb +1 -1
- data/spec/models/linked_in_platform_data_poll_spec.rb +52 -0
- data/spec/models/linked_in_platform_data_spec.rb +6 -0
- data/spec/models/list_ads202_response_spec.rb +0 -4
- data/spec/models/list_blog_articles200_response_spec.rb +52 -0
- data/spec/models/list_blogs200_response_spec.rb +52 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_message_spec.rb +42 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_phone_call_spec.rb +42 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_spec.rb +66 -0
- data/spec/models/list_local_services_lead_conversations200_response_spec.rb +48 -0
- data/spec/models/list_local_services_leads200_response_data_inner_contact_spec.rb +48 -0
- data/spec/models/list_local_services_leads200_response_data_inner_spec.rb +96 -0
- data/spec/models/list_local_services_leads200_response_spec.rb +48 -0
- data/spec/models/list_phone_numbers200_response_connected_inner_spec.rb +6 -0
- data/spec/models/list_phone_numbers200_response_numbers_inner_spec.rb +6 -0
- data/spec/models/list_whats_app_account_events200_response_events_inner_spec.rb +70 -0
- data/spec/models/list_whats_app_account_events200_response_spec.rb +36 -0
- data/spec/models/platform_target_spec.rb +1 -1
- data/spec/models/send_inbox_message_request_spec.rb +6 -0
- data/spec/models/social_account_spec.rb +1 -1
- data/spec/models/submit_phone_number_kyc_request_address_spec.rb +6 -0
- data/spec/models/twitter_platform_data_spec.rb +6 -0
- data/spec/models/update_ad_campaign_status200_response_spec.rb +8 -4
- data/spec/models/update_ad_set200_response_spec.rb +12 -0
- data/spec/models/update_ad_set_status200_response_spec.rb +22 -0
- data/spec/models/update_blog_article_request_spec.rb +90 -0
- data/spec/models/update_blog_request_spec.rb +42 -0
- data/spec/models/update_bluesky_settings_request_spec.rb +36 -0
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/validate_phone_number_kyc_address_request_spec.rb +6 -0
- data/spec/models/webhook_payload_call_ended_call_spec.rb +12 -0
- data/spec/models/webhook_payload_comment_comment_author_spec.rb +6 -0
- data/spec/models/webhook_payload_message_message_spec.rb +1 -1
- data/spec/models/webhook_payload_message_metadata_referral_spec.rb +6 -0
- data/spec/models/webhook_payload_message_metadata_spec.rb +12 -0
- data/spec/models/webhook_payload_message_metadata_unsupported_spec.rb +48 -0
- data/spec/models/webhook_payload_referral_referral_ads_context_data_spec.rb +66 -0
- data/spec/models/webhook_payload_referral_referral_spec.rb +66 -0
- data/spec/models/webhook_payload_referral_sender_spec.rb +42 -0
- data/spec/models/webhook_payload_referral_spec.rb +76 -0
- data/spec/models/webhook_payload_whats_app_template_category_updated_spec.rb +64 -0
- data/spec/models/webhook_payload_whats_app_template_category_updated_template_spec.rb +94 -0
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/models/workflow_node_spec.rb +6 -0
- data/spec/models/x_article_block_data_spec.rb +54 -0
- data/spec/models/x_article_block_spec.rb +70 -0
- data/spec/models/x_article_content_state_spec.rb +42 -0
- data/spec/models/x_article_cover_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of1_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of1_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of1_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of2_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of2_value_data_spec.rb +48 -0
- data/spec/models/x_article_entity_one_of2_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of3_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of3_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of3_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of4_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of4_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of4_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of5_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of5_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of_value_spec.rb +56 -0
- data/spec/models/x_article_entity_range_spec.rb +48 -0
- data/spec/models/x_article_entity_spec.rb +32 -0
- data/spec/models/x_article_inline_style_range_spec.rb +52 -0
- data/spec/models/x_article_spec.rb +58 -0
- data/spec/models/x_article_text_range_spec.rb +48 -0
- data/zernio-sdk-0.0.718.gem +0 -0
- metadata +1867 -1607
- data/zernio-sdk-0.0.716.gem +0 -0
|
@@ -0,0 +1,845 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Zernio
|
|
16
|
+
class BlogsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a blog
|
|
23
|
+
# Creates a blog on the connected store. The platform generates the URL `handle` from the title when omitted. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
24
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
25
|
+
# @param create_blog_request [CreateBlogRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [CreateBlog201Response]
|
|
28
|
+
def create_blog(account_id, create_blog_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = create_blog_with_http_info(account_id, create_blog_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create a blog
|
|
34
|
+
# Creates a blog on the connected store. The platform generates the URL `handle` from the title when omitted. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
35
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
36
|
+
# @param create_blog_request [CreateBlogRequest]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(CreateBlog201Response, Integer, Hash)>] CreateBlog201Response data, response status code and response headers
|
|
39
|
+
def create_blog_with_http_info(account_id, create_blog_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.create_blog ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'account_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.create_blog"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'create_blog_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && create_blog_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'create_blog_request' when calling BlogsApi.create_blog"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/v1/accounts/{accountId}/blogs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
if !content_type.nil?
|
|
64
|
+
header_params['Content-Type'] = content_type
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_blog_request)
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'CreateBlog201Response'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"BlogsApi.create_blog",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: BlogsApi#create_blog\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Create a blog article
|
|
97
|
+
# Creates an article on the blog. Publishing behavior: - `isPublished: false` keeps the article as a draft. - A future `publishDate` schedules publication natively on the platform; the platform publishes it at that time with no Zernio queue involved. - `seo.title` / `seo.description` map to Shopify's global `title_tag` and `description_tag` metafields (the fields Shopify themes read for the page title and meta description). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
98
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
99
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
100
|
+
# @param create_blog_article_request [CreateBlogArticleRequest]
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [CreateBlogArticle201Response]
|
|
103
|
+
def create_blog_article(account_id, blog_id, create_blog_article_request, opts = {})
|
|
104
|
+
data, _status_code, _headers = create_blog_article_with_http_info(account_id, blog_id, create_blog_article_request, opts)
|
|
105
|
+
data
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Create a blog article
|
|
109
|
+
# Creates an article on the blog. Publishing behavior: - `isPublished: false` keeps the article as a draft. - A future `publishDate` schedules publication natively on the platform; the platform publishes it at that time with no Zernio queue involved. - `seo.title` / `seo.description` map to Shopify's global `title_tag` and `description_tag` metafields (the fields Shopify themes read for the page title and meta description). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
110
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
111
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
112
|
+
# @param create_blog_article_request [CreateBlogArticleRequest]
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [Array<(CreateBlogArticle201Response, Integer, Hash)>] CreateBlogArticle201Response data, response status code and response headers
|
|
115
|
+
def create_blog_article_with_http_info(account_id, blog_id, create_blog_article_request, opts = {})
|
|
116
|
+
if @api_client.config.debugging
|
|
117
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.create_blog_article ...'
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'account_id' is set
|
|
120
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.create_blog_article"
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'blog_id' is set
|
|
124
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.create_blog_article"
|
|
126
|
+
end
|
|
127
|
+
pattern = Regexp.new(/^\d+$/)
|
|
128
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
129
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.create_blog_article, must conform to the pattern #{pattern}."
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# verify the required parameter 'create_blog_article_request' is set
|
|
133
|
+
if @api_client.config.client_side_validation && create_blog_article_request.nil?
|
|
134
|
+
fail ArgumentError, "Missing the required parameter 'create_blog_article_request' when calling BlogsApi.create_blog_article"
|
|
135
|
+
end
|
|
136
|
+
# resource path
|
|
137
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}/articles'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s))
|
|
138
|
+
|
|
139
|
+
# query parameters
|
|
140
|
+
query_params = opts[:query_params] || {}
|
|
141
|
+
|
|
142
|
+
# header parameters
|
|
143
|
+
header_params = opts[:header_params] || {}
|
|
144
|
+
# HTTP header 'Accept' (if needed)
|
|
145
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
146
|
+
# HTTP header 'Content-Type'
|
|
147
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
148
|
+
if !content_type.nil?
|
|
149
|
+
header_params['Content-Type'] = content_type
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# form parameters
|
|
153
|
+
form_params = opts[:form_params] || {}
|
|
154
|
+
|
|
155
|
+
# http body (model)
|
|
156
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_blog_article_request)
|
|
157
|
+
|
|
158
|
+
# return_type
|
|
159
|
+
return_type = opts[:debug_return_type] || 'CreateBlogArticle201Response'
|
|
160
|
+
|
|
161
|
+
# auth_names
|
|
162
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
163
|
+
|
|
164
|
+
new_options = opts.merge(
|
|
165
|
+
:operation => :"BlogsApi.create_blog_article",
|
|
166
|
+
:header_params => header_params,
|
|
167
|
+
:query_params => query_params,
|
|
168
|
+
:form_params => form_params,
|
|
169
|
+
:body => post_body,
|
|
170
|
+
:auth_names => auth_names,
|
|
171
|
+
:return_type => return_type
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug "API called: BlogsApi#create_blog_article\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
177
|
+
end
|
|
178
|
+
return data, status_code, headers
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Delete a blog
|
|
182
|
+
# Deletes the blog AND every article in it. The delete happens on the platform and is permanent; Zernio stores nothing to restore it from. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
183
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
184
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
185
|
+
# @param [Hash] opts the optional parameters
|
|
186
|
+
# @return [nil]
|
|
187
|
+
def delete_blog(account_id, blog_id, opts = {})
|
|
188
|
+
delete_blog_with_http_info(account_id, blog_id, opts)
|
|
189
|
+
nil
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Delete a blog
|
|
193
|
+
# Deletes the blog AND every article in it. The delete happens on the platform and is permanent; Zernio stores nothing to restore it from. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
194
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
195
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
198
|
+
def delete_blog_with_http_info(account_id, blog_id, opts = {})
|
|
199
|
+
if @api_client.config.debugging
|
|
200
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.delete_blog ...'
|
|
201
|
+
end
|
|
202
|
+
# verify the required parameter 'account_id' is set
|
|
203
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
204
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.delete_blog"
|
|
205
|
+
end
|
|
206
|
+
# verify the required parameter 'blog_id' is set
|
|
207
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
208
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.delete_blog"
|
|
209
|
+
end
|
|
210
|
+
pattern = Regexp.new(/^\d+$/)
|
|
211
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
212
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.delete_blog, must conform to the pattern #{pattern}."
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# resource path
|
|
216
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s))
|
|
217
|
+
|
|
218
|
+
# query parameters
|
|
219
|
+
query_params = opts[:query_params] || {}
|
|
220
|
+
|
|
221
|
+
# header parameters
|
|
222
|
+
header_params = opts[:header_params] || {}
|
|
223
|
+
# HTTP header 'Accept' (if needed)
|
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
225
|
+
|
|
226
|
+
# form parameters
|
|
227
|
+
form_params = opts[:form_params] || {}
|
|
228
|
+
|
|
229
|
+
# http body (model)
|
|
230
|
+
post_body = opts[:debug_body]
|
|
231
|
+
|
|
232
|
+
# return_type
|
|
233
|
+
return_type = opts[:debug_return_type]
|
|
234
|
+
|
|
235
|
+
# auth_names
|
|
236
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
237
|
+
|
|
238
|
+
new_options = opts.merge(
|
|
239
|
+
:operation => :"BlogsApi.delete_blog",
|
|
240
|
+
:header_params => header_params,
|
|
241
|
+
:query_params => query_params,
|
|
242
|
+
:form_params => form_params,
|
|
243
|
+
:body => post_body,
|
|
244
|
+
:auth_names => auth_names,
|
|
245
|
+
:return_type => return_type
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug "API called: BlogsApi#delete_blog\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
251
|
+
end
|
|
252
|
+
return data, status_code, headers
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Delete a blog article
|
|
256
|
+
# Deletes the article. The delete happens on the platform and is permanent; Zernio stores nothing to restore it from. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
257
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
258
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
259
|
+
# @param article_id [String] Platform-native numeric article id. Non-numeric values return 400.
|
|
260
|
+
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @return [nil]
|
|
262
|
+
def delete_blog_article(account_id, blog_id, article_id, opts = {})
|
|
263
|
+
delete_blog_article_with_http_info(account_id, blog_id, article_id, opts)
|
|
264
|
+
nil
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Delete a blog article
|
|
268
|
+
# Deletes the article. The delete happens on the platform and is permanent; Zernio stores nothing to restore it from. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
269
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
270
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
271
|
+
# @param article_id [String] Platform-native numeric article id. Non-numeric values return 400.
|
|
272
|
+
# @param [Hash] opts the optional parameters
|
|
273
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
274
|
+
def delete_blog_article_with_http_info(account_id, blog_id, article_id, opts = {})
|
|
275
|
+
if @api_client.config.debugging
|
|
276
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.delete_blog_article ...'
|
|
277
|
+
end
|
|
278
|
+
# verify the required parameter 'account_id' is set
|
|
279
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
280
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.delete_blog_article"
|
|
281
|
+
end
|
|
282
|
+
# verify the required parameter 'blog_id' is set
|
|
283
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
284
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.delete_blog_article"
|
|
285
|
+
end
|
|
286
|
+
pattern = Regexp.new(/^\d+$/)
|
|
287
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
288
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.delete_blog_article, must conform to the pattern #{pattern}."
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# verify the required parameter 'article_id' is set
|
|
292
|
+
if @api_client.config.client_side_validation && article_id.nil?
|
|
293
|
+
fail ArgumentError, "Missing the required parameter 'article_id' when calling BlogsApi.delete_blog_article"
|
|
294
|
+
end
|
|
295
|
+
pattern = Regexp.new(/^\d+$/)
|
|
296
|
+
if @api_client.config.client_side_validation && article_id !~ pattern
|
|
297
|
+
fail ArgumentError, "invalid value for 'article_id' when calling BlogsApi.delete_blog_article, must conform to the pattern #{pattern}."
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# resource path
|
|
301
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s)).sub('{' + 'articleId' + '}', CGI.escape(article_id.to_s))
|
|
302
|
+
|
|
303
|
+
# query parameters
|
|
304
|
+
query_params = opts[:query_params] || {}
|
|
305
|
+
|
|
306
|
+
# header parameters
|
|
307
|
+
header_params = opts[:header_params] || {}
|
|
308
|
+
# HTTP header 'Accept' (if needed)
|
|
309
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
310
|
+
|
|
311
|
+
# form parameters
|
|
312
|
+
form_params = opts[:form_params] || {}
|
|
313
|
+
|
|
314
|
+
# http body (model)
|
|
315
|
+
post_body = opts[:debug_body]
|
|
316
|
+
|
|
317
|
+
# return_type
|
|
318
|
+
return_type = opts[:debug_return_type]
|
|
319
|
+
|
|
320
|
+
# auth_names
|
|
321
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
322
|
+
|
|
323
|
+
new_options = opts.merge(
|
|
324
|
+
:operation => :"BlogsApi.delete_blog_article",
|
|
325
|
+
:header_params => header_params,
|
|
326
|
+
:query_params => query_params,
|
|
327
|
+
:form_params => form_params,
|
|
328
|
+
:body => post_body,
|
|
329
|
+
:auth_names => auth_names,
|
|
330
|
+
:return_type => return_type
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
334
|
+
if @api_client.config.debugging
|
|
335
|
+
@api_client.config.logger.debug "API called: BlogsApi#delete_blog_article\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
336
|
+
end
|
|
337
|
+
return data, status_code, headers
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Get a blog
|
|
341
|
+
# Fetches a single blog. `blogId` is the platform's numeric blog id from `GET /v1/accounts/{accountId}/blogs`, not a Zernio id. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
342
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
343
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
344
|
+
# @param [Hash] opts the optional parameters
|
|
345
|
+
# @return [CreateBlog201Response]
|
|
346
|
+
def get_blog(account_id, blog_id, opts = {})
|
|
347
|
+
data, _status_code, _headers = get_blog_with_http_info(account_id, blog_id, opts)
|
|
348
|
+
data
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Get a blog
|
|
352
|
+
# Fetches a single blog. `blogId` is the platform's numeric blog id from `GET /v1/accounts/{accountId}/blogs`, not a Zernio id. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
353
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
354
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
355
|
+
# @param [Hash] opts the optional parameters
|
|
356
|
+
# @return [Array<(CreateBlog201Response, Integer, Hash)>] CreateBlog201Response data, response status code and response headers
|
|
357
|
+
def get_blog_with_http_info(account_id, blog_id, opts = {})
|
|
358
|
+
if @api_client.config.debugging
|
|
359
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.get_blog ...'
|
|
360
|
+
end
|
|
361
|
+
# verify the required parameter 'account_id' is set
|
|
362
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
363
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.get_blog"
|
|
364
|
+
end
|
|
365
|
+
# verify the required parameter 'blog_id' is set
|
|
366
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
367
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.get_blog"
|
|
368
|
+
end
|
|
369
|
+
pattern = Regexp.new(/^\d+$/)
|
|
370
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
371
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.get_blog, must conform to the pattern #{pattern}."
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# resource path
|
|
375
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s))
|
|
376
|
+
|
|
377
|
+
# query parameters
|
|
378
|
+
query_params = opts[:query_params] || {}
|
|
379
|
+
|
|
380
|
+
# header parameters
|
|
381
|
+
header_params = opts[:header_params] || {}
|
|
382
|
+
# HTTP header 'Accept' (if needed)
|
|
383
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
384
|
+
|
|
385
|
+
# form parameters
|
|
386
|
+
form_params = opts[:form_params] || {}
|
|
387
|
+
|
|
388
|
+
# http body (model)
|
|
389
|
+
post_body = opts[:debug_body]
|
|
390
|
+
|
|
391
|
+
# return_type
|
|
392
|
+
return_type = opts[:debug_return_type] || 'CreateBlog201Response'
|
|
393
|
+
|
|
394
|
+
# auth_names
|
|
395
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
396
|
+
|
|
397
|
+
new_options = opts.merge(
|
|
398
|
+
:operation => :"BlogsApi.get_blog",
|
|
399
|
+
:header_params => header_params,
|
|
400
|
+
:query_params => query_params,
|
|
401
|
+
:form_params => form_params,
|
|
402
|
+
:body => post_body,
|
|
403
|
+
:auth_names => auth_names,
|
|
404
|
+
:return_type => return_type
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
408
|
+
if @api_client.config.debugging
|
|
409
|
+
@api_client.config.logger.debug "API called: BlogsApi#get_blog\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
410
|
+
end
|
|
411
|
+
return data, status_code, headers
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Get a blog article
|
|
415
|
+
# Fetches a single article. An article addressed through a blog it does not belong to is a 404 (code blog_article_not_found). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
416
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
417
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
418
|
+
# @param article_id [String] Platform-native numeric article id. Non-numeric values return 400.
|
|
419
|
+
# @param [Hash] opts the optional parameters
|
|
420
|
+
# @return [CreateBlogArticle201Response]
|
|
421
|
+
def get_blog_article(account_id, blog_id, article_id, opts = {})
|
|
422
|
+
data, _status_code, _headers = get_blog_article_with_http_info(account_id, blog_id, article_id, opts)
|
|
423
|
+
data
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Get a blog article
|
|
427
|
+
# Fetches a single article. An article addressed through a blog it does not belong to is a 404 (code blog_article_not_found). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
428
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
429
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
430
|
+
# @param article_id [String] Platform-native numeric article id. Non-numeric values return 400.
|
|
431
|
+
# @param [Hash] opts the optional parameters
|
|
432
|
+
# @return [Array<(CreateBlogArticle201Response, Integer, Hash)>] CreateBlogArticle201Response data, response status code and response headers
|
|
433
|
+
def get_blog_article_with_http_info(account_id, blog_id, article_id, opts = {})
|
|
434
|
+
if @api_client.config.debugging
|
|
435
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.get_blog_article ...'
|
|
436
|
+
end
|
|
437
|
+
# verify the required parameter 'account_id' is set
|
|
438
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
439
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.get_blog_article"
|
|
440
|
+
end
|
|
441
|
+
# verify the required parameter 'blog_id' is set
|
|
442
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
443
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.get_blog_article"
|
|
444
|
+
end
|
|
445
|
+
pattern = Regexp.new(/^\d+$/)
|
|
446
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
447
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.get_blog_article, must conform to the pattern #{pattern}."
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# verify the required parameter 'article_id' is set
|
|
451
|
+
if @api_client.config.client_side_validation && article_id.nil?
|
|
452
|
+
fail ArgumentError, "Missing the required parameter 'article_id' when calling BlogsApi.get_blog_article"
|
|
453
|
+
end
|
|
454
|
+
pattern = Regexp.new(/^\d+$/)
|
|
455
|
+
if @api_client.config.client_side_validation && article_id !~ pattern
|
|
456
|
+
fail ArgumentError, "invalid value for 'article_id' when calling BlogsApi.get_blog_article, must conform to the pattern #{pattern}."
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
# resource path
|
|
460
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s)).sub('{' + 'articleId' + '}', CGI.escape(article_id.to_s))
|
|
461
|
+
|
|
462
|
+
# query parameters
|
|
463
|
+
query_params = opts[:query_params] || {}
|
|
464
|
+
|
|
465
|
+
# header parameters
|
|
466
|
+
header_params = opts[:header_params] || {}
|
|
467
|
+
# HTTP header 'Accept' (if needed)
|
|
468
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
469
|
+
|
|
470
|
+
# form parameters
|
|
471
|
+
form_params = opts[:form_params] || {}
|
|
472
|
+
|
|
473
|
+
# http body (model)
|
|
474
|
+
post_body = opts[:debug_body]
|
|
475
|
+
|
|
476
|
+
# return_type
|
|
477
|
+
return_type = opts[:debug_return_type] || 'CreateBlogArticle201Response'
|
|
478
|
+
|
|
479
|
+
# auth_names
|
|
480
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
481
|
+
|
|
482
|
+
new_options = opts.merge(
|
|
483
|
+
:operation => :"BlogsApi.get_blog_article",
|
|
484
|
+
:header_params => header_params,
|
|
485
|
+
:query_params => query_params,
|
|
486
|
+
:form_params => form_params,
|
|
487
|
+
:body => post_body,
|
|
488
|
+
:auth_names => auth_names,
|
|
489
|
+
:return_type => return_type
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
493
|
+
if @api_client.config.debugging
|
|
494
|
+
@api_client.config.logger.debug "API called: BlogsApi#get_blog_article\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
495
|
+
end
|
|
496
|
+
return data, status_code, headers
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# List blog articles
|
|
500
|
+
# Lists the articles of a blog. Cursor-paginated: pass `limit` (1-50, default 20) and the `cursor` from a previous response's `nextCursor`; `nextCursor` is null when there are no more pages. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
501
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
502
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
503
|
+
# @param [Hash] opts the optional parameters
|
|
504
|
+
# @option opts [Integer] :limit Page size (1-50). (default to 20)
|
|
505
|
+
# @option opts [String] :cursor Opaque cursor from a previous response. Omit for the first page.
|
|
506
|
+
# @return [ListBlogArticles200Response]
|
|
507
|
+
def list_blog_articles(account_id, blog_id, opts = {})
|
|
508
|
+
data, _status_code, _headers = list_blog_articles_with_http_info(account_id, blog_id, opts)
|
|
509
|
+
data
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
# List blog articles
|
|
513
|
+
# Lists the articles of a blog. Cursor-paginated: pass `limit` (1-50, default 20) and the `cursor` from a previous response's `nextCursor`; `nextCursor` is null when there are no more pages. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
514
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
515
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
516
|
+
# @param [Hash] opts the optional parameters
|
|
517
|
+
# @option opts [Integer] :limit Page size (1-50). (default to 20)
|
|
518
|
+
# @option opts [String] :cursor Opaque cursor from a previous response. Omit for the first page.
|
|
519
|
+
# @return [Array<(ListBlogArticles200Response, Integer, Hash)>] ListBlogArticles200Response data, response status code and response headers
|
|
520
|
+
def list_blog_articles_with_http_info(account_id, blog_id, opts = {})
|
|
521
|
+
if @api_client.config.debugging
|
|
522
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.list_blog_articles ...'
|
|
523
|
+
end
|
|
524
|
+
# verify the required parameter 'account_id' is set
|
|
525
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
526
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.list_blog_articles"
|
|
527
|
+
end
|
|
528
|
+
# verify the required parameter 'blog_id' is set
|
|
529
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
530
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.list_blog_articles"
|
|
531
|
+
end
|
|
532
|
+
pattern = Regexp.new(/^\d+$/)
|
|
533
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
534
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.list_blog_articles, must conform to the pattern #{pattern}."
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
|
538
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BlogsApi.list_blog_articles, must be smaller than or equal to 50.'
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
542
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BlogsApi.list_blog_articles, must be greater than or equal to 1.'
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# resource path
|
|
546
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}/articles'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s))
|
|
547
|
+
|
|
548
|
+
# query parameters
|
|
549
|
+
query_params = opts[:query_params] || {}
|
|
550
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
551
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
552
|
+
|
|
553
|
+
# header parameters
|
|
554
|
+
header_params = opts[:header_params] || {}
|
|
555
|
+
# HTTP header 'Accept' (if needed)
|
|
556
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
557
|
+
|
|
558
|
+
# form parameters
|
|
559
|
+
form_params = opts[:form_params] || {}
|
|
560
|
+
|
|
561
|
+
# http body (model)
|
|
562
|
+
post_body = opts[:debug_body]
|
|
563
|
+
|
|
564
|
+
# return_type
|
|
565
|
+
return_type = opts[:debug_return_type] || 'ListBlogArticles200Response'
|
|
566
|
+
|
|
567
|
+
# auth_names
|
|
568
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
569
|
+
|
|
570
|
+
new_options = opts.merge(
|
|
571
|
+
:operation => :"BlogsApi.list_blog_articles",
|
|
572
|
+
:header_params => header_params,
|
|
573
|
+
:query_params => query_params,
|
|
574
|
+
:form_params => form_params,
|
|
575
|
+
:body => post_body,
|
|
576
|
+
:auth_names => auth_names,
|
|
577
|
+
:return_type => return_type
|
|
578
|
+
)
|
|
579
|
+
|
|
580
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
581
|
+
if @api_client.config.debugging
|
|
582
|
+
@api_client.config.logger.debug "API called: BlogsApi#list_blog_articles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
583
|
+
end
|
|
584
|
+
return data, status_code, headers
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
# List blogs
|
|
588
|
+
# Lists the blogs on the connected store, newest-first as the platform returns them. Cursor-paginated: pass `limit` (1-50, default 20) and the `cursor` from a previous response's `nextCursor`; `nextCursor` is null when there are no more pages. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
589
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
590
|
+
# @param [Hash] opts the optional parameters
|
|
591
|
+
# @option opts [Integer] :limit Page size (1-50). (default to 20)
|
|
592
|
+
# @option opts [String] :cursor Opaque cursor from a previous response. Omit for the first page.
|
|
593
|
+
# @return [ListBlogs200Response]
|
|
594
|
+
def list_blogs(account_id, opts = {})
|
|
595
|
+
data, _status_code, _headers = list_blogs_with_http_info(account_id, opts)
|
|
596
|
+
data
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
# List blogs
|
|
600
|
+
# Lists the blogs on the connected store, newest-first as the platform returns them. Cursor-paginated: pass `limit` (1-50, default 20) and the `cursor` from a previous response's `nextCursor`; `nextCursor` is null when there are no more pages. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
601
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
602
|
+
# @param [Hash] opts the optional parameters
|
|
603
|
+
# @option opts [Integer] :limit Page size (1-50). (default to 20)
|
|
604
|
+
# @option opts [String] :cursor Opaque cursor from a previous response. Omit for the first page.
|
|
605
|
+
# @return [Array<(ListBlogs200Response, Integer, Hash)>] ListBlogs200Response data, response status code and response headers
|
|
606
|
+
def list_blogs_with_http_info(account_id, opts = {})
|
|
607
|
+
if @api_client.config.debugging
|
|
608
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.list_blogs ...'
|
|
609
|
+
end
|
|
610
|
+
# verify the required parameter 'account_id' is set
|
|
611
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
612
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.list_blogs"
|
|
613
|
+
end
|
|
614
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
|
615
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BlogsApi.list_blogs, must be smaller than or equal to 50.'
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
619
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BlogsApi.list_blogs, must be greater than or equal to 1.'
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
# resource path
|
|
623
|
+
local_var_path = '/v1/accounts/{accountId}/blogs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
624
|
+
|
|
625
|
+
# query parameters
|
|
626
|
+
query_params = opts[:query_params] || {}
|
|
627
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
628
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
629
|
+
|
|
630
|
+
# header parameters
|
|
631
|
+
header_params = opts[:header_params] || {}
|
|
632
|
+
# HTTP header 'Accept' (if needed)
|
|
633
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
634
|
+
|
|
635
|
+
# form parameters
|
|
636
|
+
form_params = opts[:form_params] || {}
|
|
637
|
+
|
|
638
|
+
# http body (model)
|
|
639
|
+
post_body = opts[:debug_body]
|
|
640
|
+
|
|
641
|
+
# return_type
|
|
642
|
+
return_type = opts[:debug_return_type] || 'ListBlogs200Response'
|
|
643
|
+
|
|
644
|
+
# auth_names
|
|
645
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
646
|
+
|
|
647
|
+
new_options = opts.merge(
|
|
648
|
+
:operation => :"BlogsApi.list_blogs",
|
|
649
|
+
:header_params => header_params,
|
|
650
|
+
:query_params => query_params,
|
|
651
|
+
:form_params => form_params,
|
|
652
|
+
:body => post_body,
|
|
653
|
+
:auth_names => auth_names,
|
|
654
|
+
:return_type => return_type
|
|
655
|
+
)
|
|
656
|
+
|
|
657
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
658
|
+
if @api_client.config.debugging
|
|
659
|
+
@api_client.config.logger.debug "API called: BlogsApi#list_blogs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
660
|
+
end
|
|
661
|
+
return data, status_code, headers
|
|
662
|
+
end
|
|
663
|
+
|
|
664
|
+
# Update a blog
|
|
665
|
+
# Partial-updates a blog. Send any subset of `title` and `handle`; at least one field is required (an empty body returns 400). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
666
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
667
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
668
|
+
# @param update_blog_request [UpdateBlogRequest]
|
|
669
|
+
# @param [Hash] opts the optional parameters
|
|
670
|
+
# @return [CreateBlog201Response]
|
|
671
|
+
def update_blog(account_id, blog_id, update_blog_request, opts = {})
|
|
672
|
+
data, _status_code, _headers = update_blog_with_http_info(account_id, blog_id, update_blog_request, opts)
|
|
673
|
+
data
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
# Update a blog
|
|
677
|
+
# Partial-updates a blog. Send any subset of `title` and `handle`; at least one field is required (an empty body returns 400). Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
678
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
679
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
680
|
+
# @param update_blog_request [UpdateBlogRequest]
|
|
681
|
+
# @param [Hash] opts the optional parameters
|
|
682
|
+
# @return [Array<(CreateBlog201Response, Integer, Hash)>] CreateBlog201Response data, response status code and response headers
|
|
683
|
+
def update_blog_with_http_info(account_id, blog_id, update_blog_request, opts = {})
|
|
684
|
+
if @api_client.config.debugging
|
|
685
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.update_blog ...'
|
|
686
|
+
end
|
|
687
|
+
# verify the required parameter 'account_id' is set
|
|
688
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
689
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.update_blog"
|
|
690
|
+
end
|
|
691
|
+
# verify the required parameter 'blog_id' is set
|
|
692
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
693
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.update_blog"
|
|
694
|
+
end
|
|
695
|
+
pattern = Regexp.new(/^\d+$/)
|
|
696
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
697
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.update_blog, must conform to the pattern #{pattern}."
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
# verify the required parameter 'update_blog_request' is set
|
|
701
|
+
if @api_client.config.client_side_validation && update_blog_request.nil?
|
|
702
|
+
fail ArgumentError, "Missing the required parameter 'update_blog_request' when calling BlogsApi.update_blog"
|
|
703
|
+
end
|
|
704
|
+
# resource path
|
|
705
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s))
|
|
706
|
+
|
|
707
|
+
# query parameters
|
|
708
|
+
query_params = opts[:query_params] || {}
|
|
709
|
+
|
|
710
|
+
# header parameters
|
|
711
|
+
header_params = opts[:header_params] || {}
|
|
712
|
+
# HTTP header 'Accept' (if needed)
|
|
713
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
714
|
+
# HTTP header 'Content-Type'
|
|
715
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
716
|
+
if !content_type.nil?
|
|
717
|
+
header_params['Content-Type'] = content_type
|
|
718
|
+
end
|
|
719
|
+
|
|
720
|
+
# form parameters
|
|
721
|
+
form_params = opts[:form_params] || {}
|
|
722
|
+
|
|
723
|
+
# http body (model)
|
|
724
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_blog_request)
|
|
725
|
+
|
|
726
|
+
# return_type
|
|
727
|
+
return_type = opts[:debug_return_type] || 'CreateBlog201Response'
|
|
728
|
+
|
|
729
|
+
# auth_names
|
|
730
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
731
|
+
|
|
732
|
+
new_options = opts.merge(
|
|
733
|
+
:operation => :"BlogsApi.update_blog",
|
|
734
|
+
:header_params => header_params,
|
|
735
|
+
:query_params => query_params,
|
|
736
|
+
:form_params => form_params,
|
|
737
|
+
:body => post_body,
|
|
738
|
+
:auth_names => auth_names,
|
|
739
|
+
:return_type => return_type
|
|
740
|
+
)
|
|
741
|
+
|
|
742
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
743
|
+
if @api_client.config.debugging
|
|
744
|
+
@api_client.config.logger.debug "API called: BlogsApi#update_blog\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
745
|
+
end
|
|
746
|
+
return data, status_code, headers
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
# Update a blog article
|
|
750
|
+
# Partial-updates an article. Send any subset of the create fields (`title`, `bodyHtml`, `handle`, `tags`, `author`, `excerpt`, `image`, `seo`, `isPublished`, `publishDate`); at least one field is required (an empty body returns 400). `isPublished` and `publishDate` behave as on create: `isPublished: false` unpublishes back to a draft and a future `publishDate` schedules publication natively on the platform. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
751
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
752
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
753
|
+
# @param article_id [String] Platform-native numeric article id. Non-numeric values return 400.
|
|
754
|
+
# @param update_blog_article_request [UpdateBlogArticleRequest]
|
|
755
|
+
# @param [Hash] opts the optional parameters
|
|
756
|
+
# @return [CreateBlogArticle201Response]
|
|
757
|
+
def update_blog_article(account_id, blog_id, article_id, update_blog_article_request, opts = {})
|
|
758
|
+
data, _status_code, _headers = update_blog_article_with_http_info(account_id, blog_id, article_id, update_blog_article_request, opts)
|
|
759
|
+
data
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
# Update a blog article
|
|
763
|
+
# Partial-updates an article. Send any subset of the create fields (`title`, `bodyHtml`, `handle`, `tags`, `author`, `excerpt`, `image`, `seo`, `isPublished`, `publishDate`); at least one field is required (an empty body returns 400). `isPublished` and `publishDate` behave as on create: `isPublished: false` unpublishes back to a draft and a future `publishDate` schedules publication natively on the platform. Supported on Shopify (platform `shopify`). Accounts on platforms without blogs support return 400; a blogs-capable platform that lacks this specific operation returns 405.
|
|
764
|
+
# @param account_id [String] Connected Shopify SocialAccount id.
|
|
765
|
+
# @param blog_id [String] Platform-native numeric blog id. Non-numeric values return 400.
|
|
766
|
+
# @param article_id [String] Platform-native numeric article id. Non-numeric values return 400.
|
|
767
|
+
# @param update_blog_article_request [UpdateBlogArticleRequest]
|
|
768
|
+
# @param [Hash] opts the optional parameters
|
|
769
|
+
# @return [Array<(CreateBlogArticle201Response, Integer, Hash)>] CreateBlogArticle201Response data, response status code and response headers
|
|
770
|
+
def update_blog_article_with_http_info(account_id, blog_id, article_id, update_blog_article_request, opts = {})
|
|
771
|
+
if @api_client.config.debugging
|
|
772
|
+
@api_client.config.logger.debug 'Calling API: BlogsApi.update_blog_article ...'
|
|
773
|
+
end
|
|
774
|
+
# verify the required parameter 'account_id' is set
|
|
775
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
776
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BlogsApi.update_blog_article"
|
|
777
|
+
end
|
|
778
|
+
# verify the required parameter 'blog_id' is set
|
|
779
|
+
if @api_client.config.client_side_validation && blog_id.nil?
|
|
780
|
+
fail ArgumentError, "Missing the required parameter 'blog_id' when calling BlogsApi.update_blog_article"
|
|
781
|
+
end
|
|
782
|
+
pattern = Regexp.new(/^\d+$/)
|
|
783
|
+
if @api_client.config.client_side_validation && blog_id !~ pattern
|
|
784
|
+
fail ArgumentError, "invalid value for 'blog_id' when calling BlogsApi.update_blog_article, must conform to the pattern #{pattern}."
|
|
785
|
+
end
|
|
786
|
+
|
|
787
|
+
# verify the required parameter 'article_id' is set
|
|
788
|
+
if @api_client.config.client_side_validation && article_id.nil?
|
|
789
|
+
fail ArgumentError, "Missing the required parameter 'article_id' when calling BlogsApi.update_blog_article"
|
|
790
|
+
end
|
|
791
|
+
pattern = Regexp.new(/^\d+$/)
|
|
792
|
+
if @api_client.config.client_side_validation && article_id !~ pattern
|
|
793
|
+
fail ArgumentError, "invalid value for 'article_id' when calling BlogsApi.update_blog_article, must conform to the pattern #{pattern}."
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
# verify the required parameter 'update_blog_article_request' is set
|
|
797
|
+
if @api_client.config.client_side_validation && update_blog_article_request.nil?
|
|
798
|
+
fail ArgumentError, "Missing the required parameter 'update_blog_article_request' when calling BlogsApi.update_blog_article"
|
|
799
|
+
end
|
|
800
|
+
# resource path
|
|
801
|
+
local_var_path = '/v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'blogId' + '}', CGI.escape(blog_id.to_s)).sub('{' + 'articleId' + '}', CGI.escape(article_id.to_s))
|
|
802
|
+
|
|
803
|
+
# query parameters
|
|
804
|
+
query_params = opts[:query_params] || {}
|
|
805
|
+
|
|
806
|
+
# header parameters
|
|
807
|
+
header_params = opts[:header_params] || {}
|
|
808
|
+
# HTTP header 'Accept' (if needed)
|
|
809
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
810
|
+
# HTTP header 'Content-Type'
|
|
811
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
812
|
+
if !content_type.nil?
|
|
813
|
+
header_params['Content-Type'] = content_type
|
|
814
|
+
end
|
|
815
|
+
|
|
816
|
+
# form parameters
|
|
817
|
+
form_params = opts[:form_params] || {}
|
|
818
|
+
|
|
819
|
+
# http body (model)
|
|
820
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_blog_article_request)
|
|
821
|
+
|
|
822
|
+
# return_type
|
|
823
|
+
return_type = opts[:debug_return_type] || 'CreateBlogArticle201Response'
|
|
824
|
+
|
|
825
|
+
# auth_names
|
|
826
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
827
|
+
|
|
828
|
+
new_options = opts.merge(
|
|
829
|
+
:operation => :"BlogsApi.update_blog_article",
|
|
830
|
+
:header_params => header_params,
|
|
831
|
+
:query_params => query_params,
|
|
832
|
+
:form_params => form_params,
|
|
833
|
+
:body => post_body,
|
|
834
|
+
:auth_names => auth_names,
|
|
835
|
+
:return_type => return_type
|
|
836
|
+
)
|
|
837
|
+
|
|
838
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
839
|
+
if @api_client.config.debugging
|
|
840
|
+
@api_client.config.logger.debug "API called: BlogsApi#update_blog_article\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
841
|
+
end
|
|
842
|
+
return data, status_code, headers
|
|
843
|
+
end
|
|
844
|
+
end
|
|
845
|
+
end
|