coinglecko/asset_platforms

Blockchain asset platform endpoints.

Types

An asset platform (blockchain).

pub type AssetPlatform {
  AssetPlatform(
    id: String,
    chain_identifier: option.Option(Int),
    name: String,
    shortname: String,
    native_coin_id: String,
  )
}

Constructors

  • AssetPlatform(
      id: String,
      chain_identifier: option.Option(Int),
      name: String,
      shortname: String,
      native_coin_id: String,
    )

Values

pub fn decode_asset_platforms(
  json_string: String,
) -> Result(List(AssetPlatform), error.CoinGeckoError)

Decode an asset platforms list from a JSON string.

pub fn list(
  client: client.Client,
  filter filter: option.Option(String),
  send sender: fn(request.Request(String)) -> Result(
    response.Response(String),
    String,
  ),
) -> Result(List(AssetPlatform), error.CoinGeckoError)

Get list of all asset platforms (blockchains).

Example

let assert Ok(platforms) = asset_platforms.list(client, filter: None, send: sender)
pub fn list_request(
  client: client.Client,
  filter filter: option.Option(String),
) -> Result(request.Request(String), error.CoinGeckoError)

Build a request to get list of all asset platforms.

Search Document