habinfojs

1.0.5 • Public • Published

Features

  • Create a API instance in the available Hotels
  • Get User Data
  • Get Profile Data
  • Get Badges Data
  • Get Friends Data
  • Get Groups Data
  • Get Rooms Data
  • Get Photos Data

####Installing module

$ npm install habinfojs

####Create instance of API const HabboAPI = require('habinfojs')

####Get Data from specified user

const HabboAPI = require('habinfojs')

module.exports = {

    getAPI: function(hotel, name) {
        const api = new HabboAPI(hotel)
        return api
    },

    getUserID: async function(api, name) {
        let d
        await api.getHabbo(name)
        .then(user => {
            d = user
        })
        return d._data.uniqueId
    },

    getHabbo: async function(api, name) {
        let d
        await api.getHabbo(name)
        .then(user => {
            d = user
        })
        return d._data
    },

    getProfile: async function(api, id) {
        let d
        await api.getProfile(id)
        .then(profile => {
            d = profile
        })
        return d._data
    },

    getPhotos: async function(api, id) {
        let d
        await api.getPhotos(id)
        .then(photos => {
            d = photos
        })
        
        return d
    },

    getAchievements: async function(api, id) {
        let d
        await api.getAchievements(id)
        .then(achievements => {
            d = achievements
        })
        return d
    }
}

Readme

Keywords

Package Sidebar

Install

npm i habinfojs

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

8.72 kB

Total Files

11

Last publish

Collaborators

  • davidml