coinglecko/ping

Check CoinGecko API server status.

Types

Response from the /ping endpoint.

pub type PingResponse {
  PingResponse(gecko_says: String)
}

Constructors

  • PingResponse(gecko_says: String)

Values

pub fn check(
  client: client.Client,
  send sender: fn(request.Request(String)) -> Result(
    response.Response(String),
    String,
  ),
) -> Result(PingResponse, error.CoinGeckoError)

Check if the CoinGecko API server is alive.

pub fn check_request(
  client: client.Client,
) -> Result(request.Request(String), error.CoinGeckoError)

Build a request to check the CoinGecko API server status.

pub fn decode_response(
  json_string: String,
) -> Result(PingResponse, error.CoinGeckoError)

Decode a ping response from a JSON string.

Search Document