Class: WhopSDK::Models::ForumPostListResponse

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

Overview

See Also:

  • WhopSDK::Resources::ForumPosts#list

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_list_response.rb', line 162

Instance Attribute Details

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

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



21
22
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 21

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

#comment_countInteger

The total number of direct comments on this post.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


28
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 28

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)


35
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 35

required :content, String, nil?: true

#created_atTime

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

Parameters:

  • value (Time)

Returns:

  • (Time)


41
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 41

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)


15
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 15

required :id, String

#is_editedBoolean

Whether this post has been edited after its initial creation.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


47
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 47

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)


53
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 53

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)


59
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 59

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)


65
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 65

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)


71
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 71

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)


77
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 77

required :title, String, nil?: true

#updated_atTime

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

Parameters:

  • value (Time)

Returns:

  • (Time)


83
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 83

required :updated_at, Time

#userWhopSDK::Models::ForumPostListResponse::User

The user who authored this forum post.



89
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 89

required :user, -> { WhopSDK::Models::ForumPostListResponse::User }

#view_countInteger?

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

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


95
# File 'lib/whop_sdk/models/forum_post_list_response.rb', line 95

required :view_count, Integer, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {