Class: WhopSDK::Models::Lesson

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

Overview

Defined Under Namespace

Classes: AssessmentQuestion, Attachment, MainPdf, Thumbnail, VideoAsset

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(url: ) ⇒ Object

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

The thumbnail for the lesson

Parameters:

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

    This is the URL you use to render optimized attachments on the client. This shou



# File 'lib/whop_sdk/models/lesson.rb', line 275

Instance Attribute Details

#assessment_questionsArray<WhopSDK::Models::Lesson::AssessmentQuestion>

Assessment questions for quiz/knowledge check lessons



17
18
# File 'lib/whop_sdk/models/lesson.rb', line 17

required :assessment_questions,
-> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Lesson::AssessmentQuestion] }

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

The attached files in this lesson as a flat array



24
# File 'lib/whop_sdk/models/lesson.rb', line 24

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

#contentString?

The content of the lesson

Returns:

  • (String, nil)


30
# File 'lib/whop_sdk/models/lesson.rb', line 30

required :content, String, nil?: true

#created_atTime

The timestamp of when the lesson was created

Returns:

  • (Time)


36
# File 'lib/whop_sdk/models/lesson.rb', line 36

required :created_at, Time

#days_from_course_start_until_unlockInteger?

Number of days from course start until the lesson is unlocked

Returns:

  • (Integer, nil)


42
# File 'lib/whop_sdk/models/lesson.rb', line 42

required :days_from_course_start_until_unlock, Integer, nil?: true

#embed_idString?

ID for the embed (YouTube video ID or Loom share ID)

Returns:

  • (String, nil)


48
# File 'lib/whop_sdk/models/lesson.rb', line 48

required :embed_id, String, nil?: true

#embed_typeSymbol, ...

The type of embed for a lesson

Returns:



54
# File 'lib/whop_sdk/models/lesson.rb', line 54

required :embed_type, enum: -> { WhopSDK::EmbedType }, nil?: true

#idString

The ID of the lesson

Returns:

  • (String)


11
# File 'lib/whop_sdk/models/lesson.rb', line 11

required :id, String

#lesson_typeSymbol, WhopSDK::Models::LessonTypes

The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)

Returns:



60
# File 'lib/whop_sdk/models/lesson.rb', line 60

required :lesson_type, enum: -> { WhopSDK::LessonTypes }

#main_pdfWhopSDK::Models::Lesson::MainPdf?

The main PDF file for this lesson



66
# File 'lib/whop_sdk/models/lesson.rb', line 66

required :main_pdf, -> { WhopSDK::Lesson::MainPdf }, nil?: true

#orderInteger

The order of the lesson within its chapter

Returns:

  • (Integer)


72
# File 'lib/whop_sdk/models/lesson.rb', line 72

required :order, Integer

#thumbnailWhopSDK::Models::Lesson::Thumbnail?

The thumbnail for the lesson



78
# File 'lib/whop_sdk/models/lesson.rb', line 78

required :thumbnail, -> { WhopSDK::Lesson::Thumbnail }, nil?: true

#titleString

The title of the lesson

Returns:

  • (String)


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

required :title, String

#video_assetWhopSDK::Models::Lesson::VideoAsset?

The associated Mux asset for video lessons



90
# File 'lib/whop_sdk/models/lesson.rb', line 90

required :video_asset, -> { WhopSDK::Lesson::VideoAsset }, nil?: true

#visibilitySymbol, WhopSDK::Models::LessonVisibilities

The visibility of the lesson. Determines how / whether this lesson is visible to users.



97
# File 'lib/whop_sdk/models/lesson.rb', line 97

required :visibility, enum: -> { WhopSDK::LessonVisibilities }