ApiService

interface ApiService

Functions

Link copied to clipboard
abstract suspend fun <T : Any> delete(endpoint: String, body: Any, responseCast: KClass<T>): Result<T>

Makes a DELETE request to the Fortress API with a JSON body and deserializes the response.

Link copied to clipboard
abstract suspend fun <T : Any> get(endpoint: String, responseCast: KClass<T>): Result<T>

Makes a GET request to the Fortress API and deserializes the JSON response.

Link copied to clipboard
abstract fun overrideBearerToken(token: String?)

Overrides the bearer token used in all subsequent API requests.

Link copied to clipboard
abstract suspend fun <T : Any> patch(endpoint: String, body: Any, responseCast: KClass<T>): Result<T>

Makes a PATCH request to the Fortress API with a JSON body and deserializes the response. Used for partial updates to existing resources.

Link copied to clipboard
abstract suspend fun <T : Any> post(endpoint: String, body: Any, responseCast: KClass<T>): Result<T>

Makes a POST request to the Fortress API with a JSON body and deserializes the response.