Skip to content

Commit dad63b9

Browse files
committed
Improve documentation
1 parent aa5062b commit dad63b9

File tree

6 files changed

+73
-14
lines changed

6 files changed

+73
-14
lines changed

ENDPOINTS.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ The following is a list of interfaces and endpoints that are currently supported
55
Interfaces that are prefixed with ✓ are fully implemented!
66

77
## ✓ IEconService
8+
- [ ] FlushAssetAppearanceCache **(requires publisher key)**
9+
- [ ] FlushContextCache **(requires publisher key)**
10+
- [ ] FlushInventoryCache **(requires publisher key)**
811
- [x] GetTradeHistory
912
- [x] GetTradeOffers
1013
- [x] GetTradeOffer
1114
- [x] GetTradeOffersSummary
1215
## IGameServersService
13-
- [ ] GetAccountList
16+
- [x] GetAccountList
1417
- [ ] CreateAccount
1518
- [ ] SetMemo
1619
- [ ] ResetLoginToken
1720
- [ ] DeleteAccount
18-
- [ ] GetAccountPublicInfo
19-
- [ ] QueryLoginToken
20-
- [ ] GetServerSteamIDsByIP
21+
- [x] GetAccountPublicInfo
22+
- [x] QueryLoginToken
23+
- [x] GetServerSteamIDsByIP
2124
- [ ] GetServerIPsBySteamID
2225
## ✓ IPlayerService
2326
- [x] GetOwnedGames
@@ -40,8 +43,13 @@ Interfaces that are prefixed with ✓ are fully implemented!
4043
## ✓ ISteamNews
4144
- [x] GetNewsForApp
4245
## ✓ ISteamRemoteStorage
46+
- [ ] EnumerateUserSubscribedFiles **(requires publisher key)**
4347
- [x] GetCollectionDetails
4448
- [x] GetPublishedFileDetails
49+
- [ ] GetUGCFileDetails
50+
- [ ] SetUGCUsedByGC **(requires publisher key)**
51+
- [ ] SubscribePublishedFile **(requires publisher key)**
52+
- [ ] UnsubscribePublishedFile **(requires publisher key)**
4553
## ISteamUser
4654
- [ ] CheckAppOwnership **(requires publisher key)**
4755
- [ ] GetAppPriceInfo **(requires publisher key)**

src/econ_service/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
//! # Implements the `IEconService` interface
2+
//!
3+
//! Additional Steam Economy methods that provide access to Steam Trading.
4+
//!
5+
//! **Note:** This implementation is incomplete! The following endpoints are currently unimplemented
6+
//!
7+
//! - FlushAssetAppearanceCache (requires publisher key)
8+
//! - FlushContextCache (requires publisher key)
9+
//! - FlushInventoryCache (requires publisher key)
10+
//!
11+
//! Endpoints that require a publisher key are not likely to be
12+
//! implemented in the near future, as they cannot be tested by developers.
13+
114
pub mod get_trade_history;
215
pub mod get_trade_offer;
316
pub mod get_trade_offers;

src/game_servers_service/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! # Implements the IGameServersService interface
1+
//! # Implements the `IGameServersService` interface
22
//!
33
//! Provides addtional methods for administration of Steam Game Servers
44
//! It's worth noting that steam ids aren't just for user accounts, servers also have steam ids

src/lib.rs

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
1-
//! # steam-rs: Safe bindings for the Steam Web API
1+
//! # steam-rs
22
//!
3-
//! The `steam-rs` crate provides convenient Rust bindings for the Steam Web API.
4-
//! This crate provides safe and convenient Rust bindings for the Steam Web API.
3+
//! Safe and convenient Rust bindings for the Steam Web API.
54
//!
6-
//! ### Warning!
7-
//! This crate is currently a work in progress, so please expect breaking changes and instability. Please be careful when using this! **This is not production ready!**
5+
//! **Warning**: This crate is still a work in progress. Breaking changes and instability are to be expected. Use with caution—**this is not production-ready**.
6+
//!
7+
//! The core of this crate is the [`Steam`] struct, which interacts with the Steam Web API. It typically[^1] needs to be initialized with a valid Steam API key.
8+
//!
9+
//! ```
10+
//! // Retrieve the Steam API key from an environment variable.
11+
//! let steam_api_key = &std::env::var("STEAM_API_KEY").expect("Missing an API key");
12+
//!
13+
//! // Initialize the Steam API client.
14+
//! let steam = Steam::new(steam_api_key);
15+
//! ```
16+
//!
17+
//! Another key component of this crate is the [`SteamId`](`steam_id::SteamId`) struct. It represents a Steam user ID[^2], which is often used when querying user data.
18+
//!
19+
//! ```
20+
//! let steam_ids = vec![
21+
//! SteamId::new(76561198136162943),
22+
//! SteamId(76561197960435530),
23+
//! ];
24+
//!
25+
//! // Request the player summaries of SteamIDs `76561198136162943` and `76561197960435530`.
26+
//! let player_summaries = steam.get_player_summaries(steam_ids).await.unwrap();
27+
//! ```
28+
//!
29+
//! [^1]: Not all API endpoints require an API key, and in that case providing one is optional.
30+
//! [^2]: Specifically, [`SteamId`](`steam_id::SteamId`) represents a SteamID64 type, but more types, such as SteamID and SteamID3 are planned in future releases.
831
932
pub mod econ_service;
1033
pub mod game_servers_service;

src/steam_id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ use serde::{Deserialize, Deserializer, Serialize};
1919
///
2020
/// # Conversions
2121
///
22-
/// You can convert a `SteamId` to a `u64` using the `into()` method:
22+
/// You can convert a `u64` to a `SteamId` using the `into()` method:
2323
/// ```
2424
/// use steam_rs::steam_id::SteamId;
2525
///
2626
/// let steam_id: SteamId = 76561197960287930.into();
27-
/// println!("SteamId as u64: {}", steam_id);
27+
/// println!("SteamId from u64: {}", steam_id);
2828
/// ```
2929
///
3030
/// # Formatting

src/steam_remote_storage/mod.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
pub mod get_collection_details;
2-
pub mod get_published_file;
1+
//! # Implements the `ISteamRemoteStorage` interface
2+
//!
3+
//! Primary interface for interacting with the Steam Workshop and User Generated Content (UGC).
4+
//!
5+
//! **Note:** This implementation is incomplete! The following endpoints are currently unimplemented
6+
//!
7+
//! - EnumerateUserSubscribedFiles (requires publisher key)
8+
//! - GetUGCFileDetails
9+
//! - SetUGCUsedByGC (requires publisher key)
10+
//! - SubscribePublishedFile (requires publisher key)
11+
//! - UnsubscribePublishedFile (requires publisher key)
12+
//!
13+
//! Endpoints that require a publisher key are not likely to be
14+
//! implemented in the near future, as they cannot be tested by developers.
315
416
const INTERFACE: &str = "ISteamRemoteStorage";
17+
18+
pub mod get_collection_details;
19+
pub mod get_published_file;

0 commit comments

Comments
 (0)