Spedran (past tense of speedrun) is a simple library to interact with Speedrun.com's REST API. It uses Optionals for optional fields and CompletableFutures for asynchronous requests.
For readability and brevity, Speedrun.com will be abbreviated as SRC in the documentation.
Here's a very simple example on how to use Spedran to get the name of a user by ID.
public class GetUserName {
public static void main(String[] args) {
// Get a user with an ID
User user = Spedran.getUser("zx721w08").join();
// Print the user's name
System.out.println(user.getNames().getInternationalName());
// Shut down the library to allow the application to exit
Spedran.shutDown();
}
}
<dependency>
<groupId>com.treescrub</groupId>
<artifactId>spedran</artifactId>
<version>1.0.0</version>
</dependency>
repositories {
mavenCentral()
}
dependencies {
implementation 'com.treescrub:spedran:1.0.0'
}
See the examples directory for example programs.
See the Javadocs for documentation.
- Maven 3.0 or greater
- JDK 11
- Clone the repo
git clone https://github.com/Treescrub/Spedran.git
- Make changes in your preferred editor.
- Use
mvn test
in the project root to compile and test the library.
Distributed under the MIT license, see LICENSE.txt
for more details.
- SRC API official documentation - Mostly up to date, missing pronoun info for users and supporter boost info for games. See issues for API quirks.