Constructor
new Client(apiKey, optionsopt) → {Client}
Creates the osu! API client instance.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiKey |
String | The osu! API key. - available from https://osu.ppy.sh/p/api | ||||||||||||||||||||||||||
options |
Object |
<optional> |
Options for the instance.
Properties
|
Properties:
Name | Type | Description |
---|---|---|
user |
UserComponent | The set of functions that are related to the User section. |
beatmaps |
BeatmapComponent | The set of functions that are related to the Beatmap section. |
scores |
ScoresComponent | The set of functions that are related to the Score section. |
replay |
ReplayComponent | The set of functions that are related to the Replay section. |
multi |
MultiComponent | The set of functions that are related to the Multiplayer section. |
apiKey |
String | The osu! API key in use. |
disableRateLimiting |
Boolean | Should ratelimiting be used throughout the client instance. |
requestsPerMinute |
Number | How many requests per minute are allowed if ratelimiting is used. |
parseData |
Boolean | If data should be parsed into our custom nodesu classes. (experimental and could be subject to break) |
Returns:
The osu! API client instance.
- Type
- Client
Methods
raw(endpoint, options) → {Promise.<Object>}
A direct raw API request with a payload of query string options.
Parameters:
Name | Type | Description |
---|---|---|
endpoint |
String | The API endpoint. |
options |
Object | An object of query string options. |
Returns:
The object returned from the API.
- Type
- Promise.<Object>