Coder Social home page Coder Social logo

michaelbull / rs-api Goto Github PK

View Code? Open in Web Editor NEW
33.0 6.0 12.0 427 KB

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.

License: ISC License

Java 100.00%
runescape api java client

rs-api's People

Contributors

joshua-f avatar michaelbull avatar stevesoltys avatar voidstarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rs-api's Issues

Player Information throws exception if experience is zero

java.lang.IllegalArgumentException: Experience must be either -1 (unranked) or positive.
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[guava-19.0.jar:na]
	at com.github.michaelbull.rs.hiscores.Skill.<init>(Skill.java:76) ~[rs-api-1.1.1.jar:na]
	at com.github.michaelbull.rs.hiscores.Skill.fromCsv(Skill.java:44) ~[rs-api-1.1.1.jar:na]
	at com.github.michaelbull.rs.hiscores.Hiscores.readSkills(Hiscores.java:178) ~[rs-api-1.1.1.jar:na]
	at com.github.michaelbull.rs.hiscores.Hiscores.playerInformation(Hiscores.java:220) ~[rs-api-1.1.1.jar:na]

Similar to #4, but for experience. In the CSV, experience is coming back as 0.

I'm guessing this might only apply to OSRS, but I'm not sure.

Add support for OSRS

Add support for OSRS possibly?

@michaelbull If this is something you don't have time for, I'd be willing to add support for it and make a pull request.

Hiscores aren't working?

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);

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.