Class: PostForMe::Resources::SocialPostPreviews
- Inherits:
-
Object
- Object
- PostForMe::Resources::SocialPostPreviews
- Defined in:
- lib/post_for_me/resources/social_post_previews.rb,
sig/post_for_me/resources/social_post_previews.rbs
Overview
Social Post Previews allow you to see what a Social Post will create for each account in the post.
Instance Method Summary collapse
-
#create(caption:, preview_social_accounts:, account_configurations: nil, media: nil, platform_configurations: nil, request_options: {}) ⇒ Array<PostForMe::Models::SocialPostPreview>
Some parameter documentations has been truncated, see Models::SocialPostPreviewCreateParams for more details.
-
#initialize(client:) ⇒ SocialPostPreviews
constructor
private
A new instance of SocialPostPreviews.
Constructor Details
#initialize(client:) ⇒ SocialPostPreviews
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SocialPostPreviews.
44 45 46 |
# File 'lib/post_for_me/resources/social_post_previews.rb', line 44 def initialize(client:) @client = client end |
Instance Method Details
#create(caption:, preview_social_accounts:, account_configurations: nil, media: nil, platform_configurations: nil, request_options: {}) ⇒ Array<PostForMe::Models::SocialPostPreview>
Some parameter documentations has been truncated, see Models::SocialPostPreviewCreateParams for more details.
Create Post Previews
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/post_for_me/resources/social_post_previews.rb', line 30 def create(params) parsed, = PostForMe::SocialPostPreviewCreateParams.dump_request(params) @client.request( method: :post, path: "v1/social-post-previews", body: parsed, model: PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPostPreview], options: ) end |