CatalogSearchParams

顯示已棄用項目

*此內容是使用 AI(Beta 測試版)翻譯,可能含有錯誤。若要以英文檢視此頁面,請按一下這裡

CatalogSearchParams 數據類型儲存目錄搜索的參數通過 AvatarEditorService:SearchCatalog()

當存取 CatalogSearchParams.BundleTypesCatalogSearchParams.AssetTypes 屬性值時,返回的表將被設為只讀,以避免在不直接存取 CatalogSearchParams 實個體、實例時造成混亂。

例如,您可以使用以下屬性:


local params = CatalogSearchParams.new()
params.SearchKeyword = "Test"
params.MinPrice = 5000
params.MaxPrice = 10000
params.BundleTypes = {Enum.BundleType.Animations, Enum.BundleType.BodyParts}
local types = params.BundleTypes
for _, val in types do
print(val)
end
-- table.insert(types, Enum.BundleType.Animations) -- This would not work because the table is read only

概要

屬性

屬性

SearchKeyword

用於搜索目錄結果的關鍵字。

MinPrice

要搜尋的最低項目價格。

0

MaxPrice

要搜尋的最高項目價格。

預設值:2147483647

排序結果的順序,由 Enum.CatalogSortType 代表。

預設值:Enum.CatalogSortType.Relevance

用於聚合排序結果的時間期間,由 Enum.CatalogCategoryFilter 代表。此只適用於當排序類型為 Enum.CatalogSortType.MostFavoritedEnum.CatalogSortType.BestSelling 時。它不適用於其他類型。

預設值:Enum.CatalogSortAggregation.AllTime

用於過濾搜索的類別,由 Enum.CatalogCategoryFilter 代表。

預設值:Enum.CatalogCategoryFilter.None

SalesTypeFilter

銷售輸入搜尋類型,由 Enum.SalesTypeFilter 代表。

預設值:Enum.SalesTypeFilter.All

包含 Enum.BundleType 值的陣列,用於過濾搜索。

預設值:{}

包含 Enum.AvatarAssetType 值的陣列,用於過濾搜索。

IncludeOffSale

是否應將下架物品包含在結果中。

CreatorName

搜尋具有指定創作者名稱的項目。指定是否搜尋使用者、群組或兩者都使用 CatalogSearchParams.CreatorType

尋找由指定創作者輸入創建的項目。當未指定時,會預設從 Enum.CreatorTypeFilter.UserEnum.CreatorTypeFilter.Group 返回創作。搜索由 CatalogSearchParams.CreatorIdEnum.CreatorTypeFilter.All 結果導致 HTTP 400 錯誤。

預設值:Enum.CreatorTypeFilter.All

CreatorId

尋找由單一創作者ID創建的項目。使用 CatalogSearchParams.CreatorType 指定使用者或群組。搜尋創作者ID 創作者名稱不支持;指定一個,不要兩個。

0

Limit

指定要傳回回的項目數量。接受 10 , 28 , 30 , 60120 。默認為 30