bitly-shorten / net.thauvin.erik.bitly / Utils

Utils

open class Utils (source)

Useful functions.

Companion Object Properties

logger

The logger instance.

val logger: Logger

Companion Object Functions

call

Executes an API call.

fun call(accessToken: String, endPoint: String, params: Map<String, Any> = emptyMap(), method: Methods = Methods.POST): String

isValidUrl

Validates a URL.

fun String.isValidUrl(): Boolean

removeHttp

Removes http(s) scheme from string.

fun String.removeHttp(): String

toEndPoint

Builds the full API endpoint URL using the Constants.API_BASE_URL.

fun String.toEndPoint(): String