Giter Site home page Giter Site logo

tibia-api's Introduction

Tibia Character API

API Rest to consult informations about tibia characters

How it works

Unfortunally, Cipsoft doens't provide an API to get any information about Tibia Chararacters. So, I've created this API which receives a character name and scrapps tibia website bringing general informations about the character.

Tecnhologies used

The first version was wrote using a simple POST. But now, I refactored to use GraphQL. You can use the panel to check it out the informations and make queries or you can consume it by a HTTP POST. Following the explanation to use both methods.

API

GraphQL Panel

To consult a player informations using this panel, you must write a query passing the character name and which informations you'd like to receive, for example:

query{
  character(characterName: "mad dentist") {
    name
    sex
    vocation
    level
    achievmentPoint
    world
    residence
    lastLogin
    accountStatus
  }
}

And you'll receive a JSON like this: Imgur

REST: Post

To consume this API using HTTP POST, you must send a header requiring an 'application/json' and send a JSON with one key (query) and the same query made on GraphQL panel.

{
	"query": "{ character(characterName: \"mad dentist\") {name sex vocation level achievmentPoint world residence lastLogin } }"
}

How we can see, it's the same query, but just in one line.

Response

Character Info

{
    "data": {
        "character": {
            "name": "String",
            "sex": "String",
            "vocation": "String",
            "level": "String",
            "achievmentPoint": "String",
            "world": "String",
            "residence": "String",
            "lastLogin": "String"
        }
    }
}

Contributing

Want to contribute? Follow these recommendations.

LICENCE

MIT License © Raul F. de Melo

tibia-api's People

Contributors

raulfdm avatar barrosfilipe avatar

Watchers

James Cloos 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.