Class: PostForMe::Models::PlatformPost

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/post_for_me/models/platform_post.rb,
sig/post_for_me/models/platform_post.rbs

Defined Under Namespace

Modules: Metrics

Constant Summary collapse

PostForMe =

Returns:

  • (:YoutubePostPlatformData)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(caption:, media:, platform:, platform_account_id:, platform_post_id:, platform_url:, social_account_id:, external_account_id: nil, external_post_id: nil, metrics: nil, platform_data: nil, posted_at: nil, social_post_id: nil, social_post_result_id: nil) ⇒ Object

Parameters:



# File 'lib/post_for_me/models/platform_post.rb', line 91

Instance Attribute Details

#captionString

Caption or text content of the post

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/post_for_me/models/platform_post.rb', line 10

required :caption, String

#external_account_idString?

External account ID from the platform

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


53
# File 'lib/post_for_me/models/platform_post.rb', line 53

optional :external_account_id, String, nil?: true

#external_post_idString?

External post ID from the platform

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


59
# File 'lib/post_for_me/models/platform_post.rb', line 59

optional :external_post_id, String, nil?: true

#mediaArray<Array<Object>>

Array of media items attached to the post

Parameters:

  • value (::Array[::Array[top]])

Returns:

  • (Array<Array<Object>>)


16
17
# File 'lib/post_for_me/models/platform_post.rb', line 16

required :media,
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]

#platformString

Social media platform name

Parameters:

  • value (String)

Returns:

  • (String)


23
# File 'lib/post_for_me/models/platform_post.rb', line 23

required :platform, String

#platform_account_idString

Platform-specific account ID

Parameters:

  • value (String)

Returns:

  • (String)


29
# File 'lib/post_for_me/models/platform_post.rb', line 29

required :platform_account_id, String

#platform_dataPostForMe::Models::YoutubePostPlatformData?

Platform-specific data for the post



71
# File 'lib/post_for_me/models/platform_post.rb', line 71

optional :platform_data, -> { PostForMe::YoutubePostPlatformData }

#platform_post_idString

Platform-specific post ID

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/post_for_me/models/platform_post.rb', line 35

required :platform_post_id, String

#platform_urlString

URL to the post on the platform

Parameters:

  • value (String)

Returns:

  • (String)


41
# File 'lib/post_for_me/models/platform_post.rb', line 41

required :platform_url, String

#posted_atTime?

Date the post was published

Parameters:

  • (Time)

Returns:

  • (Time, nil)


77
# File 'lib/post_for_me/models/platform_post.rb', line 77

optional :posted_at, Time

#social_account_idString

ID of the social account

Parameters:

  • value (String)

Returns:

  • (String)


47
# File 'lib/post_for_me/models/platform_post.rb', line 47

required :social_account_id, String

#social_post_idString?

ID of the social post

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


83
# File 'lib/post_for_me/models/platform_post.rb', line 83

optional :social_post_id, String, nil?: true

#social_post_result_idString?

ID of the social post result

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


89
# File 'lib/post_for_me/models/platform_post.rb', line 89

optional :social_post_result_id, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


77
# File 'sig/post_for_me/models/platform_post.rbs', line 77

def to_hash: -> {