Crates.io | gecko |
lib.rs | gecko |
version | 0.1.6 |
source | src |
created_at | 2021-06-01 23:10:11.519588 |
updated_at | 2021-06-10 01:29:05.452847 |
description | coin gecko api impl |
homepage | |
repository | https://gitlab.com/fuzzylemma/gecko.git |
max_upload_size | |
id | 404957 |
size | 63,879 |
A simple library to access coingecko's api.
[dependecies]
tokio = { version = "1", features = ["full"] }
gecko = { version = "0.1.6" }
use gecko;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let gecko_client = gecko::CoinGeckoAPI::default();
let coins_list = gecko::coins::List::required();
let response = gecko_client(&coins_list).await.unwrap();
println!("{:?}", response):
}
The testing only covers that the api endpoints are reachable (200 code). Responses are translated into a serde json values and the correctness of expected values are not tested.
this is my first rust project so be nice :)