Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dineshpinto committed Mar 26, 2024
1 parent be69440 commit b27bfee
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,31 @@ $WIF / SOL: $2.58524513809515 (24H: -7.83%), Vol: 25117725.2604335, EP2ib6dYdEeq
...
```

## Custom configuration

If you want to customize the client config (such as adding a proxy etc.), simply initialize
`GeckoTerminalAPI` with a valid [reqwest Client](https://github.com/seanmonstar/reqwest).

```rust
use geckoterminal_rs::GeckoTerminalAPI;
use reqwest::Client;

#[tokio::main]
async fn main() {
// Create a client with your custom configuration
let client = Client::builder()
.proxy(reqwest::Proxy::all("http://localhost:8080").unwrap())
.build()
.unwrap();

let gt = GeckoTerminalAPI { client, ..Default::default() };

// Get a list of supported networks
let networks = gt.networks(None).await.unwrap();
println!("{:?}", networks);
}
```

## Disclaimer

This project is for educational purposes only. You should not construe any such
Expand Down

0 comments on commit b27bfee

Please sign in to comment.