fume-core 0.0.0

A strongly-opinionated Rust wrapper for steam web APIs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use serde::de::DeserializeOwned;

pub const HOST: &str = "api.steampowered.com";
pub const VERSION: &str = "v1";

pub mod steam_web_api_util;

// TODO: maybe return &str && &[]?
pub trait Query {
    type Response: DeserializeOwned;
    fn url() -> String;
    fn query(&self) -> impl Iterator<Item = (&str, &str)>;
}

pub(crate) fn url(interface: &str, method: &str) -> String {
    format!("https://{HOST}/{interface}/{method}/{VERSION}")
}