# C_HousingBlueprint: 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/C_HousingBlueprint

## Functions

### C_HousingBlueprint.CanExportRoom

```lua
canExport = C_HousingBlueprint.CanExportRoom(roomGUID)
```

Returns true if the specific room is allowed to be exported

Arguments:
- `roomGUID`: WOWGUID

Returns:
- `canExport`: bool

### C_HousingBlueprint.CanExportTypeFromCurrentLocation

```lua
locationValid = C_HousingBlueprint.CanExportTypeFromCurrentLocation(type)
```

Returns true if the player's current location is a valid place to attempt to export a specific kind of blueprint

Arguments:
- `type`: HousingBlueprintType

Returns:
- `locationValid`: bool

### C_HousingBlueprint.CanImportTypeFromCurrentLocation

```lua
locationValid = C_HousingBlueprint.CanImportTypeFromCurrentLocation(type)
```

Returns true if the player's current location is a valid place to attempt to import a specific kind of blueprint

Arguments:
- `type`: HousingBlueprintType

Returns:
- `locationValid`: bool

### C_HousingBlueprint.DeleteBlueprint

```lua
C_HousingBlueprint.DeleteBlueprint(blueprintID)
```

Delete the specified owned blueprint; Listen for HousingBlueprintDeleteSuccess and HousingBlueprintDeleteFailure for results

Arguments:
- `blueprintID`: BigUInteger

### C_HousingBlueprint.ExportBlueprint

```lua
C_HousingBlueprint.ExportBlueprint(type, name)
```

Saves out a new Blueprint of the specified type, using the specified name, if available, based on where the player is currently standing (see GetExportAvailability); Listen for HousingBlueprintExportSuccess and HousingBlueprintExportFailure for results

Arguments:
- `type`: HousingBlueprintType
- `name`: cstring

### C_HousingBlueprint.ExportRoomBlueprint

```lua
C_HousingBlueprint.ExportRoomBlueprint(name, roomGUID)
```

Saves out a new Blueprint of the specified room, using the specified name, if available (see GetExportAvailability); Listen for HousingBlueprintExportSuccess and HousingBlueprintExportFailure for results

Arguments:
- `name`: cstring
- `roomGUID`: WOWGUID

### C_HousingBlueprint.GetBlueprintHyperlink

```lua
hyperLink = C_HousingBlueprint.GetBlueprintHyperlink(blueprintShareCode)
```

May return nothing.

Arguments:
- `blueprintShareCode`: cstring

Returns:
- `hyperLink`: string

### C_HousingBlueprint.GetBlueprintTypeForCode

```lua
type = C_HousingBlueprint.GetBlueprintTypeForCode(shareCode)
```

Returns what type of Blueprint the specified code is for; Will return HousingBlueprintType.None if code is invalid; Does NOT check whether the shareCode actually matches up to a real valid Blueprint

Arguments:
- `shareCode`: cstring

Returns:
- `type`: HousingBlueprintType

### C_HousingBlueprint.GetExportAvailability

```lua
availability = C_HousingBlueprint.GetExportAvailability()
```

Returns success if the player can currently export Blueprints, or a specific error type (ex: invalid location or permissions)

Returns:
- `availability`: HousingResult

### C_HousingBlueprint.GetFeatureAvailability

```lua
blueprintsAvailability = C_HousingBlueprint.GetFeatureAvailability()
```

Returns success if Blueprints as a feature is currently enabled and available

Returns:
- `blueprintsAvailability`: HousingResult

### C_HousingBlueprint.GetImportAvailability

```lua
availability = C_HousingBlueprint.GetImportAvailability()
```

Returns success if the player can currently import Blueprints, or a specific error type (ex: invalid location or permissions)

Returns:
- `availability`: HousingResult

### C_HousingBlueprint.ImportBlueprint

```lua
C_HousingBlueprint.ImportBlueprint(shareCode)
```

Imports the specified blueprint, if available (see GetImportAvailability and CanImportTypeFromCurrentLocation); Listen for HousingBlueprintImportSuccess and HousingBlueprintImportFailure for results

Arguments:
- `shareCode`: cstring

### C_HousingBlueprint.IsShareCodeValid

```lua
isValid = C_HousingBlueprint.IsShareCodeValid(shareCode)
```

Returns true if the string matches the valid expected format for a Blueprint Share Code; Does NOT check whether the shareCode actually matches up to a real valid Blueprint

Arguments:
- `shareCode`: cstring

Returns:
- `isValid`: bool

### C_HousingBlueprint.RenameBlueprint

```lua
C_HousingBlueprint.RenameBlueprint(blueprintID, newName)
```

Rename the specified owned blueprint to the specified name; Listen for HousingBlueprintRenameSuccess and HousingBlueprintRenameFailure for results

Arguments:
- `blueprintID`: BigUInteger
- `newName`: cstring

### C_HousingBlueprint.RequestBlueprintCollection

```lua
C_HousingBlueprint.RequestBlueprintCollection()
```

Request the full list of all of the player's Blueprints; This is async, either the HOUSING_BLUEPRINT_COLLECTION_RECEIVED or HOUSING_BLUEPRINT_COLLECTION_FAILURE event will eventually be fired as a result

### C_HousingBlueprint.RequestBlueprintContents

```lua
C_HousingBlueprint.RequestBlueprintContents(shareCode)
```

Request the full contents of a specific Blueprint, in context of the current owned plot or house (if any); This is async as content info includes dynamic data from the server, either the HOUSING_BLUEPRINT_CONTENTS_RECEIVED or HOUSING_BLUEPRINT_CONTENTS_FAILURE event will eventually be fired as a result; Calling this again before a prior request has finished will cancel the prior request

Arguments:
- `shareCode`: cstring

### C_HousingBlueprint.RequestBlueprintContentsForContext

```lua
C_HousingBlueprint.RequestBlueprintContentsForContext(shareCode, [optionalHouseGUID])
```

Request the full contents of a specific Blueprint, either in context of a specific owned House or plot, or explicitly outside of any specific context; Typically used to update missing requirement info from previously-retrieved contents; See RequestBlueprintContents for other notes

Arguments:
- `shareCode`: cstring
- `optionalHouseGUID`: WOWGUID, may be nil

### C_HousingBlueprint.StartImportRoomBlueprint

```lua
C_HousingBlueprint.StartImportRoomBlueprint(shareCode)
```

Start the process of importing a Room Blueprint. This will lead to Layout Mode being opened, so the player can then select an available door to attach the room to

Arguments:
- `shareCode`: cstring

### C_HousingBlueprint.UpdateBlueprintStringFromInput

```lua
updatedShareCode = C_HousingBlueprint.UpdateBlueprintStringFromInput(inputShareCode)
```

May return nothing.

Arguments:
- `inputShareCode`: cstring

Returns:
- `updatedShareCode`: string

## Events

### HOUSING_BLUEPRINT_COLLECTION_FAILURE

Payload, after the event's name:
- `result`: HousingResult

### HOUSING_BLUEPRINT_COLLECTION_RECEIVED

Payload, after the event's name:
- `collection`: HousingBlueprintCollection

### HOUSING_BLUEPRINT_CONTENTS_FAILURE

Payload, after the event's name:
- `blueprintShareCode`: string
- `result`: HousingResult

### HOUSING_BLUEPRINT_CONTENTS_RECEIVED

Payload, after the event's name:
- `contentInfo`: HousingBlueprintContentInfo

### HOUSING_BLUEPRINT_DELETE_FAILURE

Payload, after the event's name:
- `blueprintID`: BigUInteger
- `result`: HousingResult

### HOUSING_BLUEPRINT_DELETE_SUCCESS

Payload, after the event's name:
- `blueprintID`: BigUInteger

### HOUSING_BLUEPRINT_EXPORT_FAILURE

Payload, after the event's name:
- `result`: HousingResult

### HOUSING_BLUEPRINT_EXPORT_SUCCESS

Payload, after the event's name:
- `blueprintShareCode`: string

### HOUSING_BLUEPRINT_IMPORT_FAILURE

Payload, after the event's name:
- `result`: HousingResult

### HOUSING_BLUEPRINT_IMPORT_STARTED

No payload.

### HOUSING_BLUEPRINT_IMPORT_SUCCESS

No payload.

### HOUSING_BLUEPRINT_RENAME_FAILURE

Payload, after the event's name:
- `blueprintID`: BigUInteger
- `result`: HousingResult

### HOUSING_BLUEPRINT_RENAME_SUCCESS

Payload, after the event's name:
- `blueprintID`: BigUInteger
- `name`: string

### HOUSING_BLUEPRINTS_AVAILABILITY_CHANGED

No payload.

---
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."
