#steam #resources #api #api-bindings

steam_store_api

Safe Rust bindings for the Steam Store API

1 unstable release

0.1.0 Jan 4, 2024

#86 in #steam

MIT license

31KB
781 lines

steam_store_api

A wrapper for the Steam Store API in Rust.

This is based on the unofficial Steam Storefront resource, which provides methods to retrieve product information from the platform.

Example

#
use anyhow::Result;
use steam_store_api::prelude::*;

#[tokio::main]
async fn main() -> Result<()> {
    let client = SteamBuilder::new()
        .with_country_code("US")
        .with_language(&Language::English)
        .build()?;
    let app = client.app(&219990_u64).await?;
    println!("{:#?} - {:#?}", &app.app_id, &app.name);
    anyhow::Ok(())
}

lib.rs:

Steam Store

An API client for the unofficial Steam Storefront resource, which provides methods to retrieve product information from the platform.

Example


#
use anyhow::Result;
use steam_store_api::prelude::*;

#[tokio::main]
async fn main() -> Result<()> {
    let client = SteamBuilder::new()
        .with_country_code("US")
        .with_language(&Language::English)
        .build()?;
    let app = client.app(&219990_u64).await?;
    println!("{:#?} - {:#?}", &app.app_id, &app.name);
    anyhow::Ok(())
}

Dependencies

~7–20MB
~312K SLoC