Giter Club home page Giter Club logo

tibia-data-api's Introduction

Tibia Data API

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

Modules:

  • Characters
  • Guilds
  • Highscores
  • Houses
  • News
  • Worlds

Installation

Tibia data API requires Node.js to run.

$ npm install tibia-data-api --save

How To use

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

let characterInfo = await tibiaAPI.characters.getInfoByName('Akox Shena')

Guilds

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.

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)

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

let latestNews = await tibiaAPI.news.getLatestNews()
let newsStickers = await tibiaAPI.news.getNewsTickers()
let newById = await tibiaAPI.news.getNewsById('3575')

Worlds

let allWorlds = await tibiaAPI.worlds.getAll()
let worldByName = await tibiaAPI.worlds.getByName('Lutabra')

Author

tibia-data-api's People

Contributors

gabriellhuver avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.