A JavaScript wrapper for the undocumented Habbo API (inspired by https://github.com/gerbenjacobs/HabboAPI)
See tests/index.html file to examples of this library.
- Download the
src/HabboAPI.js - Import it in your sketch
- Instantiate the
HabboAPIclass with your hotel (tested withcomandcom.br) - Call one of the following methods:
getHabbo(id, useUniqueId = false)getProfile(id)getPhotos(id)getGroup(id)getAchievements(id)
All of these use Promises, in other words, are async and you need to attach an then(func) to the calls and this func will receive the data as parameter.
let api = new HabboAPI("com.br");
api.getHabbo("alynva")
.then(user => {
// Use `user` object here
api.getProfile(user.id)
.then(profile => {
// Use `profile` object here
api.getGroup(profile.groups[0].id)
.then(group => {
// Use `group` objecthere
});
});
// etc...
});An objects list will be available in the repo's wiki.