call

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

Executes an API call.

Return

The response (JSON) from the API.

Parameters

accessToken

The API access token.

endPoint

The REST endpoint. (eg. https://api-ssl.bitly.com/v4/shorten)

params

The request parameters key/value map.

method

The submission Method.