# HousingCatalogSearcherAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/HousingCatalogSearcherAPI

## Functions

### GetAllSearchItems

```lua
matchingEntryVariantIDs = self:GetAllSearchItems()
```

Returns all catalog entries being searched (note these are NOT search results, this is the source collection of what's being searched)

Returns:
- `matchingEntryVariantIDs`: HousingCatalogEntryVariantID[]

### GetCatalogSearchResults

```lua
matchingEntryVariantIDs = self:GetCatalogSearchResults()
```

Returns the most recent search result entries

Returns:
- `matchingEntryVariantIDs`: HousingCatalogEntryVariantID[]

### GetEditorModeContext

```lua
editorModeContext = self:GetEditorModeContext()
```

Returns:
- `editorModeContext`: HouseEditorMode, may be nil

### GetFilterTagStatus

```lua
active = self:GetFilterTagStatus(groupID, tagID)
```

Arguments:
- `groupID`: number
- `tagID`: number

Returns:
- `active`: bool

### GetFilteredCategoryID

```lua
categoryID = self:GetFilteredCategoryID()
```

Returns:
- `categoryID`: number, may be nil

### GetFilteredSubcategoryID

```lua
subcategoryID = self:GetFilteredSubcategoryID()
```

Returns:
- `subcategoryID`: number, may be nil

### GetNumSearchItems

```lua
numSearchItems = self:GetNumSearchItems()
```

Returns the total number of entries being searched through

Returns:
- `numSearchItems`: number

### GetSearchCount

```lua
searchCount = self:GetSearchCount()
```

Returns the total number of owned instances across all most recent search result entries

Returns:
- `searchCount`: number

### GetSearchText

```lua
searchText = self:GetSearchText()
```

Returns:
- `searchText`: string, may be nil

### GetSortType

```lua
sortType = self:GetSortType()
```

Returns:
- `sortType`: HousingCatalogSortType

### IsAllowedIndoorsActive

```lua
isActive = self:IsAllowedIndoorsActive()
```

Returns:
- `isActive`: bool

### IsAllowedOutdoorsActive

```lua
isActive = self:IsAllowedOutdoorsActive()
```

Returns:
- `isActive`: bool

### IsBaseVariantOnlyActive

```lua
isActive = self:IsBaseVariantOnlyActive()
```

Returns:
- `isActive`: bool

### IsCollectedActive

```lua
isActive = self:IsCollectedActive()
```

Returns:
- `isActive`: bool

### IsCustomizableOnlyActive

```lua
isActive = self:IsCustomizableOnlyActive()
```

Returns:
- `isActive`: bool

### IsFirstAcquisitionBonusOnlyActive

```lua
isActive = self:IsFirstAcquisitionBonusOnlyActive()
```

Returns:
- `isActive`: bool

### IsSearchInProgress

```lua
isSearchInProgress = self:IsSearchInProgress()
```

Returns:
- `isSearchInProgress`: bool

### IsStoredOnlyActive

```lua
isActive = self:IsStoredOnlyActive()
```

Returns:
- `isActive`: bool

### IsUncollectedActive

```lua
isActive = self:IsUncollectedActive()
```

Returns:
- `isActive`: bool

### RunSearch

```lua
self:RunSearch()
```

Run search with all current param values

### SetAllInFilterTagGroup

```lua
self:SetAllInFilterTagGroup(groupID, active)
```

Set the toggle state of all filter tags within a specific group; If active, only entries that match Any of the tags in the group will be included in search results

Arguments:
- `groupID`: number
- `active`: bool

### SetAllowedIndoors

```lua
self:SetAllowedIndoors(isActive)
```

Search parameter; If true, entries that can be placed in house interiors will be included in the search; Note many decor objects can be placed both indoors and outdoors, so having only this toggled on may still include decor that can also be placed outdoors

Arguments:
- `isActive`: bool

### SetAllowedOutdoors

```lua
self:SetAllowedOutdoors(isActive)
```

Search parameter; If true, entries that can be placed outside in plots will be included in the search; Note many decor objects can be placed both indoors and outdoors, so having only this toggled on may still include decor that can also be placed indoors

Arguments:
- `isActive`: bool

### SetAutoUpdateOnParamChanges

```lua
self:SetAutoUpdateOnParamChanges(autoUpdateActive)
```

If true, searcher automatically updates results whenever search param values are changed

Arguments:
- `autoUpdateActive`: bool

### SetBaseVariantOnly

```lua
self:SetBaseVariantOnly(isActive)
```

Search parameter; If true, only the base variant of each decor entry will be included

Arguments:
- `isActive`: bool

### SetCollected

```lua
self:SetCollected(isActive)
```

Search parameter; If true, includes all owned entries, including those that are in storage OR placed in an owned house or plot; See IsStoredOnlyActive for a more exclusive toggle

Arguments:
- `isActive`: bool

### SetCustomizableOnly

```lua
self:SetCustomizableOnly(isActive)
```

Search parameter; If true, catalog entries that cannot be customized (ie dyed) will be excluded from the search

Arguments:
- `isActive`: bool

### SetEditorModeContext

```lua
self:SetEditorModeContext([editorModeContext])
```

Search parameter; If set, limits search results to only entries that are used/valid in the specified editor mode

Arguments:
- `editorModeContext`: HouseEditorMode, may be nil

### SetFilterTagStatus

```lua
self:SetFilterTagStatus(groupID, tagID, active)
```

Set the toggle state of a single filter tag within a specific group

Arguments:
- `groupID`: number
- `tagID`: number
- `active`: bool

### SetFilteredCategoryID

```lua
self:SetFilteredCategoryID([categoryID])
```

Search parameter; If set, limits search results to only those within the specified category

Arguments:
- `categoryID`: number, may be nil

### SetFilteredSubcategoryID

```lua
self:SetFilteredSubcategoryID([subcategoryID])
```

Search parameter; If set, limits search results to only those within the specified subcategory

Arguments:
- `subcategoryID`: number, may be nil

### SetFirstAcquisitionBonusOnly

```lua
self:SetFirstAcquisitionBonusOnly(isActive)
```

Search parameter; If true, excludes any entries that do not reward house xp when acquired for the first time

Arguments:
- `isActive`: bool

### SetResultsUpdatedCallback

```lua
self:SetResultsUpdatedCallback(callback)
```

Arguments:
- `callback`: HousingCatalogSearchResultsUpdatedCallback

### SetSearchText

```lua
self:SetSearchText([searchText])
```

Search parameter; If set, multiple text fields are checked for instances of the text, including name, category, subcategory, and data tags

Arguments:
- `searchText`: string, may be nil. Supports advanced search tokens ('"' '-' and '|'), case and accent insensitive; Set nil to clear out the search text

### SetSortType

```lua
self:SetSortType(sortType)
```

Arguments:
- `sortType`: HousingCatalogSortType

### SetStoredOnly

```lua
self:SetStoredOnly(isActive)
```

Search parameter; If true, only entries that you have instances of available in storage will be included; This does not include entries that you own but have all been placed in a house; See IsCollectedActive for param that includes placed entries

Arguments:
- `isActive`: bool

### SetUncollected

```lua
self:SetUncollected(isActive)
```

Search parameter; If true, includes entries that are not owned, meaning not available in storage nor placed in any owned houses or plots

Arguments:
- `isActive`: bool

### ToggleAllowedIndoors

```lua
self:ToggleAllowedIndoors()
```

### ToggleAllowedOutdoors

```lua
self:ToggleAllowedOutdoors()
```

### ToggleBaseVariantOnly

```lua
self:ToggleBaseVariantOnly()
```

### ToggleCollected

```lua
self:ToggleCollected()
```

### ToggleCustomizableOnly

```lua
self:ToggleCustomizableOnly()
```

### ToggleFilterTag

```lua
self:ToggleFilterTag(groupID, tagID)
```

Arguments:
- `groupID`: number
- `tagID`: number

### ToggleFirstAcquisitionBonusOnly

```lua
self:ToggleFirstAcquisitionBonusOnly()
```

### ToggleStoredOnly

```lua
self:ToggleStoredOnly()
```

### ToggleUncollected

```lua
self:ToggleUncollected()
```

## Tables

### HousingCatalogSearchResultsUpdatedCallback (callbacktype)

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
