Easy to use Tibia API.
npm install tibia-api
import TibiaAPI from 'tibia-api';
const tibiaAPI = new TibiaAPI({ worldName: 'Funera' });
tibiaAPI.getOnlinePlayers().then((result) => {
console.log(result);
})
getOnlinePlayers(worldName)
- Method to get all the online players worldName
is optional, but be sure to pass a worldName
when you initialize the function.
Tibia is taking some minutes to refresh the online list, so better use getCharacterInformation
Example response
{
{ name: String, level: String, vocation: String },
}
`getCharacterInformation(characterName)` - Method to get the whole character information by a giving name, like kills and online
**Example response**
{ kills: [ { name: String, timeAgo: String, killedBy: String }, ...deaths ], characters: [ { name: String, world: String, isOnline: Boolean } ] }
`getGuildInformation({ guildUrl })` - Method to get the guild information by a giving guild URL or guild name.
**Example response**
[ members: [{ rank: ' ', name: String, vocation: String, level: String, joiningDate: String, status: String, isOnline: Boolean }], invitedMembers: [{ name: String, invitationDate: String }], guildMembersOnline: Number, guildInformation: String ]
## TODO
- [ ] Tests