A flexible client API framework as well as a set of API collections written in Rust.
```rust,no_run use lucia::{network::Transport, Pair};
async fn unit() -> lucia::Result<()> {
let (mut rm, mut trans) = Pair::<(), , _>::new(
// Checkout the network
module to see different transports.
(),
// Checkout the api
module to see different APIs.
(),
)
.intoparts();
// Checkout the RequestManager
structure of any API to see different endpoints.
let req = ();
// It is also possible to use send_retrieve_and_decode_many
if a protocol is able
// to perform batch requests.
let res = trans.sendretrieveanddecode_one(&mut rm, &req, ()).await?;
Ok(()) } ```
Each API's module has a documentation test for demonstration purposes.
Name | URL | Pct | |---|---|---| | Ethereum | https://web3js.readthedocs.io/en/v1.7.4/web3-eth.html | 3% | | Solana | https://docs.solana.com/developing/clients/jsonrpc-api | 85% |
Name | URL | Pct | |---|---|---| | Nager.Date | https://date.nager.at | 100% |
Name | URL | Pct | |---|---|---| | KuCoin | https://docs.kucoin.com | 5% |
Name | URL | Pct | |---|---|---| | Age of Empires II | https://age-of-empires-2-api.herokuapp.com/docs | 50% |
Name | URL | Pct | |---|---|---| | Covid-19 | https://github.com/M-Media-Group/Covid-19-API | 100% |
Name | URL | Pct | |---|---|---| | JSONPlaceholder | http://jsonplaceholder.typicode.com | 60% |
expect
, indexing
, panic
or unwrap
.unsafe
no_std
Name | URL | |---|---| | JSON | https://www.json.org | | JSON-RPC 2.0 | https://www.jsonrpc.org/specification |
Name | URL | |---|---| | HTTP | https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol | | WebSocket | https://en.wikipedia.org/wiki/WebSocket |
Name | URL | |---|---| | reqwest | https://github.com/seanmonstar/reqwest | | surf | https://github.com/http-rs/surf | | tokio-tungstenite | https://github.com/snapview/tokio-tungstenite |