Class: WhopSDK::Resources::CourseStudents
- Inherits:
-
Object
- Object
- WhopSDK::Resources::CourseStudents
- Defined in:
- lib/whop_sdk/resources/course_students.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ CourseStudents
constructor
private
A new instance of CourseStudents.
-
#list(course_id: , after: nil, before: nil, first: nil, keyword: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::CourseStudentListResponse>
Lists students for a course.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::CourseStudentRetrieveResponse
Retrieves a course student by interaction ID.
Constructor Details
#initialize(client:) ⇒ CourseStudents
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 CourseStudents.
72 73 74 |
# File 'lib/whop_sdk/resources/course_students.rb', line 72 def initialize(client:) @client = client end |
Instance Method Details
#list(course_id: , after: nil, before: nil, first: nil, keyword: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::CourseStudentListResponse>
Lists students for a course
Required permissions:
-
‘courses:read`
-
‘course_analytics:read`
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/whop_sdk/resources/course_students.rb', line 57 def list(params) parsed, = WhopSDK::CourseStudentListParams.dump_request(params) @client.request( method: :get, path: "course_students", query: parsed, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::CourseStudentListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::CourseStudentRetrieveResponse
Retrieves a course student by interaction ID
Required permissions:
-
‘courses:read`
-
‘course_analytics:read`
22 23 24 25 26 27 28 29 |
# File 'lib/whop_sdk/resources/course_students.rb', line 22 def retrieve(id, params = {}) @client.request( method: :get, path: ["course_students/%1$s", id], model: WhopSDK::Models::CourseStudentRetrieveResponse, options: params[:request_options] ) end |