vincevaris / osu4j Goto Github PK
View Code? Open in Web Editor NEWosu!api wrapper for Java
Home Page: http://osu.ppy.sh/
osu!api wrapper for Java
Home Page: http://osu.ppy.sh/
Hello, I'm working with a team of developers for a Discord Server and we may use your library in the future, I wonder what license the project uses? The project seems to be discontinued and we are thinking about creating a fork or contributing directly to the project.
Thank you in advance for your answer!
Problem: Using osu.users.query
with a username that has a non-empty events array produces an NPE.
Steps to reproduce:
The issue also occurs when using the Example demo in the README with a non-empty events username.
I'll attach the test I did below, and some other information:
public class Main {
public static void main(String[] args) {
String username = args[0];
Osu osu = Osu.getAPI(key);
OsuUser osuUser;
try {
System.out.println("Input: " + username);
osuUser = osu.users.query(new EndpointUsers.ArgumentsBuilder(username).build());
} catch (OsuAPIException | NullPointerException e) {
e.printStackTrace();
return;
}
System.out.println(osuUser.getUsername());
}
}
When running with username "cookiezi" (non-empty events)
Input: cookiezi
java.lang.NullPointerException
at com.oopsjpeg.osu4j.OsuUser$Event.<init>(OsuUser.java:224)
at com.oopsjpeg.osu4j.OsuUser.lambda$new$0(OsuUser.java:60)
at java.lang.Iterable.forEach(Iterable.java:75)
at com.oopsjpeg.osu4j.OsuUser.<init>(OsuUser.java:60)
at com.oopsjpeg.osu4j.backend.EndpointUsers.query(EndpointUsers.java:27)
at Main.main(Main.java:15)
When running with username "alzase" (empty events)
Input: alzase
Alzase
Also, here are some photos of the json data for each user at the time that I ran the test:
https://imgur.com/XwQgG1m (cookiezi)
https://imgur.com/lRxWd1E (alzase)
(i'm not 100% certain that the element causing the problem isn't me, but i thought i'd report the issue anyway)
Is this the correct way to import using Maven? My pom is saying Dependency 'com.github.oopsjpeg:osu4j:2.0.1' not found
Tried figuring out myself but I'm half asleep right now so maybe I'm being stupid
<dependency>
<groupId>com.github.oopsjpeg</groupId>
<artifactId>osu4j</artifactId>
<version>2.0.1</version>
</dependency>
The getURL
methods in osu4j use java.net.URL
as their return type. However, this requires the caller to handle a potential java.net.MalformedURLException
. Such an exception is extremely unlikely to occur under the current conditions. Therefore, I propose using plain java.lang.String
instead of java.net.URL
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.