Class: WhopSDK::Models::ForumPost

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

Defined Under Namespace

Classes: Attachment, User

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(id:, content_type:, filename:, url:) ⇒ Object

Some parameter documentations has been truncated, see Attachment for more details.

Represents an image attachment

Parameters:

  • id (String)

    Represents a unique identifier that is Base64 obfuscated. It is often used to re

  • content_type (String, nil)

    Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.

  • filename (String, nil)

    The original filename of the uploaded attachment, including its file extension.

  • url (String, nil)

    A pre-optimized URL for rendering this attachment on the client. This should be



# File 'lib/whop_sdk/models/forum_post.rb', line 160

Instance Attribute Details

#attachmentsArray<WhopSDK::Models::ForumPost::Attachment>

All file attachments on this post, such as images, documents, and videos.

Parameters:

  • value (::Array[WhopSDK::ForumPost::Attachment])

Returns:



20
# File 'lib/whop_sdk/models/forum_post.rb', line 20

required :attachments, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::ForumPost::Attachment] }

#comment_countInteger

The total number of direct comments on this post.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


26
# File 'lib/whop_sdk/models/forum_post.rb', line 26

required :comment_count, Integer

#contentString?

The body of the forum post in Markdown format. Null if the post is paywalled and the current user does not have access.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/whop_sdk/models/forum_post.rb', line 33

required :content, String, nil?: true

#created_atTime

The time this post was created, as a Unix timestamp.

Parameters:

  • value (Time)

Returns:

  • (Time)


39
# File 'lib/whop_sdk/models/forum_post.rb', line 39

required :created_at, Time

#idString

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/whop_sdk/models/forum_post.rb', line 14

required :id, String

#is_editedBoolean

Whether this post has been edited after its initial creation.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


45
# File 'lib/whop_sdk/models/forum_post.rb', line 45

required :is_edited, WhopSDK::Internal::Type::Boolean

#is_pinnedBoolean

Whether this post is pinned to the top of the forum feed.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


51
# File 'lib/whop_sdk/models/forum_post.rb', line 51

required :is_pinned, WhopSDK::Internal::Type::Boolean

#is_poster_adminBoolean

Whether the author of this post is an admin of the company that owns the forum.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


57
# File 'lib/whop_sdk/models/forum_post.rb', line 57

required :is_poster_admin, WhopSDK::Internal::Type::Boolean

#like_countInteger?

The total number of like reactions this post has received.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


63
# File 'lib/whop_sdk/models/forum_post.rb', line 63

required :like_count, Integer, nil?: true

#parent_idString?

The unique identifier of the parent post. Null if this is a top-level post.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


69
# File 'lib/whop_sdk/models/forum_post.rb', line 69

required :parent_id, String, nil?: true

#titleString?

The headline of the forum post. Null if the post has no title.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


75
# File 'lib/whop_sdk/models/forum_post.rb', line 75

required :title, String, nil?: true

#updated_atTime

The time this post was last updated, as a Unix timestamp.

Parameters:

  • value (Time)

Returns:

  • (Time)


81
# File 'lib/whop_sdk/models/forum_post.rb', line 81

required :updated_at, Time

#userWhopSDK::Models::ForumPost::User

The user who authored this forum post.

Parameters:

  • value (WhopSDK::ForumPost::User)

Returns:



87
# File 'lib/whop_sdk/models/forum_post.rb', line 87

required :user, -> { WhopSDK::ForumPost::User }

#view_countInteger?

The total number of times this post has been viewed by users.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


93
# File 'lib/whop_sdk/models/forum_post.rb', line 93

required :view_count, Integer, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


67
# File 'sig/whop_sdk/models/forum_post.rbs', line 67

def to_hash: -> {