Garry's Mod Wiki

WorkshopFileBase:Fetch

  WorkshopFileBase:Fetch( string type, number offset, number perpage, table extratags, string searchText, number filter = nil, string sort = nil )

Description

Fetches all subscriptions for the set namespace and type

If you want to use the type local you need to implement the :FetchLocal(offset, perpage) function!

Arguments

1 string type
The type to search for. (local, subscribed, subscribed_ugc, mine, favorite)
2 number offset
Skips the first x results.
3 number perpage
How many results per page should be returned.
4 table extratags
additional tags to filter the results.
5 string searchText
text that needs to be in the addon title. Use an empty string for none
6 number filter = nil
The filter for the results. (enabledonly, disabledonly)
7 string sort = nil
How it should be sorted. If set to nil, it will fallback to timeadded. (title, size, updated)