Snapshot Class

class rosteron.Snapshot(time: datetime.datetime, items: Sequence[Item])

A Snapshot object represents the state of a RosterOn user’s roster at a specific point in time.

Snapshot objects are returned directly by the Session.get_roster() method, are subscriptable, are iterable, and have a length corresponding to the number of contained Items:

>>> snapshot[0] == snapshot.items[0]
True
>>> [item for item in snapshot][0] == snapshot.items[0]
True
>>> len(snapshot) == len(snapshot.items)
True
Parameters:
  • time – a datetime object holding the server’s timestamp at which the roster was retrieved.
  • items – a tuple of Item objects comprising the roster.