sdk-common / com.tomtom.online.sdk.common.service / NativeService

NativeService

abstract class NativeService<ResponseType : ServiceResponse!, QueryType : NativeObject!> : Service<ResponseType, QueryType>

Base class for native REST services.

Constructors

<init>

NativeService(server: String!, apiVersion: String!, apiKey: String!, sdkVersion: String!, applicationClientId: String!, applicationClientVersion: String!)

Creates an an instance of NativeService using provided parameters.

Properties

apiKey

val apiKey: String!

apiVersion

val apiVersion: String!

applicationClientId

val applicationClientId: String!

applicationClientVersion

val applicationClientVersion: String!

sdkVersion

val sdkVersion: String!

server

val server: String!

Functions

cancel

open fun cancel(): Unitabstract fun cancel(handle: Long): Unit

Cancels a REST request in progress.

construct

abstract fun construct(server: String!, apiVersion: String!, apiKey: String!): Long

Creates an instance of the native REST service handler.

destruct

abstract fun destruct(handle: Long): Unit

Destroys the native object.

initializeAnalytics

abstract fun initializeAnalytics(nativeHandle: Long, sdkVersion: String!, applicationClientId: String!, applicationClientVersion: String!): Unit

Initializes STE analytics.

query

open fun query(query: QueryType): Single<ResponseType>!

requestSync

abstract fun <ResponseType : Any!> requestSync(handle: Long, queryHandle: Long): ResponseType

Makes a REST service request.

tryQuery

open fun tryQuery(query: QueryType): Try<ResponseType>!