Assignments¶
- class AssignmentsApi(client, workspace=None)¶
Set of functions to access and manipulate Assignments.
- get_list(questionnaire_id=None, questionnaire_version=None)¶
Get list of assignments
- Parameters
questionnaire_id (
Optional[str]) – Filter by specific questionnaire idquestionnaire_version (
Optional[int]) – Filter by specific version number
- Returns
list of
Assignmentobjects
- get_info(id)¶
Get single assignment details
- Parameters
id (
int) – Assignment Id- Returns
Assignment object
- create(obj)¶
Create new assignment
- Parameters
obj (
Assignment) – Assignment object to be created- Returns
Newly created Assignment object
- archive(id)¶
Archive assignment
- Parameters
id (
int) – Assignment Id
- unarchive(id)¶
Unarchive assignment
- Parameters
id (
int) – Assignment Id
- assign(id, responsible)¶
Assign new responsible person for assignment
- Parameters
id (
int) – Assignment Idresponsible (
str) – Username of the new responsible
- Returns
Modified Assignment object
- get_quantity_settings(id)¶
Checi if quantity may be edited for the assignment
- Parameters
id (
int) – Assignment Id- Returns
True if quantity can be edited, False otherwise
- update_quantity(id, quantity)¶
Change maximum quantity of interviews to be created
- Parameters
id (
int) – Assignment Idquantity (
int) – new quantity of interviews to be collected
- Returns
Modified Assignment object
- close(id)¶
Close assignment by setting Size to the number of collected interviews
- Parameters
id (
int) – Assignment Id
- get_history(id)¶
- get_recordaudio(id)¶
Get status of audio recording for the assignment
- Parameters
id (
int) – Assignment Id- Returns
True if audio recording is enabled, False otherwise
- update_recordaudio(id, enabled)¶
Turn recording of audio for the assignment
- Parameters
id (
int) – Assignment Idenabled (
bool) – True to turn audio recording on, False to turn it off
- get_calendar_event(id)¶
Get calendar event associated with the assignment
- set_calendar_event(id, new_start, start_timezone, comment=None)¶
Add new calendar event to the assignment, or update the existing one
- Parameters
id (
int) – assignment id to updatenew_start (
str) – start date of the calendar eventstart_timezone (
str) – timezone string for the start datecomment (
Optional[str]) – add comment to the calendar event
- Returns
CalendarEventobject
- delete_calendar_event(id)¶
Remove calendar event associated with the assignment
Assignment objects¶
- class Assignment(**data)¶
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.