View on GitHub

sensibill-android-documentation

Sensibill API Request

Aruguments Description
endpoint Provide endpoint for API call. Require a non-null value.
responseCallback Provide callback for API execution. Require a non-null value.
authenticationType Provide token type for different API calls. Default type is set to RequestAuthenticationType.AUTHORIZATION_BEARER.
method Provide a HTTP method. Default method is set to GET.
params Provide a dictionary HTTP parameter. Default method is set to null.
body Provide a HTTP request body. Default method is set to null.

Example:

        // the first default argument is authenticationType, to skip it and not follow the order in method definition
        // need to pass as the format `argument = value`
        Request().init("endpoit", callback, method = "GET")