Skip to content

Latest commit

 

History

History
46 lines (40 loc) · 3.23 KB

File metadata and controls

46 lines (40 loc) · 3.23 KB

Zernio::PlatformTarget

Properties

Name Type Description Notes
platform String Supported values: twitter, threads, instagram, youtube, facebook, linkedin, pinterest, reddit, tiktok, bluesky, googlebusiness, telegram [optional]
account_id PlatformTargetAccountId [optional]
custom_content String Platform-specific text override. When set, this content is used instead of the top-level post content for this platform. Useful for tailoring captions per platform (e.g. keeping tweets under 280 characters). [optional]
custom_media Array<MediaItem> [optional]
scheduled_for Time Optional per-platform scheduled time override (uses post.scheduledFor when omitted) [optional]
platform_specific_data PlatformTargetPlatformSpecificData [optional]
status String Platform-specific status: pending, publishing, published, failed [optional]
platform_post_id String The native post ID on the platform (populated after successful publish) [optional]
platform_post_url String Public URL of the published post. Included in the response for immediate posts; for scheduled posts, fetch via GET /v1/posts/{postId} after publish time. [optional]
published_at Time Timestamp when the post was published to this platform [optional]
is_trial_reel Boolean Present and true only when this Instagram reel was launched as a Trial through Zernio (created with platformSpecificData.trialParams). Use it to segment trial reels in analytics. Note: Instagram's Graph API exposes no readable trial field, so this reflects creation-time intent only. It indicates the reel STARTED as a trial, not whether or when it graduated. [optional]
trial_graduation_strategy String Graduation strategy the trial reel was launched with. Present only when isTrialReel is true. [optional]
error_message String Human-readable error message when status is failed. Contains platform-specific error details explaining why the publish failed. [optional]
error_category String Error category for programmatic handling: auth_expired (token expired/revoked), user_content (wrong format/too long), user_abuse (rate limits/spam), account_issue (config problems), platform_rejected (policy violation), platform_error (5xx/maintenance), system_error (Zernio infra), unknown [optional]
error_source String Who caused the error: user (fix content/reconnect), platform (outage/API change), system (Zernio issue, rare) [optional]

Example

require 'zernio-sdk'

instance = Zernio::PlatformTarget.new(
  platform: twitter,
  account_id: null,
  custom_content: null,
  custom_media: null,
  scheduled_for: null,
  platform_specific_data: null,
  status: pending,
  platform_post_id: 1234567890123456789,
  platform_post_url: https://twitter.com/acmecorp/status/1234567890123456789,
  published_at: null,
  is_trial_reel: null,
  trial_graduation_strategy: null,
  error_message: null,
  error_category: null,
  error_source: null
)