# beastsaber-api

> BeastSaber scrapping API wrapper

Latest version **2.2.1** (published 2021-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install beastsaber-api
pnpm add beastsaber-api
yarn add beastsaber-api
bun add beastsaber-api
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2021-12-11 |
| First published | 2021-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 34.6 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | kuba2k2 |
| Maintainers | kuba2k2 |
| Keywords | beastsaber, bsaber, bsaber.com, beatsaber |

## Links

- npm: https://www.npmjs.com/package/beastsaber-api
- Repository: https://github.com/kuba2k2/beastsaber-api
- Issues: https://github.com/kuba2k2/beastsaber-api/issues
- npm.io page: https://npm.io/package/beastsaber-api

## Dependencies (5)

- [axios](https://npm.io/package/axios.md) ^0.24.0
- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [tough-cookie](https://npm.io/package/tough-cookie.md) ^4.0.0
- [node-html-parser](https://npm.io/package/node-html-parser.md) ^5.1.0
- [axios-cookiejar-support](https://npm.io/package/axios-cookiejar-support.md) ^2.0.0

## Recent versions

- 2.2.1 (latest) — 2021-12-11
- 2.2.0 — 2021-12-11
- 2.1.0 — 2021-11-29
- 2.0.0 — 2021-11-29
- 1.1.0 — 2021-11-28
- 1.0.0 — 2021-11-28

## README

# beastsaber-api
BeastSaber scrapping API wrapper

![npm](https://img.shields.io/npm/v/beastsaber-api?logo=npm&style=for-the-badge)


## Installation

```sh
npm install beastsaber-api
```

## Usage

```js
const BeastSaber = require('beastsaber-api')

const api = new BeastSaber()

const map = await api.getMapByKey("1d62f")
const map = await api.getMapById(1694841)

const maps = await api.getMaps({
    sortOrder: "new",
    page: 1,
    curatorOnly: true,
})
const maps = await api.getPlaylistMaps("alphabeats-monstercat-music-pack")
const maps = await api.getUploadedBy("smokeybacon")
const maps = await api.getBookmarkedBy("nitronikexe")
const maps = await api.getMostReviewed(/*page*/ 3)
const maps = await api.getTopUserReviewsAll()

// bookmark a map
await api.bookmarkAdd(map.id)

// advanced: set a custom request handler
// may be needed to use login operations in a browser, where a standard CORS proxy does not forward cookies
// see the built-in AxiosRequestHandler for an implementation example
api.setRequestHandler(handler)

// login
const cookies = await api.login("username", "password")
```

---
_Source: https://npm.io/package/beastsaber-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
