# tibia-data-api

> A simple NodeJS interface to https://tibiadata.com/ API

Latest version **1.1.0** (published 2019-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install tibia-data-api
pnpm add tibia-data-api
yarn add tibia-data-api
bun add tibia-data-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-12-12 |
| First published | 2019-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Gabriell Huver |
| Maintainers | gabriellhuver |
| Keywords | Tibia, Data, API, Tibia Data API |

## Links

- npm: https://www.npmjs.com/package/tibia-data-api
- Repository: https://github.com/gabriellhuver/tibia-data-api
- Homepage: https://github.com/gabriellhuver/tibia-data-api#readme
- Issues: https://github.com/gabriellhuver/tibia-data-api/issues
- npm.io page: https://npm.io/package/tibia-data-api

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.88.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-12-12
- 1.0.9 — 2019-12-12
- 1.0.7 — 2019-12-02
- 1.0.6 — 2019-11-20
- 1.0.5 — 2019-11-20
- 1.0.4 — 2019-11-17
- 1.0.3 — 2019-11-17
- 1.0.2 — 2019-11-17
- 1.0.1 — 2019-11-17
- 1.0.0 — 2019-11-17

## README

# Tibia Data API

![](https://travis-ci.org/gabriellhuver/tibia-data-api.svg?branch=master) 

A simple NodeJS interface to https://tibiadata.com/ API

Modules:
- Characters
- Guilds
- Highscores
- Houses
- News
- Worlds

### Installation

Tibia data API requires [Node.js](https://nodejs.org/) to run.

```sh
$ npm install tibia-data-api --save
```

### How To use

```js

const tibiaAPI = require('tibia-data-api')

async function example() {
	try {
		let characterInfo = await tibiaAPI.characters.getInfoByName('Akox Shena')
		console.log(characterInfo)
	} catch (error) {
		console.log(error)
	}
}

example()

```

**Character info**

```js

let characterInfo = await tibiaAPI.characters.getInfoByName('Akox Shena')


```

**Guilds**

```js

let guildByWorld = await tibiaAPI.guilds.getByWorld('Lutabra')
let guildByName = await tibiaAPI.guilds.getByName('Skeletin Alliance')

```

**Highscores**
Types: experience, magic, shielding, distance, sword, club, axe, fist, fishing, achievements and loyalty.
Vocation: all, druid, knight, paladin and sorcerer.

```js

let hgInfo = await tibiaAPI.highscores.getByWorld('Lutabra')
let hgInfoByWorldAndType = await tibiaAPI.highscores.getByWorldAndType('Lutabra', 'experience')
let hgByWorldTypeAndVocation = await tibiaAPI.highscores.getByWorldTypeAndVocation('Lutabra', 'experience', 'knight')

```

**Houses**

Types: houses or guildhalls
Cities: Ab’Dendriel, Ankrahmun, Carlin, Darashia, Edron, Farmine, Gray Beach, Kazordoon, Liberty Bay, Port Hope, Rathleton, Svargrond, Thais, Venore and Yalahar (or yeah, all the Tibia cities)

```js

let housesByWorld = await tibiaAPI.houses.getByWorld('Lutabra')
let housesByWorldAndTown = await tibiaAPI.houses.getByWorldAndTown('Lutabra', 'thais')
let housesByWorldAndTownAndType = await tibiaAPI.houses.getByWorldTownAndType('Lutabra', 'thais', 'houses')
let housesByWorldAndId = await tibiaAPI.houses.getByWorldAndId('Lutabra', '40211')

```

**News**

```js

let latestNews = await tibiaAPI.news.getLatestNews()
let newsStickers = await tibiaAPI.news.getNewsTickers()
let newById = await tibiaAPI.news.getNewsById('3575')

```

**Worlds**


```js

let allWorlds = await tibiaAPI.worlds.getAll()
let worldByName = await tibiaAPI.worlds.getByName('Lutabra')

```

**Author**
- [Gabriell Huver](https://github.com/gabriellhuver)
- Based on [https://tibiadata.com/](https://tibiadata.com/)

---
_Source: https://npm.io/package/tibia-data-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
