1.2.7 • Published 4 years ago

aminosu-api v1.2.7

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

AminosuAPI

AminosuAPI is an easy-to-use NodeJS wrapper for the Aminosu! API.

Usage

It's extremely simple to start using AminosuAPI just by following the steps below.

  • Run npm install aminosu-api --save

All functions follow the same format listed below. It should be fairly easy to use.

const aminosuAPI = require('aminosu-api');

aminosuAPI.ping()
    .then((response) => {
        console.log(response);
    })
    .catch((err) => {
      throw new Error(err);
    });

List of code-examples

If you don't know how to use different functions then click here to get to a list of examples for each function.

List of Functions

There's a ton of different endpoints on the Aminosu API that is currently supported. Here are the following:

Misc

  • ping() - Check if the API is alive.
  • surprise() - A test API endpoint that spits some random sentences.

Badges

  • getBadges() - Retrieve a list of all the current badges on Aminosu.

Leaderboard

Note: For mode parameters you can specify either: 'mania', 'osu', 'taiko', 'ctb' OR 'all' Note: Relax must be either: 0 OR 1. Relax is 0 by default. Note: Limit is the number of users you wanna get. Limit is 10 by default.

  • getLeaderboard(mode, page, relax, limit) - Retrieve a list of all the current leaderboards on Aminosu.

Users

The following can be used to retrieve only one user: Note: Relax must be either: 0 OR 1. Relax is 0 by default. Note: Limit is the number of users you wanna get. Limit is 10 by default.

  • getUserById(userId) - Retrieves information about one user by their user Id.
  • getUserByName(username) - Retrieves information about one user by their username.
  • getFullUserById(id, relax) - Retrieves Full information about one user by their user id.
  • getFullUserByName(username, relax) - Retrieves Full information about one user by their username.
  • getIdOfUser(username) - Retrieves an ID of an user, knowing their username. Simple as that.
  • getUserpageById(id) - Retrieve the userpage of an user, in BBCode.
  • lookupUser(partOfUsername, limit) - Search for an user knowing (part of) their username. This is mainly used for Aminosu’s user search function, in the navbar.

The following can be used to retrieve one or more users:

  • getUserByNameAka(nameAka, page) - Retrieves a list of users by their name_aka.
  • getUsersByCountry(country, page, limit) - Retrieves a list of users by their country.
  • getUsersByPrivilegeGroup(privilegeGroup, page, limit) - Retrieves a list of users by their Privilege Group.
  • getUsersById(userIds) - Retrieves a list of users by their ids.
  • getUsersByName(usernames) - Retrieves a list of users by their usernames.
  • getUsersByNameAka(nameAkas) - Retrieves a list of users by querying for multiple name_akas.
  • getUsersByCountries(countries) - Retrieves a list of users by querying for multiple countries.

Clans

  • getClanById(clanId) - Retrieves information about one clan by its id.
  • getClanByName(clanname) - Retrieves information about one clan by its name.
  • getClanStats(clanId) - Retrieves statistics about one clan by its id.
  • getClanMembers(clanId) - Retrieves all members in a clan by its id.

Scores

Note: for mode parameters, you can specify either "osu", "taiko", "mania", "ctb", or "all" Note: Relax must be either: 0 OR 1. Relax is 0 by default. Note: Limit is the number of scores you wanna get. Limit is 10 by default.

  • getBeatmapScores(beatmapMd5 OR beatmapId, mode, limit) - Retrieves scores for a certain beatmap.
  • getUserBest(username OR userId, mode, relax, limit) - Retrieves a user's best scores.
  • getUserRecent(username OR userId, mode, relax, limit) - Retrieves a user's recent scores.

Cheesegull

  • getBeatmapInfo(beatmapId) - Retrieves information about a beatmap with the given ID.
  • getBeatmapSetInfo(beatmapSetId) - Retrieve information about a beatmapset, as well as its children, knowing its ID.

LICENSE

MIT License

Copyright (c) 2020 Akira Kurisu

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago