Skip to content

TibiaData API written in Golang and deployed in container (which contains v3)

License

Notifications You must be signed in to change notification settings

brunominervino/tibiadata-api-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TibiaData API in Golang

GitHub CI Codecov GitHub go.mod version Docker version Docker size GitHub license

TibiaData API written in Golang and deployed in container (which contains v3).

Current status of v3 is released and information like documentation can be found on docs.tibiadata.com.

Table of Contents

How to use

You can either use it in a Docker container or go download the code and deploy it yourself on any server.

Keep in mind that there are restrictions on tibia.com that might impact the usage of the application being hosted yourself.

Docker

Our images are available on both GitHub Container Registry and Docker Hub.

This is how to pull and run the latest release of TibiaData from GHCR:

docker pull ghcr.io/tibiadata/tibiadata-api-go:latest
docker run -p 127.0.0.1:80:8080/tcp --rm -it ghcr.io/tibiadata/tibiadata-api-go:latest

You can also use Docker Hub to pull your images from.

If you want to run the latest code you can switch from latest to edge.

Docker-compose

This is a simple example on how you can get up and running with TibiaData in docker-compose, which will be running on port 8080 and be exposed locally.

version: "3"

services:
  tibiadata:
    image: ghcr.io/tibiadata/tibiadata-api-go:latest
    restart: always
    environment:
      - TIBIADATA_HOST=tibiadata.example.com
    ports:
      - 8080:8080

Local development

Build the code on your computer

docker build -t tibiadata .

Run your build locally

docker run -p 127.0.0.1:80:8080/tcp --rm -it tibiadata

Environment variables

Information will be added at a later stage.

Deployment note

You should consider to add a layer in front of this application, so you can do caching of endpoints, access controll or what ever your needs are.

We do so at least by using Kong API Gateway, which solves features like caching, rate-limiting, authentication and more.

API documentation

The hosted API documentation for our api.tibiadata.com service can be viewd at docs.tibiadata.com.

There is a swagger-generated documentation available for download on the GitHub Release of the version you are looking for.

Available endpoints

Those are the current existing endpoints.

  • GET /ping
  • GET /health
  • GET /v3/boostablebosses
  • GET /v3/character/:name
  • GET /v3/creature/:race
  • GET /v3/creatures
  • GET /v3/fansites
  • GET /v3/guild/:name
  • GET /v3/guilds/:world
  • GET /v3/highscores/:world/:category/:vocation
  • GET /v3/house/:world/:house_id
  • GET /v3/houses/:world/:town
  • GET /v3/killstatistics/:world
  • GET /v3/news/archive
  • GET /v3/news/archive/:days
  • GET /v3/news/id/:news_id
  • GET /v3/news/latest
  • GET /v3/news/newsticker
  • GET /v3/spell/:spell_id
  • GET /v3/spells
  • GET /v3/world/:name
  • GET /v3/worlds
  • GET /versions

General information

Tibia is a registered trademark of CipSoft GmbH. Tibia and all products related to Tibia are copyright by CipSoft GmbH.

Credits

About

TibiaData API written in Golang and deployed in container (which contains v3)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.6%
  • Dockerfile 0.4%