Skip to content
Martin Magyar edited this page Jan 20, 2024 · 6 revisions

Info

Welcome to the beatsaver-api-wrapper wiki! Here you can find all the documentation for beatsaver-api-wrapper. If you find something wrong with the documentation or want some more info on methods or other stuff you can open an issue, create a discussion or contact me.

Installation

The package is available on npm. You can install it using this command:

npm install beatsaver-api-wrapper

Example

import BeatSaverAPI from "beatsaver-api-wrapper";

var bsAPI = new BeatSaverAPI("bsAPIExample/1.0");

var response = await bsAPI.getMapInfo("9e11");

console.log(response);

Documentation

For more detailed information see the BeatSaver API documentation.

API Information

Data is provided by the BeatSaver Public API (api.beatsaver.com).
This API wrapper is based on the BeatSaver API documentation.

The API wrapper only uses axios as a dependency for maximum compatibility with NodeJS or webbrowsers.
Other helper methods will be added later. This is to get data easier instead of the raw API data but raw data will always be an option.
Browser compatibility has not been tested yet but it should work.

Dependencies

Main dependency

  • axios - Make HTTP requests

Test dependencies

  • mocha - API wrapper tests
  • nock - Test network errors

Testing

  1. Clone github repository. git clone https://github.com/martin0300/beatsaver-api-wrapper for beta git clone -b beta https://github.com/martin0300/beatsaver-api-wrapper
  2. Run npm i to install all dependencies.
  3. Run npm test to run all tests. Do not spam this command! You will get rate limited by BeatSaver.

Contact info

Clone this wiki locally