getSessions method
Future<DataPage<SessionV1> >
getSessions(
- String? correlationId,
- FilterParams? filter,
- PagingParams? paging
override
Gets a page of sessions retrieved by a given filter.
correlationId
(optional) transaction id to trace execution through call chain.filter
(optional) a filter function to filter itemspaging
(optional) paging parameters Return Future that receives a data page Throws error.
Implementation
@override
Future<DataPage<SessionV1>> getSessions(
String? correlationId, FilterParams? filter, PagingParams? paging) async {
var result = await callCommand(
'get_sessions',
correlationId,
{'filter': filter, 'paging': paging},
);
return DataPage<SessionV1>.fromJson(json.decode(result), (item) {
var session = SessionV1();
session.fromJson(item);
return session;
});
}