1.1.2 • Published 6 years ago

osupe v1.1.2

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

Osupe

An Lazy and Simple API

Installation

npm install osupe

yarn add osupe

Getting started

Require osupe,

cosnt osuAPI = require('osupe');
const osu = new osuAPI(apikey);

If you do not have an osu APIKey aquire it here, https://osu.ppy.sh/p/api

How to use

osu.getUser('StonicisJuvia', 'osu!', 1).then(u => {
    console.log(u) /* This will return...
        { user_id: '7717859',
  username: 'StonicisJuvia',
  count300: '1524081',
  count100: '556017',
  count50: '106173',
  playcount: '14570',
  ranked_score: '764921049',
  total_score: '5342849308',
  pp_rank: '121976',
  level: '92.0306',
  pp_raw: '1851.84',
  accuracy: '84.85638427734375',
  count_rank_ss: '0',
  count_rank_ssh: '0',
  count_rank_s: '1',
  count_rank_sh: '1',
  count_rank_a: '30',
  country: 'US',
  pp_country_rank: '19386',
  events: [],
  avatar: 'https://a.ppy.sh/7717859?1512593115.jpeg' }
    */
}).catch(err => console.error(err));

// We can also do async/await 

try {
    const info = await osu.getUser('StonicisJuvia');
    console.log(info); // Will return the samething from above.
} catch(e) {
    if (e) console.error(e);
}

Methods

osu.getUser(user, mode, evnt_days) // Will return info on the provided user.
osu.getScores(beatmap_id, user, mode, reults) // Will return scores on the beatmap.
osu.getUserBest(user, mode, limit) // Will return best scores/plays on the User.
osu.getBeatMaps(user, beatmap_id, beatmapset_id, mode, limit) // Will return maps on the current beat map ID.
osu.getUserRecent(user, mode, limit) // Will return the users most recent plays/scores.
osu.getMatch(match_id) // Will return match info.
osu.getReplay(mode, beatmap_id, user) // Will return replay info with the user and beatmap.
1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago