Giter VIP home page Giter VIP logo

osu4j's Issues

Why do `getURL` methods use `java.net.URL`?

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.

What's license the project use ?

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!

Not able to import via maven

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>

Issue with provided jar in release 2.0.0.1: Users with non-empty "events" array will produce an NPE when using users.query

Problem: Using osu.users.query with a username that has a non-empty events array produces an NPE.

Steps to reproduce:

  1. Create new Osu API instance with Osu#getAPI
  2. Get new OsuUser by using osu.users.query
  3. Use username that has non-empty events array (one of the top players usually has something in there, cookiezi for example)
  4. Attempt to run program

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.