CatalogSearchParams

显示已弃用

*此内容使用人工智能(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 的创作。通过 搜索结果导致 HTTP 400 错误请求。

默认值:Enum.CreatorTypeFilter.All

CreatorId

搜索由单个创建者ID创建的物品。使用 CatalogSearchParams.CreatorType 指定用户或组。搜索创建者ID 创建者名称不支持;指定一个,不是两个。

0

Limit

指定要回传回的物品数量。接受 10 , 28 , 30 , 60 , 和 120 .默认为 30 .