space-traders-api

Crates.iospace-traders-api
lib.rsspace-traders-api
version0.1.2
created_at2025-07-03 18:09:01.866587+00
updated_at2025-07-03 19:04:57.836855+00
descriptionGenerated API client for SpaceTraders
homepage
repositoryhttps://github.com/crates-lurey-io/space-traders-api
max_upload_size
id1736672
size1,025,639
admins (github:crates-lurey-io:admins)

documentation

README

space-traders-api

Generated API client for SpaceTraders.

Test Crates.io Version

Installing

cargo add space-traders-api

By default reqwest/default-tls is included (feature default-tls).

Usage

use space_traders_api::apis::{configuration::Configuration, global_api};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let mut config = Configuration::new();
  
   if let Ok(token) = std::env::var("SPACE_TRADERS_AGENT_TOKEN") {
       config.bearer_access_token = Some(token);
   }

   let status = global_api::get_status(&config).await?;
   println!("Status: {}", status.status);
}

See examples/main.rs for an example to get started.

cargo run --example main

To provide an agent token to the example, set SPACE_TRADERS_AGENT_TOKEN:

export SPACE_TRADERS_AGENT_TOKEN=...
cargo run --example main

Contributing

This project uses just to run commands the same way as the CI:

  • cargo just check to check formatting and lints.
  • cargo just doc to generate and preview docs.

For a full list of commands, see the Justfile.

Commit count: 0

cargo fmt