how-many-people-are-bouldering
v1.0.0
Published
An API Client to check how many people are in a bouldering gym (in Germany)
Downloads
25
Maintainers
Readme
How many people are bouldering?
Programmatically find out how many people are in a bouldering gym
Usage
You need node.js and npm
Install with npm install how-many-people-are-bouldering
const Bouldering = require('how-many-people-are-bouldering')
// Bouldering.gyms is an Array of all supported gyms
// you can also find this data in gyms.json
const myFavoriteGym = Bouldering.gyms.find((gym) => gym.name === 'Berlin Magicmountain')
Bouldering.getOccupancy(myFavoriteGym).then((result) => console.log(result))
// Because Berlin Magicmount uses Boulderado's API (myFavoriteGym.api.type === 'boulderado')
// -> the result will be absolute
const exampleAbsoluteResult = {
type: 'absolute',
current: 69,
max: 130,
}
const exampleRelativeResult = {
type: 'relative',
percentage: 15,
}