The management of query filters on API requests was coded inside other functions, hard to read and difficult to read.
Solution: Rely on a MessageQueryFilter object that manages the filters.
A new MessageQuery interface allows an easier handling of pagination, including iterating transparently iterating over messages with async for message in MessageQuery(query_filter=filter).
The interface of AlephClient.get_messages has been kept unchanged for now for compatibility reasons.
The management of query filters on API requests was coded inside other functions, hard to read and difficult to read.
Solution: Rely on a
MessageQueryFilter
object that manages the filters.A new
MessageQuery
interface allows an easier handling of pagination, including iterating transparently iterating over messages withasync for message in MessageQuery(query_filter=filter)
.The interface of
AlephClient.get_messages
has been kept unchanged for now for compatibility reasons.Inspired by #54 from @MHHukiewitz