Garry's Mod Wiki

steamworks.GetList

steamworks.GetList( string type, table tags, number offset, number numRetrieve, number days, string userID, function resultCallback )

Description

Retrieves a customized list of Steam Workshop addons.

Arguments

1 string type
The type of items to retrieve. Possible values include:

  • popular (All invalid options will equal to this)
  • trending
  • latest
  • friends
  • followed - Items of people the player is following on Steam
  • friend_favs - Favorites of player's friends
  • favorite - Player's favorites
2 table tags
A table of tags to match.
3 number offset
How much of results to skip from first one. Mainly used for pages.
4 number numRetrieve
How much items to retrieve, up to 50 at a time.
5 number days
When getting Most Popular content from Steam, this determines a time period. ( 7 = most popular addons in last 7 days, 1 = most popular addons today, etc )
6 string userID
"0" to retrieve all addons, "1" to retrieve addons only published by you, or a valid SteamID64 of a user to get workshop items of.
7 function resultCallback
The function to process retrieved data. The first and only argument is a table, containing all the info, or nil in case of error

Example

Retrieves top 10 of Steam Workshop addons.

steamworks.GetList( "popular", nil, 0, 10, 7, 0, function( data ) PrintTable( data ) end )
Output:
totalresults = 1748 numresults = 10 results: 1 = 21197 2 = 72122655 3 = 68207248 4 = 71921341 5 = 79927494 6 = 12692 7 = 21174 8 = 72145362 9 = 16221 10 = 22104

Page Links


Special Pages


Wikis

?

Render Time: 81ms

DB GetPage 42
Generate Html 14
SaveChanges (1) 10
Render Body 0
Render Sidebar 12