UNPKG

typerinth

Version:

A TypeScript library for interacting with the Modrinth API.

27 lines (26 loc) 804 B
import FacetGroup from "./FacetGroup"; export default class SearchFacets { private facetGroups; /** * Creates an array of FacetGroups for searching. * FacetGroups are combined with an **AND** operation * @param facetGroups */ constructor(...facetGroups: FacetGroup[]); /** * Gets the facet groups * @returns The facet groups */ getFacetGroups(): FacetGroup[]; /** * Adds a facet group to the search * @param facetGroup The facet group to add * @returns The search facets */ addFacetGroup(facetGroup: FacetGroup): SearchFacets; /** * Stringifies the search facets * @returns The stringified search facets (e.g. [["categories:forge"], ["version:1.16.5", "version:1.17.1"]]) */ stringify(): string; }