20 unstable releases (9 breaking)
0.10.1 | Jul 25, 2024 |
---|---|
0.9.2 | Jun 17, 2024 |
0.8.1 | Jan 22, 2024 |
0.8.0 | Dec 5, 2023 |
0.3.0 | May 26, 2023 |
#13 in #10
240 downloads per month
Used in lightspark-remote-signing
1MB
15K
SLoC
Lightspark Rust SDK - v0.10.1
The Lightspark Rust SDK provides a convenient way to interact with the Lightspark services from applications written in the Rust language.
WARNING: This SDK is in version 0.10.1 (active development). It means that its APIs may not be fully stable. Please expect that changes to the APIs may happen until we move to v1.0.0.
Documentation
The documentation for this SDK (installation, usage, etc.) is available at https://docs.lightspark.com/lightspark-sdk/getting-started?language=Rust
Sample code
For your convenience, we included an example that shows you how to use the SDK.
Open the file example/example.rs
and make sure to update the variables at the top of the page with your information, then run it using cargo:
cargo run --example example
lib.rs
:
Lightspark Rust SDK is a thin wrapper around the GraphQL API that provides an easy way to integrate with the Lightspark systems in a Rust environment.
Getting Started
After obtain an API token, a client can be initiate.
use lightspark::request::auth_provider::AccountAuthProvider;
use lightspark::client::LightsparkClient;
use lightspark::key::RSASigningKey;
let api_id = "<your api token id>";
let api_token = "<your api token secret>";
let auth_provider = AccountAuthProvider::new(api_id.to_string(), api_token.to_string());
let client = match LightsparkClient::<RSASigningKey>::new(auth_provider) {
Ok(value) => value,
Err(err) => {
println!("{}", err);
return;
}
};
You are now ready to use the Lightspark SDK!
See more examples in examples/example.rs
Dependencies
~18–32MB
~455K SLoC