Skip to main content

Crate steam_tradeoffer_manager

Crate steam_tradeoffer_manager 

Source
Expand description

Makes Steam trade offers easy!

Based on the excellent node-steam-tradeoffer-manager.

§Features

  • Richly-featured API for creating, accepting, cancelling, and declining trade offers.
  • Manages account trade offer state.
  • Mobile confirmations.
  • Loading inventories.
  • Trade history.
  • Helper method for getting your Steam Web API key.
  • Automatically cancels offers past a set duration during polls.
  • Loads descriptions (classinfos) for assets. Classinfos are cached to file and read when available. The manager holds a Least frequently used (LFU) cache of classinfos in memory to reduce file reads.
  • Uses tokio asynchronous runtime for performing polling.
  • Trade items blazingly fast!

§Usage

All tasks relating to trade offers can be interfaced through TradeOfferManager. If more direct control is needed, the underlying API’s can be found in api and mobile_api.

See examples.

Re-exports§

pub use reqwest;
pub use reqwest_middleware;
pub use chrono;
pub use steamid_ng;

Modules§

api
This is the underlying API for the manager. You generally shouldn’t need to use this, but if you want more direct control over the requests, you can use this API directly.
enums
Enumerated types.
error
Error types.
mobile_api
This is the underlying mobile API for the manager. You generally shouldn’t need to use this, but if you want more direct control over the requests or only care about the mobile API features, you can use this API directly.
polling
Models related to polling trade offers.
request
Includes models used as parameters for making requests.
response
Models for responses.
types
Types for common values in Steam responses.

Structs§

ClassInfoCache
Used for storing caches of ClassInfo data in memory. Data is stored using an LfuCache to limit how many elements are stored in memory. While you probably won’t need to use this directly, it is used internally by TradeOfferManager for managing ClassInfo data.
SteamID
TradeOfferManager
Manager which includes functionality for interacting with trade offers, confirmations and inventories.
TradeOfferManagerBuilder
Builder for constructing a TradeOfferManager.

Functions§

get_inventory
A stand-alone method for getting a user’s inventory. Optionally allows specifying a client to use for requests (useful if you need to proxy your requests, for example).
get_steam_server_time_offset
Gets how many seconds we are behind Steam’s servers.