The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 27

How should I do pagination with load history of real-time API?

I cannot understand this part of the real-time API document which is titled as Load History. I need to do pagination to implement and infinite list of messages in a group. I don’t understand the function of the second and fourth item in params array which are supposed to be date.

the document says this about the second param:

The NEWEST message timestamp date (or null) to only retrieve messages before this time. - this is used to do pagination

and this about the fourth param:

A date object - the date of the last time the client got data for the room

can anyone explain this to me?