# RegisterUsableItem

***

## Params

| Name     | Optional | Example |
| -------- | -------- | ------- |
| itemName | no       | bread   |
| callback | no       | N/A     |

## Usage

```lua
local api = exports["bb_inventory"]:GetAPI()

local function usedBread(source, item)
    print(json.encode(item))
    
---{
---    id = 3,
---    item = {
---        id = 1,
---        name = "bread",
---        label "Bread",
---        type = "NORMAL",
---        weight = 100,
---        maxAmount = 3,
---        category = "food",
---        sizeX = 1,
---        sizeY = 1,
---    },
---    inventoryId = 5,
---    metadata = {},
---    slot = 5,
---    amount = 5
---}
end

api.RegisterUsableItem("bread", usedBread)
exports["bb_inventory"]:RegisterUsableItem("bread", usedBread)
```
