The primary interface to interact with the
Steam-talous.
See also:
ISteamEconomy.
For more info on how to use the Steamworks Web API please see the
Verkko-ohjelmointirajapinnan yleiskatsaus.
GetHistoryCommandDetails
GET https://partner.steam-api.com/IGameInventory/GetHistoryCommandDetails/v1/
Name | Type | Required | Description |
key | string | ✔ | Steamworks Web API publisher authentication key. |
appid | uint32 | ✔ | appid of game |
steamid | uint64 | ✔ | The steam ID of the account to operate on |
command | string | ✔ | The command to run on that asset |
contextid | uint64 | ✔ | The context to fetch history for |
arguments | string | ✔ | The arguments that were provided with the command in the first place |
NOTE: This call requires a publisher API key to use this method. As such this API
MUST be called from a secure server, and can never be used directly by clients!
GetUserHistory
GET https://partner.steam-api.com/IGameInventory/GetUserHistory/v1/
Name | Type | Required | Description |
key | string | ✔ | Steamworks Web API publisher authentication key. |
appid | uint32 | ✔ | appid of game |
steamid | uint64 | ✔ | The Steam ID to fetch history for |
contextid | uint64 | ✔ | The context to fetch history for |
starttime | uint32 | ✔ | Start time of the history range to collect |
endtime | uint32 | ✔ | End time of the history range to collect |
NOTE: This call requires a publisher API key to use this method. As such this API
MUST be called from a secure server, and can never be used directly by clients!
HistoryExecuteCommands
POST https://partner.steam-api.com/IGameInventory/HistoryExecuteCommands/v1/
Name | Type | Required | Description |
key | string | ✔ | Steamworks Web API publisher authentication key. |
appid | uint32 | ✔ | appid of game |
steamid | uint64 | ✔ | The asset ID to operate on |
contextid | uint64 | ✔ | The context to fetch history for |
actorid | uint32 | ✔ | A unique 32 bit ID for the support person executing the command |
NOTE: This call requires a publisher API key to use this method. As such this API
MUST be called from a secure server, and can never be used directly by clients!
SupportGetAssetHistory
GET https://partner.steam-api.com/IGameInventory/SupportGetAssetHistory/v1/
Name | Type | Required | Description |
key | string | ✔ | Steamworks Web API publisher authentication key. |
appid | uint32 | ✔ | appid of game |
assetid | uint64 | ✔ | The asset ID to operate on |
contextid | uint64 | ✔ | The context to fetch history for |
NOTE: This call requires a publisher API key to use this method. As such this API
MUST be called from a secure server, and can never be used directly by clients!
UpdateItemDefs
POST https://partner.steam-api.com/IGameInventory/UpdateItemDefs/v0001
Nimi | Tyyppi | Pakollinen | Kuvaus |
key | string | ✔ | Steamworks-ohjelmointirajapinnan julkaisijan varmennetunnus. |
appid | uint32 | ✔ | pelin appid |
itemdefs | JSON-matriisi | ✔ | Yksi tai useampi JSON-matriisissa esitelty esinemääritys on päivitettävissä tai luotavissa. |
VastausTämän menetelmän tuloksena on JSON-objekti.
- vastaus
- success - Tosi, jos menetelmä onnistui. Jos elementtipalvelin palaa epätotena, sen tulee määrittää virhe merkkijonoon, joka selittää syyn.
- error – Merkkijono, joka kertoo syyn kutsun epäonnistumiselle. Tämä viesti tallennetaan virhelokiin, joka on saatavilla Steamworks-sivuston Talous-välilehdeltä.
- failed - Matriisi esinemääritystunnuksille, joiden päivitys onnistui tällä kutsulla.
Esimerkki koodistacurl --request POST \
--header "Content-Type: application/x-www-form-urlencoded" \
--form appid=30400 \
--form 'itemdefs=[{"appid":"30400","itemdefid":"418","type":"item","display_type":"bag","name":"Bag of Stuff","description":"This bag contains stuff.","background_color":"993300","tradable": true,"marketable": true,"commodity": true,"tags":"class:human;type:bag"}, {"appid": "30400","itemdefid":"403","type":"item","display_type":"cat","name":"Cat of Bags","description":"This cat contains multitudes."}]'
"https://api.steampowered.com/IGameInventory/UpdateItemDefs/v0001?key=xxxxxx"
Esimerkki koodista{
"result": {
"updated": [
"418",
"403"
],
"failed": [],
"success": true
}
}
Once you have completed all the updates to the item definitions, if you've modified the marketable or tradeable flags, make a call to
FlushAssetAppearanceCache to immediately update the state of the associated items on the market. This call executes an expensive server operation so should only be done after all updates are completed and only when these flags have been modified.