cryptologo 0.1.0

Rust client for crypto-logo.com — 413 cryptocurrency logos in SVG, PNG, WebP, ICO
Documentation
//! # cryptologo
//!
//! Rust client for [crypto-logo.com](https://crypto-logo.com) — the cryptocurrency
//! logo database with 413 coins in SVG, PNG, WebP, JPEG, and ICO formats.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use cryptologo::{CryptoLogo, LogoFormat};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), cryptologo::Error> {
//!     let client = CryptoLogo::new();
//!
//!     // List all coins
//!     let coins = client.list_coins().await?;
//!     for coin in coins.iter().take(3) {
//!         println!("{} ({}) — rank #{:?}", coin.name, coin.ticker, coin.market_cap_rank);
//!     }
//!
//!     // Download Bitcoin SVG
//!     let svg = client.get_logo("bitcoin-btc", LogoFormat::Svg, None).await?;
//!     std::fs::write("bitcoin.svg", &svg)?;
//!
//!     Ok(())
//! }
//! ```

mod client;
mod types;

pub use client::{CryptoLogo, CryptoLogoBuilder};
pub use types::{Coin, Error, LogoFormat, LogoOptions};

/// Standard pre-generated square sizes in pixels.
pub const ALLOWED_SIZES: &[u32] = &[16, 32, 48, 64, 96, 120, 128, 200, 256, 400, 512, 1024, 2000];

/// Valid ICO format sizes.
pub const ICO_SIZES: &[u32] = &[16, 32, 48, 64, 128, 256];