op-api-rust-sdk
Rust SDK for OP REST API
Installation
To be published to crates.io
Usage
See apis crate for all available clients. Example of getting account data:
use Accounts;
use Options;
async
Additional examples available in the Examples directory.
See requests for required headers.
For further reading, please see our API documentation
Developing
Few guidelines for developing this library:
- Follow Rust API Guidelines
- Keep formatting consistent by using
cargo fmtfor all changes - Use
cargo clippy --workspace --all-targets --verbose --all-featuresto find possible lint errors and warnings - Always add tests to your functionality, prefer TDD. Use /tests/ folder.
- Always run tests with
cargo testbefore pushing to remote - Check that you have documented all public functionality with
cargo doc --open
Running tests
Tests depend to real sandbox data.
- Register at https://op-developer.fi/developers/register
- Create an app that has access to all sandbox products (Mobility, Banking, etc)
- Run tests with
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