Crates.io | op-api-sdk |
lib.rs | op-api-sdk |
version | 0.1.0 |
source | src |
created_at | 2020-10-09 09:50:19.831466 |
updated_at | 2020-10-09 09:50:19.831466 |
description | Rust SDK for OP REST API |
homepage | https://op-developer.fi/ |
repository | https://github.com/drodil/op-api-rust-sdk/ |
max_upload_size | |
id | 297567 |
size | 60,160 |
Rust SDK for OP REST API
To be published to crates.io
See apis crate for all available clients. Example of getting account data:
use op_api_sdk::apis::accounts::Accounts;
use op_api_sdk::options::Options;
#[tokio::main]
async fn main() {
let options = Options::new_dev(String::from("X_API_KEY"))
.with_version("v3".to_string());
let accounts = Accounts::new(options).accounts().await.unwrap();
println!("{:?}", accounts);
}
Additional examples available in the Examples directory.
See requests for required headers.
For further reading, please see our API documentation
Few guidelines for developing this library:
cargo fmt
for all changescargo clippy --workspace --all-targets --verbose --all-features
to find possible lint errors and warningscargo test
before pushing to remotecargo doc --open
Tests depend to real sandbox data.
X_API_KEY=<your api key> cargo test
To enable debug logging from the library set up the RUST_LOG environment variable
export RUST_LOG=op_api_sdk=debug