steam_ugc_query_add_required_tag

Sets a tag that the queried UGC should have.

Syntax:

steam_ugc_query_add_required_tag(ugc_query_handle , tag_name);


Argument Description
ugc_query_handle The query handle to use.
tag_name The tag name to include (a string).


Returns: Boolean


Description

This function can be used to further filter any given UGC query, specifically to search only those UGC items with the given tag. The query handle is the value returned when you created the query (using, for example, steam_ugc_create_query_user()) and the second argument is a string you want to use as the tag to include. The function will return true if the query filter was correctly set, or false otherwise.


Example:

var query_handle = steam_ugc_create_query_all(ugc_query_RankedByTrend, ugc_match_Items, 1);
steam_ugc_query_add_required_tag(query_handle, "RPG");
steam_ugc_query_set_return_long_description(query_handle, true);
steam_ugc_query_set_allow_cached_response(query_handle, true);
query_ID = steam_ugc_send_query(query_handle);

The above code creates a query request and stores it's handle in a local variable for future use in the rest of the functions which further define the query request before sending the query.

Back: Steam API - User Generated Content
Next: steam_ugc_query_add_excluded_tag
© Copyright YoYo Games Ltd. 2015 All Rights Reserved