Poll
- class canvasapi.poll.Poll(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- create_choice(poll_choice, **kwargs)
Create a new choice for the current poll.
- Calls:
- Parameters:
poll_choice (list) – ‘text’ is required, ‘is_correct’ and ‘position’ are optional.
- Return type:
- create_session(poll_session, **kwargs)
Create a new poll session for this poll
- 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:
- delete(**kwargs)
Delete a single poll, based on the poll id.
- Calls:
- Returns:
True if the deletion was successful, false otherwise.
- Return type:
bool
- get_choice(poll_choice, **kwargs)
Returns the poll choice with the given id.
- Calls:
- Return type:
- get_choices(**kwargs)
Returns a paginated list of PollChoices of a poll, based on poll id.
- get_session(poll_session, **kwargs)
Returns the poll session with the given id.
- Calls:
- Parameters:
poll_session – List of arguments. Takes a poll session id (int) or poll session object.
- Return type:
- get_sessions(**kwargs)
Returns the paginated list of PollSessions in a poll.
- Calls:
- Return type:
canvasapi.paginated_lsit.Paginated Listofcanvasapi.poll_session.PollSession
- update(poll, **kwargs)
Update an existing poll belonging to the current user.
- Calls:
- Parameters:
poll (list) – List of arguments. ‘Question’ is required and ‘Description’ is optional
- Return type: