Skip to content

Alynva/js-habbo-api-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

js-habbo-api-wrapper

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.

How to use it

  1. Download the src/HabboAPI.js
  2. Import it in your sketch
  3. Instantiate the HabboAPI class with your hotel (tested with com and com.br)
  4. 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.

Usage

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...
    });

Objects

An objects list will be available in the repo's wiki.

About

A JavaScript wrapper for the (undocumented) Habbo API

Resources

License

Stars

Watchers

Forks

Packages

No packages published