viewedObjects method

  1. @override
void viewedObjects({
  1. required String indexName,
  2. required String eventName,
  3. required List<String> objectIDs,
  4. DateTime? timestamp,
})
override

Send a hits view event Optional custom timestamp can be provided.

Implementation

@override
void viewedObjects({
  required String indexName,
  required String eventName,
  required List<String> objectIDs,
  DateTime? timestamp,
}) {
  final events = objectIDs
      .slices(_maxObjectIDsPerEvent)
      .map(
        (filters) => Event.viewHits(
          eventName,
          indexName,
          userToken,
          objectIDs,
          timestamp: timestamp,
        ),
      )
      .toList();
  _send(events);
}