# Steam-Web-API
Pure Rust bindings to the Steam Web API and XPAW Steam API, where the latter contains some undocumented albeit useful endpoints of the Steam Web API.
This library was heavily inspired by Rust Github API Wrapper.
Internally, Steam-Web-API uses a reqwest client for simplicity's sake, but this may change in the future.
Since this library makes heavy use of procedural macros to generate the strongly typed bindings, you may not get auto completion for endpoints if your IDE doesn't support proc-macro completion.
Add the following to your Cargo.toml
```toml [dependencies] tappet = { git = "https://github.com/saskenuba/SteamHelper-rs.git", branch = "master" }
```
Or if you want the blocking client:
toml
tappet = { git = "https://github.com/saskenuba/SteamHelper-rs.git", branch = "master", default-features = false, features = ["blocking"] }
Then in your lib.rs
or main.rs
file add:
rust
use tappet::{Executor, SteamAPI};
``` rust use tappet::{Executor, SteamAPI};
// if using blocking client // use tappet::blocking::{Executor, Github};
async fn main() -> Result<()> { let client = SteamAPI::new(std::env!("STEAM_API"));
// You choose between the already structured response
let response: tappet::response_types::GetPlayerBansBase = client
.get()
.ISteamUser()
.GetPlayerBans(vec!["76561197984835396".to_string()])
.execute_with_response()
.await?;
// or the raw response from reqwest
let response: reqwest::Response = client
.get()
.ISteamUser()
.GetPlayerSummaries(vec!["76561197984835396".to_string()])
.execute()
.await?;
}
// Not all endpoints have the structured endpoint response. You can contribute! ```