Toloka documentation

find_message_threads

toloka.client.TolokaClient.find_message_threads

Finds all message threads that match certain rules

As a result, it returns an object that contains the first part of the found threads and whether there are any more results. It is better to use the "get_message_threads" method, they allow to iterate trought all results and not just the first output.

Parameters Description

Parameters Type Description
folder Union[str, Folder, List[Union[str, Folder]], None]

Folders to search for the thread

folder_ne Union[str, Folder, List[Union[str, Folder]], None]

Folders to not search for the thread

id_lt Optional[str]

Threads with an ID less than the specified value.

id_lte Optional[str]

Threads with an ID less than or equal to the specified value.

id_gt Optional[str]

Threads with an ID greater than the specified value.

id_gte Optional[str]

Threads with an ID greater than or equal to the specified value.

created_lt Optional[datetime]

Threads created before the specified date.

created_lte Optional[datetime]

Threads created before or on the specified date.

created_gt Optional[datetime]

Threads created after the specified date.

created_gte Optional[datetime]

Threads created after or on the specified date.

sort Union[List[str], MessageThreadSortItems, None]

How to sort result. Defaults to None.

limit Optional[int]

Limit on the number of results returned. The maximum is 300. Defaults to None, in which case it returns first 50 results.

Examples:

Find all message threads in the Inbox folder.

toloka_client.find_message_threads(folder='INBOX')