GroupCatalog
The Kohl group's avatar catalog, searched live for the Market tab, so an item uploaded to the group shows in every game without a release.
search(keyword)finds the first page (it yields) andmore(results)adds the next. Results are kept forCACHE_TTLseconds, callers asking for the same search at once share one request, and a search refused for asking too often makes the next waitCOOLDOWNseconds.sellable(info)is the server's check before it prompts an id the client sent: the item must be the group's and on sale.shouldAnnounce(...)decides whether the newest item is news to this player.setSearcher(fn)andsetClock(fn)stand in for Roblox and the clock in specs;forget()empties the cache.
Types
Item type
luau
type Item = {
id: number,
name: string,
bundle: boolean,
price: number?,
assetType: number?,
}Results type
luau
type Results = { items: { Item }, finished: boolean, limited: boolean?, next: (() -> ({ Item }, boolean))? }Searcher type
luau
type Searcher = (keyword: string) -> ResultsProperties
GROUP
luau
GroupCatalog.GROUP: numberPAGE
luau
GroupCatalog.PAGE: numberDEBOUNCE
luau
GroupCatalog.DEBOUNCE: numberCOOLDOWN
luau
GroupCatalog.COOLDOWN: numberFRESH
luau
GroupCatalog.FRESH: numberFunctions
setSearcher
setClock
luau
GroupCatalog.setClock(fn: (() -> number)?)forget
luau
GroupCatalog.forget()search Yields
luau
GroupCatalog.search(keyword: string): (Results?, string?)more Yields
luau
GroupCatalog.more(results: Results): (boolean, string?)thumbnail
luau
GroupCatalog.thumbnail(id: number, bundle: boolean?): stringsellable
luau
GroupCatalog.sellable(info: any): booleanshouldAnnounce
luau
GroupCatalog.shouldAnnounce(newestId: number, created: number?, lastSeen: number?, at: number): booleanWhether the group's newest item is news to a player: it isn't the one they last saw, and it was created within FRESH seconds of at (both in Unix seconds). A missing creation time is never news.