PoiDelete Class

Once you've created POIs you'll be able to delete them via the PoiDelete class provided you know the POI ID.

Import

Kotlin
import com.naurt.sdk.poi.PoiDelete
import com.naurt.sdk.poi.PoiDelete.Builder

Constructor

The PoiDelete class cannot be directly made with it's constructor. You must build the class via it's Builder.

Kotlin

class Builder(
    apiKey: String,
    poiIDs: List<String>,
)

Up to 50 POIs can be deleted and each ID should be a formatted as a UUID. POI IDs can be obtained via the original insert request or are returned when POIs are queried. You can therefore chain query and delete commands together to delete POIs based on different filters.

Kotlin
val poiDelete = PoiDelete.Builder(
    BuildConfig.API_KEY,
    mutableListOf("bd941638-36e8-46c1-98fc-a8675a3fc004")
).build()

This class conforms to the POI API specification. For more information on how to delete POIs, please visit that page.

Once built, the request to delete the POIs can be carried out using the .send() method.


send

This method runs a web request and triggers a callback, so ensure it is correctly spawned off to avoid blocking the main thread.

Signature

Kotlin
poiDelete.send(callback: PoiCallback<JSONObject>)

Parameters

  • callback: A Naurt PoiCallback which will receive the result of the web request. If successful a JSON response will be available. If unsuccessful a status code and a JSON containing the error will be present.

Returns

None, but will trigger the callback once the request is done.

Throws

Does not throw.