michaelbull / rs-api

An open-source implementation of a web-service client, written in Java, that allows interaction with the various APIs available for the popular MMORPG; RuneScape.
ISC License
34 stars 12 forks source link

Hiscores aren't working? #2

Closed VenomousInc closed 6 years ago

VenomousInc commented 6 years ago

I'm attempting to pull from the hiscores, but it just returns as Optional.empty

        String username = "le me";
        StringBuilder sb = new StringBuilder("Test Command -> ");

        RuneScapeAPI rsa = RuneScapeAPI.createHttp();
        Hiscores hiscores = rsa.hiscores();

        try {
            if(hiscores.playerInformation(username, HiscoreTable.DEFAULT).isPresent()) {
                sb.append(hiscores.playerInformation(username, HiscoreTable.DEFAULT).toString());
            } else {
                sb.append("Can't pull: " + hiscores.playerInformation(username, HiscoreTable.DEFAULT));
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

        System.out.println(sb);
michaelbull commented 6 years ago

Thanks for the bug report, seems like the issue is the new hiscore activities that have been added. I'll push a fix soon.

michaelbull commented 6 years ago

Fixed in v1.1.0