Class: WhopSDK::Models::Course::Chapter

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

Defined Under Namespace

Classes: Lesson

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: , certificate_after_completion_enabled: , chapters: , created_at: , description: , language: , require_completing_lessons_in_order: , tagline: , thumbnail: , title: , updated_at: ) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::Course for more details.

A course from the courses app

Parameters:

  • id (String) (defaults to: )

    The ID of the course. Looks like cors_XXX

  • certificate_after_completion_enabled (Boolean, nil) (defaults to: )

    Whether the course will award its students a PDF certificate after completing al

  • chapters (Array<WhopSDK::Models::Course::Chapter>) (defaults to: )

    The chapters in this course

  • created_at (Time) (defaults to: )

    The timestamp of when the course was created

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

    A short description of the course

  • language (Symbol, WhopSDK::Models::Languages) (defaults to: )

    The language spoken in the video content of the course, used to generate closed

  • require_completing_lessons_in_order (Boolean) (defaults to: )

    Whether the course requires students to complete the previous lesson before movi

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

    A short tagline for the course. It is displayed under the course title in the UI

  • thumbnail (WhopSDK::Models::Course::Thumbnail, nil) (defaults to: )

    The thumbnail for the course

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

    The title of the course

  • updated_at (Time) (defaults to: )

    The timestamp of when the course was last updated



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/whop_sdk/models/course.rb', line 104

class Chapter < WhopSDK::Internal::Type::BaseModel
  # @!attribute id
  #   The ID of the chapter. Looks like chap_XXX
  #
  #   @return [String]
  required :id, String

  # @!attribute lessons
  #   The lessons in this chapter
  #
  #   @return [Array<WhopSDK::Models::Course::Chapter::Lesson>]
  required :lessons, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Course::Chapter::Lesson] }

  # @!attribute order
  #   The order of the chapter within its course
  #
  #   @return [Integer]
  required :order, Integer

  # @!attribute title
  #   The title of the chapter
  #
  #   @return [String]
  required :title, String

  # @!method initialize(id:, lessons:, order:, title:)
  #   A chapter from the courses app
  #
  #   @param id [String] The ID of the chapter. Looks like chap_XXX
  #
  #   @param lessons [Array<WhopSDK::Models::Course::Chapter::Lesson>] The lessons in this chapter
  #
  #   @param order [Integer] The order of the chapter within its course
  #
  #   @param title [String] The title of the chapter

  class Lesson < WhopSDK::Internal::Type::BaseModel
    # @!attribute id
    #   The ID of the lesson
    #
    #   @return [String]
    required :id, String

    # @!attribute lesson_type
    #   The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
    #
    #   @return [Symbol, WhopSDK::Models::LessonTypes]
    required :lesson_type, enum: -> { WhopSDK::LessonTypes }

    # @!attribute order
    #   The order of the lesson within its chapter
    #
    #   @return [Integer]
    required :order, Integer

    # @!attribute title
    #   The title of the lesson
    #
    #   @return [String]
    required :title, String

    # @!method initialize(id:, lesson_type:, order:, title:)
    #   A lesson from the courses app
    #
    #   @param id [String] The ID of the lesson
    #
    #   @param lesson_type [Symbol, WhopSDK::Models::LessonTypes] The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
    #
    #   @param order [Integer] The order of the lesson within its chapter
    #
    #   @param title [String] The title of the lesson
  end
end

Instance Attribute Details

#idString

The ID of the chapter. Looks like chap_XXX

Returns:

  • (String)


109
# File 'lib/whop_sdk/models/course.rb', line 109

required :id, String

#lessonsArray<WhopSDK::Models::Course::Chapter::Lesson>

The lessons in this chapter



115
# File 'lib/whop_sdk/models/course.rb', line 115

required :lessons, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Course::Chapter::Lesson] }

#orderInteger

The order of the chapter within its course

Returns:

  • (Integer)


121
# File 'lib/whop_sdk/models/course.rb', line 121

required :order, Integer

#titleString

The title of the chapter

Returns:

  • (String)


127
# File 'lib/whop_sdk/models/course.rb', line 127

required :title, String