rippleapi

1.1.0 • Public • Published

RippleAPI

RippleAPI is an easy to use JavaScript wrapper for the Ripple API.🎵 I make requests to the Ripple API practically every single day for a various amount of projects, and it was honestly a pain to have to rewrite the same code a billion times. Thus, I've created a library, for myself and others to use.

Usage

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

  • Run npm install rippleapi --save

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

const rippleAPI = require('rippleapi');
 
rippleAPI.ping()
    .then((response) => {
        console.log(response);
    })
    .catch((err) => {
      throw new Error(err);
    });

List of Functions

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

Misc

  • ping(token) - Check the API is alive, and check your token’s (not required) privileges.
  • surprise() - A test API endpoint that spits some random sentences.

Badges

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

Leaderboard

Note: For mode parameters you can specify either: 'mania', 'osu', 'taiko', 'ctb' OR 'all'


Tokens


Users

The following can be used to retrieve only one user:


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


Scores

Note: for mode parameters, you can specify either "osu", "taiko", "mania", "ctb", or "all"


Cheesegull

Note: For gameMode parameters, you can specify either:

A single mode string: 'mania', 'osu', 'taiko' 'ctb', 'all'

OR

An array of modes: ['mania', 'osu', 'taiko', 'ctb', 'all']


Note: For rankedStatus parameters, you can specify either:

A single status string: 'ranked', 'unranked', 'loved', 'graveyard', 'wip', 'pending', 'approved', 'qualified', 'all'

OR

An array of statuses: ['ranked', 'unranked', 'loved', 'graveyard', 'wip', 'pending', 'approved', 'qualified', 'all']


Checklist

For the most part, everything useful is done. Here's a list of things that aren't done.

  • WebSocket API [✗]
  • Documentation [✗]
  • Blog [✗]
  • Requests that require a security key [✗]

LICENSE

MIT License

Copyright (c) 2017 Swan

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.

Dependencies (2)

Dev Dependencies (2)

Package Sidebar

Install

npm i rippleapi

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • swans