2.4.0 • Published 1 month ago

osu-web.js v2.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

About

osu.js is an unofficial Javascript and Typescript SDK for the browser-facing portion of osu! with type safety in mind.

Why this API wrapper?

  • Extremely lightweight (less than 6kb when minified + gzipped).
  • Supports both versions of the API.
  • Every response from the APIs are fully typed.
  • Handles errors in a developer-friendly way.
  • Fully documented in its own website.
  • In addition to the API wrapping, it includes some extra utilities.

Installation

# npm
npm i osu-web.js
# yarn
yarn add osu-web.js
# pnpm
pnpm add osu-web.js

Quickstart

import { Client, LegacyClient } from 'osu-web.js';

// Client for the current API (API v2)
const client = new Client('OAUTH ACCESS TOKEN');
// Client for the legacy API (API v1)
const legacy = new LegacyClient('API KEY');

// Get a user

// API v2
let v2User = await client.users.getUser(14544646, {
  urlParams: {
    mode: 'osu'
  }
});

// API v1
let v1User = await legacy.getUser({
  u: 14544646,
  m: 'osu'
});

Coverage

osu.js has 100% coverage over the legacy API.

For the current API, all documented endpoints with a GET request have been implemented and tested. All endpoints with POST and PATCH requests have been implemented, but most aren't tested. None of the undocumented endpoints have been implemented.

Links

Project

Other

Contributing

Read CONTRIBUTING.md

2.4.0

1 month ago

2.3.1

1 month ago

2.3.0

2 months ago

2.2.0

3 months ago

2.1.0

3 months ago

2.0.2

3 months ago

2.0.1

3 months ago

2.0.0

3 months ago

1.4.0

5 months ago

1.3.1

8 months ago

1.2.3

10 months ago

1.3.0

9 months ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago