Skip to content

Send Event Request Overview

The data connector send event request provides various event models to send application & vehicle sensor events to the cloud. Telenav currently supports the below listed events for different scenarios, the corresponding data models provided facilitate building events by filling mandatory and optional data fields using the builder.

Send Event Request

This "input" API lets a producer report an event, generate and send the event data to DataConnector

Key methods

Method Details
setEvent(Event event) The specific event which comes from com.telenav.dataconnector.model with event data included

Sample code

1
2
3
4
5
6
7
8
SendEventRequest.Builder builder = client.sendEventRequest();
SendEventResponse response = builder
    .setEvent(FavoriteEvent.builder()
            .setActionType(FavoriteEvent.ActionType.ADD)
            .setEntityId("faked_id")
            .build())
    .build()
    .execute();
1
2
3
4
5
6
7
8
SendEventRequest.Builder builder = client.sendEventRequest()
SendEventResponse response = builder
    .setEvent(FavoriteEvent.builder()
            .setActionType(FavoriteEvent.ActionType.ADD)
            .setEntityId("faked_id")
            .build())
    .build()
    .execute()

Response example

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

Please see the API reference for the main classes related to Data Connector.

Event Categories

Currently, all supported events can be categorized as below, still working in progress: