Crates.io | primer-api |
lib.rs | primer-api |
version | 2.0.0 |
source | src |
created_at | 2022-10-21 02:36:28.925236 |
updated_at | 2022-10-21 02:47:54.731805 |
description | primer client, generated from the OpenAPI spec. |
homepage | https://github.com/libninjacom/primer-rs |
repository | https://github.com/libninjacom/primer-rs |
max_upload_size | |
id | 693136 |
size | 162,798 |
primer client, generated from the OpenAPI spec.
use primer_api::PrimerClient;
use primer_api::model::*;
#[tokio::main]
async fn main() {
let client = PrimerClient::from_env();
let response = client
.retrieve_client_side_token_client_session_get()
.client_token("your client token")
.send()
.await
.unwrap();
println!("{:#?}", response);
}
This example loads configuration from environment variables, specifically:
PRIMER_BASE_URL
PRIMER_API_KEY_AUTH
Add this to your Cargo.toml:
[dependencies]
primer-api = "0.1.0"
You can see working examples of every API call in the examples/
directory.
Contributions are welcome!
Library created with Libninja.