Steamworks документация
IGameInventory интерфейс
The primary interface to interact with the Steam Economy.
See also: ISteamEconomy.

For more info on how to use the Steamworks Web API please see the Обзор на уеб приложно програмния интерфейс.

GetHistoryCommandDetails

GET https://partner.steam-api.com/IGameInventory/GetHistoryCommandDetails/v1/
ИмеТипИзискваноОписание
keystringSteamworks Web API publisher authentication key.
appiduint32№ на приложение за игра.
steamiduint64The steam ID of the account to operate on
commandstringThe command to run on that asset
contextiduint64The context to fetch history for
argumentsstringThe arguments that were provided with the command in the first place



ЗАБЕЛЕЖКА: 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/
ИмеТипИзискваноОписание
keystringSteamworks Web API publisher authentication key.
appiduint32№ на приложение за игра.
steamiduint64The Steam ID to fetch history for
contextiduint64The context to fetch history for
starttimeuint32Start time of the history range to collect
endtimeuint32End time of the history range to collect



ЗАБЕЛЕЖКА: 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/
ИмеТипИзискваноОписание
keystringSteamworks Web API publisher authentication key.
appiduint32№ на приложение за игра.
steamiduint64The asset ID to operate on
contextiduint64The context to fetch history for
actoriduint32A unique 32 bit ID for the support person executing the command



ЗАБЕЛЕЖКА: 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/
ИмеТипИзискваноОписание
keystringSteamworks Web API publisher authentication key.
appiduint32№ на приложение за игра.
assetiduint64The asset ID to operate on
contextiduint64The context to fetch history for



ЗАБЕЛЕЖКА: 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
ИмеТипИзискваноОписание
keystringSteamworks Web API publisher authentication key.
appiduint32№ на приложение за игра.
itemdefsJSON arrayOne or more Item Definitions, presented as a JSON array, to be updated or created.

Отклик
The output from this method will be a JSON object.
  • response
    • success - True if the method was successful. If the asset server is returning false, it should set error to a string that explains why.
    • error - a string describing why this call failed. This message will be recorded in the error log, which is available under the Economy tab on the Steamworks site.
    • failed - an array of item definition IDs that were successfully updated by this call.

Примерен код
curl --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"

Примерно извеждане
{ "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.