User:Heffebaycay/GetUGCFileDetails

From Team Fortress Wiki
Jump to: navigation, search

URL

http://api.steampowered.com/ISteamRemoteStorage/GetUGCFileDetails/v1/

Method-specific parameters

steamid (Optional)
If specified, only returns details if the file is owned by the SteamID specified
ugcid
ID of UGC file to get info for
appid
appID of product

Result data

data
Array containing the file information
filename
path to the file along with its name
url
URL to the file
size
Size of the file

Fetching decals

This WebAPI method can be used to find the image applied with a Decal Tool on any of the supported items (which are currently Flair!, the Photo Badge, the Clan Pride and the Conscientious Objector). The ugcid parameter can be found using the GetPlayerItems WebAPI method under the attributes 152 and 227. Each one of these two attributes constitutes a part of the full id: attribute 152 is the lowest bit and attribute 227 is the highest bit.

To get from these two numbers to the full UGC id, you can convert both numbers from decimal to hexadecimal, append both hexadecimal strings together and then convert back to decimal. Here's an example:

                                 decimal                          hexadecimal
  lowest bit (attribute 152)       540654637                        0x2039BC2D
  highest bit (attribute 227)      122214424                        0x748D818
  full UGC id                      524906954720132141               0x748D8182039BC2D