Java wrapper for connecting to the blueRover API.
- gson-2.2.4
- commons-codec-1.9
-
BlueroverApiapi.setCredentials(creds)Sets the credentials of the Bluerover API object.
Parameters:
HashMap<String,String> creds: API credentials containing the following:* `String key` : authentication key for your user * `String token` : authentication token for your user * `String baseURL` : the address where you are pointing to, normally **developers.bluerover.us**Returns:
BlueroverApiobject -
voidapi.clearCredentials()Parameters: None
Remove the key and token values from the API object.
-
Result<Event[]>api.getEvents(startTime,endTime,page)API Request to get events from a particular date range.
Parameters:
* `String startTime` : beginning of the date range * `String endTime` : end of the date range * `String page` : the particular page of results that you want (starts at page 0)startTimeandendTimeare both in UNIX timestamp formatReturns:
Result<Event[]>object containing an array of events -
Result<Device[]>api.getDevices()API Request to get a list of devices for the user
Parameters: None
Returns:
Result<Device[]>object containing an array of devices -
Result<Rfid[]>api.getRfids()API Request to get a list of rfids for the user
Parameters: None
Returns:
Result<Rfid[]>object containing an array of rfids -
Result<Event[]>api.next(pResult)API Request to get the next page of events.
Parameters:
* `Result<Event[]> pResult` : Result object of the previous page of eventsReturns:
Result<Event[]>object containing an array of events -
voidapi.getEventStream(pCallBack)API Request to start the event stream, calling pCallBack when data is received.
Define pCallBack by implementing the CallBack class.
Parameters:
* `CallBack pCallBack` : Implementation of CallBack that defines behaviour on data received
###Result
-
T list- Represents the json decoded data returned the API serverBased on the function you call, the list property will represent an array of
Event,DeviceorRfidjava objects -
JsonObject jsonObject- a GSON jSON object that encapsulates the API's response -
JsonArray jsonArray- a GSON jSON array that encapsulates the API's response -
HttpRequest request- copy of the request made to the API -
HttpResponse response- copy of the response made to the API -
HttpRequest next- a request object that can be used to get the next page of results (for Event[]) -
String rawResponse- the raw data string that came from the API's response
Note: either jsonObject or jsonArray will contain data, the other will be null. This is due to the format returned by the API.
###Event
String deviceIdlong autoIndexint statusCodelong timestamplong creationTimeint geozoneIndexString geozoneIDString transportIDint inputMaskint seqNumString dataSourceString charDeviceTypeString charDeviceResponsefloat headingString addressint rfidCustNumint rfidTagNumint rfidAlarmFlagsint rfidBatteryStatusint rfidRssiint rfidReaderIdint rfidReaderTypefloat rfidTemperaturefloat longitudefloat latitudefloat altitudefloat speedKPHfloat odometerKMfloat distanceKMfloat zone1Avrfloat zone2Avrfloat zone3Avrfloat zone4Avrfloat zone5Avrfloat zone6Avrfloat zone7Avrfloat zone8Avrfloat zone1Lowfloat zone2Lowfloat zone3Lowfloat zone4Lowfloat zone5Lowfloat zone6Lowfloat zone7Lowfloat zone8Lowfloat zone1Highfloat zone2Highfloat zone3Highfloat zone4Highfloat zone5Highfloat zone6Highfloat zone7Highfloat zone8HighString rawData
###Device
char isSpeedActiveint totalMaxConnPerMinint vehicleIDString noteschar deviceAlertActiveint supportsDMTPfloat staticLongitudefloat lastValidLongitudeint unitLimitIntervalString lastAckCommandString notifyint uniqueIDString featureSetint duplexMaxConnPerMinfloat speedThresholdString smsEmaillong simPhoneNumberint speedWindowString duplexProfileMaskString pendingPingCommandfloat staticLatitudeString imeiNumberint maxAllowedEventsString ipAddressCurrentString totalProfileMaskString deviceTypechar isActivechar isLandmarkActivelong lastOdometerKMint listenPortCurrentlong odometerOffsetKMString accountIDint timeIntervalchar isStaticchar expectAckString descriptionint codeVersionString driverIDint remotePortCurrentdouble lastUpdateTimedouble lastConnectionTimeString assetTypeCodeString pushpinIDdouble lastPingTimelong totalPingCountdouble lastDuplexConnectTimeString dcsConfigMaskString dohdouble lastAckTimeString displayNameString supportedEncodingsint ipAddressValiddouble lastGPSTimestampint totalMaxConnString serialNumberdouble creationTimeint equipmentTypeString ignitionIndexString deviceIDString deviceCodeint maxPingCountint duplexMaxConnString groupIDint lastInputStatefloat lastValidLatitude
###Rfid
Coming soon.