Class: WhopSDK::Models::ForumPost

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

Defined Under Namespace

Classes: 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: , comment_count: , content: , created_at: , is_edited: , is_pinned: , is_poster_admin: , like_count: , parent_id: , title: , updated_at: , user: , view_count: ) ⇒ Object

Represents a post in forum

Parameters:

  • id (String) (defaults to: )

    The unique identifier of the resource.

  • comment_count (Integer) (defaults to: )

    The amount of comments on this post

  • content (String, nil) (defaults to: )

    The content of the forum post in Markdown format

  • created_at (Time) (defaults to: )

    The timestamp when the post was created

  • is_edited (Boolean) (defaults to: )

    Whether the forum post has been edited

  • is_pinned (Boolean) (defaults to: )

    Whether this forum post is pinned

  • is_poster_admin (Boolean) (defaults to: )

    Whether the user that sent the post is an admin of the company

  • like_count (Integer, nil) (defaults to: )

    The number of likes this post has received

  • parent_id (String, nil) (defaults to: )

    The ID of the parent forum post, if applicable

  • title (String, nil) (defaults to: )

    The title of the forum post

  • updated_at (Time) (defaults to: )

    The timestamp when the post was last updated

  • user (WhopSDK::Models::ForumPost::User) (defaults to: )

    The user who created this forum post

  • view_count (Integer, nil) (defaults to: )

    The number of times this message has been viewed



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

Instance Attribute Details

#comment_countInteger

The amount of comments on this post

Returns:

  • (Integer)


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

required :comment_count, Integer

#contentString?

The content of the forum post in Markdown format

Returns:

  • (String, nil)


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

required :content, String, nil?: true

#created_atTime

The timestamp when the post was created

Returns:

  • (Time)


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

required :created_at, Time

#idString

The unique identifier of the resource.

Returns:

  • (String)


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

required :id, String

#is_editedBoolean

Whether the forum post has been edited

Returns:

  • (Boolean)


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

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

#is_pinnedBoolean

Whether this forum post is pinned

Returns:

  • (Boolean)


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

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

#is_poster_adminBoolean

Whether the user that sent the post is an admin of the company

Returns:

  • (Boolean)


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

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

#like_countInteger?

The number of likes this post has received

Returns:

  • (Integer, nil)


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

required :like_count, Integer, nil?: true

#parent_idString?

The ID of the parent forum post, if applicable

Returns:

  • (String, nil)


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

required :parent_id, String, nil?: true

#titleString?

The title of the forum post

Returns:

  • (String, nil)


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

required :title, String, nil?: true

#updated_atTime

The timestamp when the post was last updated

Returns:

  • (Time)


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

required :updated_at, Time

#userWhopSDK::Models::ForumPost::User

The user who created this forum post



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

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

#view_countInteger?

The number of times this message has been viewed

Returns:

  • (Integer, nil)


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

required :view_count, Integer, nil?: true