Retrieve previous sessions
Function : history.sessions(limit: Int? = null, from: DateTime? = null, to: DateTime? = null)
Description: This function retrieves sessions based on optional parameters, such as limit, start time, and end time. When no parameters are provided, all user sessions are returned.
Parameters:
limit
(Int, optional): The maximum number of sessions to retrieve.from
(DateTime, optional): The start time to filter sessions. Only sessions after this time will be included.to
(DateTime, optional): The end time to filter sessions. Only sessions before this time will be included.
Returns:
Sequence<Session>
: A sequence of Session objects matching the provided parameters.
Example Usage:
Please note that the first session in the list is the current session!
Example of accessing sessions attributes:
Example of accessing sessions attributes:
TODO:
Removing the current session from the first position
Easier access to attributes
Easier date specification
Last updated