Crate steam_workshop_api

Source
Expand description

§steam_workshop_api

This library provides access to the steam web apis. Uses reqwest::blocking under the hood

§Getting Started

To access any web api that requires no authentication (file details) you need to create a new instance:

use steam_workshop_api::SteamWorkshop;

let wsclient = SteamWorkshop::new();
wsclient.get_published_file_details(&["fileid1".to_string()]);

§Using Authorized Methods

Authorized methods are behind the AuthedWorkshop struct, which can be generated from a Workshop instance:

use steam_workshop_api::SteamWorkshop;
 
let mut wsclient = SteamWorkshop::new();
wsclient.set_apikey(Some("MY_API_KEY".to_string()));
wsclient.can_subscribe("blah");

§Using Proxied Methods

Proxied methods are identical to AuthedWorkshop, except can use a third party server to proxy (and keep the appkey private)

use steam_workshop_api::{SearchOptions, SteamWorkshop};

let mut wsclient = SteamWorkshop::new();
wsclient.set_proxy_domain(Some("steamproxy.example.com".to_string()));
// Does not require .set_apikey, as the proxy will handle it
wsclient.search_items(&SearchOptions {
    query: "blah".to_string(),
    count: 10,
    app_id: 550,
    cursor: None,
    required_tags: None,
    excluded_tags: None,
});

Structs§

ItemResponse
SearchOptions
SearchResult
SearchTagOptions
SteamWorkshop
WorkshopItem
WorkshopItemTag

Enums§

Error
PublishedFileQueryType
QueryType