PollSession
- class canvasapi.poll_session.PollSession(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- close(**kwargs)
Close a poll session to answers based on the poll id.
- create_submission(poll_submissions, **kwargs)
Create a new poll submission for this poll session.
- Calls:
POST /api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions
- Parameters:
poll_submissions (list) – List of arguments. poll_choice_id (required int): Chosen poll choice for this submission.
- Return type:
- delete(**kwargs)
Delete a single poll session, based on the session id.
- Calls:
- Returns:
True if the deletion was successful, false otherwise.
- Return type:
bool
- get_submission(poll_submission, **kwargs)
Returns the poll submission with the given id.
- Calls:
GET /api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions/:id
- Parameters:
poll_submission (int or
canvasapi.poll_submission.PollSubmission) – Takes a poll submission id (int) or object.- Return type:
- open(**kwargs)
Open a poll session to answers based on the poll id.
- update(poll_session, **kwargs)
Update an existing poll session for a poll based on poll id.
- Calls:
- Parameters:
poll_session (list) – List of arguments. course_id (required): id of the course for the session, course_section_id (optional): id of the course section for this session, has_public_results (optional): whether the results are viewable by students.
- Return type: