Skip to content

Favorite Events

Info

This document is a work in progress.

Currently, Favorite events contain below events, still working in progress:

  • Favorite Events
    • Remove All Favorites Event - When user clicks the button to clear all favorite result list, HMI/application should send "REMOVE_ALL_FAVORITES" event.
    • Favorite Event - When user adds/removes one favorite result, HMI/application should send "FAVORITE" event

Favorite Events

Favorite Event

When user adds/removes a favorite result, HMI/application should send a "FAVORITE" event.

Key methods

Method Details
setEntityId(String entity_id) The EntityId address/POI, mandatory data field.
setActionType(ActionType action) ActionType as ADD/DELETE when user add/remove this item, mandatory data field.
enum index ActionType
0 ADD
1 DELETE


Sample code

1
2
3
4
5
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder
  .setEvent(FavoriteEvent.builder().setEntityId("EntityId")
  .setActionType(FavoriteEvent.ActionType.SET)
  .build()).build().execute();
1
2
3
4
5
var builder = dataCollectorClient.sendEventRequest()
var response = builder
  .setEvent(FavoriteEvent.builder().setEntityId("EntityId")
  .setActionType(FavoriteEvent.ActionType.SET)
  .build()).build().execute()

Response example

1
2
3
4
5
{
  "code": "SUCCESS",
  "message": "SendEventResponse Success",
  "response_time": 1
}

Remove All Favorites Event

When user clicks the button to clear all favorite result list, HMI/application should send a "REMOVE_ALL_FAVORITES" event.

Key methods: No need, no mandatory data field need to be filled in.

Sample code

1
2
3
4
SendEventRequest.Builder builder = dataCollectorClient.sendEventRequest();
SendEventResponse response = builder
  .setEvent(RemoveAllFavoritesEvent.builder()
  .build()).build().execute();
1
2
3
var builder = dataCollectorClient.sendEventRequest();
var response = builder.setEvent(RemoveAllFavoritesEvent.builder()
  .build()).build().execute()

Response example

1
2
3
4
5
{
  "code": "SUCCESS",
  "message": "SendEventResponse Success",
  "response_time": 1
}