# Basic Item Database

Links to a web-based item database for Kathana that shows basic item stats. Also documents a simple JSON API endpoint (itemdb/api.html?item=ID) and a drop-in tooltip-loader.js script with sample HTML for embedding item tooltips on your own pages.

Written by jarette in the Kathana Discord. Original thread: https://discord.com/channels/1363839027114934315/1409615317667156098
Topics: item-database, items, api, tools

---

This item database is very basic and is just showing you the basic stats.
### Item DB
https://dbuena.github.io/Kathana/itemdb/

If you want to integrate it in your app, you can use this basic end-point api.
## Simple API
https://dbuena.github.io/Kathana/itemdb/api.html?item=4001 where 4001 is the ItemID
It will respond in json format.

## Cross-page Tooltip
https://dbuena.github.io/Kathana/itemdb/test.html
If you want to show tooltip of items in your webpages, only include the tooltip-load.js in your page.
```java
<script src="https://dbuena.github.io/Kathana/itemdb/js/tooltip-loader.js"></script>```

And use it like so:
```html
  <p>
    This is <a href="#" class="item-link" data-item-id="4001">Item#5</a>  
    And here is <a href="#" class="item-link" data-item-id="4002">Item#12</a>
  </p>```

## Screenshots

### Item database table showing five one-handed blade weapons with their IDs, names, descriptions, and level requirements

https://api.kathana.biner.dev/img/6aa56dfbebd5da69ed4dda8a

| ID | Item Name | Description | Level Req |
|---|---|---|---|
| 4001 | Old Sword | One Hand Blade | 0 |
| 4002 | Long Sword | One Hand Blade | 6 |
| 4003 | Shamshir | One Hand Blade | 12 |
| 4004 | Earth Shamshir | One Hand Blade | 10 |
| 4005 | Pata | One Hand Blade | 20 |


Source: https://kathana.biner.dev/guides/basic-item-database/