From f04cb6bb24719a7e846a420c5f47eca2fa043f7a Mon Sep 17 00:00:00 2001 From: dineshpinto Date: Sat, 30 Dec 2023 12:16:10 +0530 Subject: [PATCH] Remove bin.rs --- Cargo.toml | 4 --- README.md | 3 +- src/bin.rs | 102 ----------------------------------------------------- 3 files changed, 2 insertions(+), 107 deletions(-) delete mode 100644 src/bin.rs diff --git a/Cargo.toml b/Cargo.toml index 56500d7..8504398 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,6 @@ keywords = ["geckoterminal", "rest", "api", "async", "crypto"] name = "geckoterminal_rs" path = "src/lib.rs" -[[bin]] -name = "geckoterminal_rs" -path = "src/bin.rs" - [dependencies] reqwest = { version = "0.11", features = ["blocking", "json"] } tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] } diff --git a/README.md b/README.md index f0b7cb6..af9f8f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Crates.io Version](https://img.shields.io/crates/v/geckoterminal-rs)](https://crates.io/crates/geckoterminal-rs) [![Crates.io Total Downloads](https://img.shields.io/crates/d/geckoterminal-rs)](https://crates.io/crates/geckoterminal-rs) - +[![Rust](https://github.com/dineshpinto/geckoterminal-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/dineshpinto/geckoterminal-rs/actions/workflows/rust.yml) +[![codecov](https://codecov.io/gh/dineshpinto/geckoterminal-rs/graph/badge.svg?token=OW7EKB0PXW)](https://codecov.io/gh/dineshpinto/geckoterminal-rs) # geckoterminal-rs ## RESTful asynchronous Rust client for GeckoTerminal API diff --git a/src/bin.rs b/src/bin.rs deleted file mode 100644 index c20fe04..0000000 --- a/src/bin.rs +++ /dev/null @@ -1,102 +0,0 @@ -#[tokio::main] -async fn main() -> Result<(), Box> { - env_logger::init(); - - let client = geckoterminal_rs::GeckoTerminalAPI::new(); - - let _ = client.networks(1).await; - - let _ = client.network_dexes("eth", 1).await; - - let _ = client - .trending_pools(vec!["base_token", "quote_token", "dex", "network"], 1) - .await; - - let _ = client - .network_trending_pools("eth", vec!["base_token", "quote_token", "dex"], 1) - .await; - - let _ = client - .network_pool_address( - "eth", - "0x60594a405d53811d3bc4766596efd80fd545a270", - vec!["base_token", "quote_token", "dex"], - ) - .await; - - let _ = client - .network_pools_multi_address( - "eth", - vec![ - "0x60594a405d53811d3bc4766596efd80fd545a270", - "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", - ], - vec!["base_token", "quote_token", "dex"], - ) - .await; - - let _ = client - .network_pools("eth", vec!["base_token", "quote_token", "dex"], 1) - .await; - - let _ = client - .network_addresses_token_price( - "eth", - vec![ - "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - ], - ) - .await; - - let _ = client - .network_token_pools( - "eth", - "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vec!["base_token", "quote_token", "dex"], - 1, - ) - .await; - - let _ = client - .network_token( - "eth", - "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - vec!["top_pools"], - ) - .await; - - let _ = client - .network_token_multi_address( - "eth", - vec![ - "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - ], - vec!["top_pools"], - ) - .await; - - let _ = client - .network_tokens_address_info("eth", "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48") - .await; - - let _ = client - .network_pool_trades("eth", "0x60594a405d53811d3bc4766596efd80fd545a270", 1000.0) - .await; - - let _ = client - .network_pool_ohlcv( - "eth", - "0x60594a405d53811d3bc4766596efd80fd545a270", - "day", - 1, - 1703916869, - 100, - "usd", - "base", - ) - .await; - - Ok(()) -}