vncore / com.venuenext.vncore.service / DeviceService

DeviceService

class DeviceService : HttpClient

DeviceService VenueNext

Created on 3/20/19. Copyright © 2019 VenueNext Inc. All rights reserved.

Exceptions

DeviceException

class DeviceException : Exception

Constructors

<init>

DeviceService VenueNext

DeviceService(context: Context)

Properties

authProvider

val authProvider: OAuth?

baseUrl

val baseUrl: String?

environment

val environment: Environment?

serviceBaseUrls

val serviceBaseUrls: ServiceBaseUrls?

Functions

registerDevice

Register device token to API service via async/await.

fun registerDevice(device: Device): <ERROR CLASS>

Register device token to API service via callbacks.

fun registerDevice(device: Device, success: (result: Device?) -> Unit, failure: (Exception) -> Unit): Unit

Extension Functions

delete

fun <T : Any> HttpClient.delete(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T>

get

fun <T : Any> HttpClient.get(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T>

patch

fun <T : Any> HttpClient.patch(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T>

post

fun <T : Any> HttpClient.post(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T>