Class: WhopSDK::Resources::CourseLessonInteractions
- Inherits:
-
Object
- Object
- WhopSDK::Resources::CourseLessonInteractions
- Defined in:
- lib/whop_sdk/resources/course_lesson_interactions.rb
Overview
Course lesson interactions
Instance Method Summary collapse
-
#initialize(client:) ⇒ CourseLessonInteractions
constructor
private
A new instance of CourseLessonInteractions.
-
#list(after: nil, before: nil, completed: nil, course_id: nil, first: nil, last: nil, lesson_id: nil, user_id: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::CourseLessonInteractionListItem>
Returns a paginated list of lesson interactions, filtered by lesson, course, user, or completion status.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::CourseLessonInteraction
Retrieves the details of an existing course lesson interaction.
Constructor Details
#initialize(client:) ⇒ CourseLessonInteractions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CourseLessonInteractions.
79 80 81 |
# File 'lib/whop_sdk/resources/course_lesson_interactions.rb', line 79 def initialize(client:) @client = client end |
Instance Method Details
#list(after: nil, before: nil, completed: nil, course_id: nil, first: nil, last: nil, lesson_id: nil, user_id: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::CourseLessonInteractionListItem>
Returns a paginated list of lesson interactions, filtered by lesson, course, user, or completion status.
Required permissions:
-
‘courses:read`
-
‘course_analytics:read`
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/whop_sdk/resources/course_lesson_interactions.rb', line 63 def list(params = {}) parsed, = WhopSDK::CourseLessonInteractionListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "course_lesson_interactions", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::CourseLessonInteractionListItem, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::CourseLessonInteraction
Retrieves the details of an existing course lesson interaction.
Required permissions:
-
‘courses:read`
-
‘course_analytics:read`
23 24 25 26 27 28 29 30 |
# File 'lib/whop_sdk/resources/course_lesson_interactions.rb', line 23 def retrieve(id, params = {}) @client.request( method: :get, path: ["course_lesson_interactions/%1$s", id], model: WhopSDK::CourseLessonInteraction, options: params[:request_options] ) end |