primer-api

Crates.ioprimer-api
lib.rsprimer-api
version2.0.0
sourcesrc
created_at2022-10-21 02:36:28.925236
updated_at2022-10-21 02:47:54.731805
descriptionprimer client, generated from the OpenAPI spec.
homepagehttps://github.com/libninjacom/primer-rs
repositoryhttps://github.com/libninjacom/primer-rs
max_upload_size
id693136
size162,798
Kurt Wolf (kurtbuilds)

documentation

https://docs.rs/primer-api

README

GitHub Contributors Stars Build Status Downloads Crates.io

primer client, generated from the OpenAPI spec.

Usage

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

Installation

Add this to your Cargo.toml:

[dependencies]
primer-api = "0.1.0"

Documentation

You can see working examples of every API call in the examples/ directory.

Contributing

Contributions are welcome!

Library created with Libninja.

Commit count: 3

cargo fmt