vncore / com.venuenext.vncore.service / EnvironmentService

EnvironmentService

class EnvironmentService : HttpClient

EnvironmentService VenueNext

Created on 4/25/19. Copyright © 2019 VenueNext Inc. All rights reserved.

Exceptions

EnvironmentException

class EnvironmentException : Exception

Constructors

<init>

EnvironmentService VenueNext

EnvironmentService(context: Context)

Functions

loadEnvironment

Load environment from SDK portico service via async/await.

fun loadEnvironment(sdkKey: String, secretKey: String): <ERROR CLASS>

Load environment from SDK portico service via callbacks.

fun loadEnvironment(sdkKey: String, secretKey: String, success: (result: Environment?) -> 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>