https://github.com/cristian-sknz/ousu-api
A Simple osu!API Wrapper
https://github.com/cristian-sknz/ousu-api
Last synced: 3 months ago
JSON representation
A Simple osu!API Wrapper
- Host: GitHub
- URL: https://github.com/cristian-sknz/ousu-api
- Owner: Cristian-Sknz
- License: mit
- Created: 2020-05-03T02:36:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-25T20:10:30.000Z (almost 4 years ago)
- Last Synced: 2025-01-22T20:35:27.096Z (4 months ago)
- Language: Java
- Homepage:
- Size: 267 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OusuAPI - Osu!Api
- A Simple osu!API Wrapper## OsuAPI V2 Version
- This version is a little outdated! I recommend that you use the version below, as it supports versions v1 and v2 of the Osu API.
[OusuAPI](https://github.com/Cristian-Sknz/OusuAPI-v2)## Dependencias
The dependencies are inside build.gradle## Add your dependencies!
[](https://jitpack.io/#Cristian-Sknz/Ousu-Api)
* Gradle```groovy
repositories {
maven { url 'https://jitpack.io' }
}dependencies {
compile 'com.github.Cristian-Sknz:Ousu-Api:v2.0.1.1'
}
```
* Maven
```xml
jitpack.io
https://jitpack.io
}
com.github.Cristian-Sknz
Ousu-Api
c}
```
## Simple Use
I made it pretty simple.```java
OusuAPI api = new OusuAPI("API_KEY");// Requesting a player
Request userRequest = api.getUser("skiincraft", Gamemode.Standard);/* Always remember that a "Request>" Class
* will always make a new request.
* If the request has already been made, check using:
*/
userRequest.wasRequested(); // if requested it will return "true"//Getting information from a player.
User user = userRequest.get();//Print the information obtained
System.out.println("Username: " + user.getUsername());
System.out.println("Ranking: #" + user.getRanking());
System.out.println("PP: " + user.getPP());
```
In the case of beatmaps do
```java
[....]
// Requesting a beatmap
Request beatmapRequest = api.getBeatmap(1018869); // beatmapId// Getting information from a beatmap.
Beatmap beatmap = beatmapRequest.get();
// BeatmapSet beatmapset = api.getBeatmapSet(474376).get(); in the case of beatmapset//Print the information obtained
System.out.println("Title: " + beatmap.getTitle());
System.out.println("Artist: #" + beatmap.getArtist());
System.out.println("Creator: " + beatmap.getCreator());
System.out.println("BMP: " + beatmap.getBPM());
```This project is not complete, I intend to update whenever I can.
Thanks for reading me :D