Shared types

HttpResult

Result wrapper around most of endpoints. Not all endpoints return this

type HttpResult<S, E> = Result<ApiResponse<S, E>, HttpError>;

ApiResponse

Result renaming used to difference between an http error and an API error or unsuccessful response

type ApiResponse<S, E> = Result<S, E>

HttpError

Internal errors, if everything goes ok you never should see this errors

enum HttpError {
    RequestFailed(reqwest::Error),
    InternalServerError(String),
    RateLimited
}

Last updated