steam_ugc_request_item_details


Description

This function can be used to retrieve information about a given file ID. You give the file ID and supply a maximum age for checking (see the Steam docs for more information), then the function returns a unique async ID value which can be used to check the details correctly in the Steam Async event. This event will have the async_load DS map which will be populated with the following key/value pairs:


Syntax:

steam_ugc_request_item_details(published_file_id, max_age_seconds);

Argument Description
published_file_id The unique file ID for the UGC to be checked.
max_age_seconds The "age" of the data to check (recommended 30 - 60 seconds).


Returns:

Async ID


Extended Example:

In this example we send off a details request for an item and then parse the resulting async_load DS map to set some variables. First we send of the request:

steam_details = steam_ugc_request_item_details(global.fileID, 60);

The above code will request details on the item with the file ID stored in the global variable and will trigger a Steam Async event with the returned information. In this event we can then parse the map and store some of the values in variables which can then be used to display the information to the user:

var map_id = async_load[? "id"];
var result = async_load[? "result"];
if (map_id == steam_details) && (result == ugc_result_success)
    {
    mTitle = async_load[? "title"];
    mDesc = async_load[? "description"];
    mTags = async_load[? "tags"];
    m_hPreviewFile = async_load[? "handle_preview_file"];
    m_hOwnerSteamId = async_load[? "steam_id_owner"];
    mOwnerAccountId = async_load[? "account_id_owner"];
    mPubFileId = async_load[? "published_file_id"];
    mScore = async_load[? "score"];
    }