Riot Api Java Versions Save

Riot Games API Java Library

4.3.0

4 years ago

This version adds support for the new league endpoints and deprecates old ones, that will soon no longer be supported by the Riot Api.

4.2.0

5 years ago

Moving to Riot Api v4

This new release adds support for the new Riot Api v4 endpoints. Please note that many of the Riot Api v4 endpoint calls are incompatible to the old v3 calls. Most notably, all summonerIds and accountIds are now Strings and unique for each application. Also there is now a new puuid field to summoners which isn't used much just yet, but will play a significant role for future Riot Api endpoints. There are also a number of changes to leagues with the new field position, and a couple new endpoints. Please refer to the official Riot Api and their announcements and documentation for further information on these changes.

4.1.0

5 years ago

Updates:

  • Added support for Runes Reforged
  • Added support for Third-Party-Code v3
  • Updated tournament endpoints

Misc Enhancements:

  • Added BufferedRateLimitHandler (not used by default)
  • Renamed getLeagueBySummonerId to getLeaguesBySummonerId for consistency
  • Updated javadoc for static-data methods
  • Deprecated getRecentMatchListByAccountId()
  • Added getLeagueById() and deprecated getLeaguesBySummonerId()
  • Adjusted getCurrentGame() dto fields for new runes
  • Removed support for old runes and masteries endpoints
  • Added leagueId to LeaguePosition dto
  • README updates (blessed by the almighty Rito Tuxedo)
  • Fixed error handling for unexpected error responses

Bugfixes:

  • Fixed rare IllegalThreadStateException
  • Fixed rare NullPointerException when failing to get error stream
  • Fixed Java 7 i dot problem (see related thread on stackoverflow, mentioning the changes in java7 https://stackoverflow.com/a/23524516/2015253)

4.0.1

6 years ago

Custom rate limit handling

You can now use your own RateLimitHandler to use custom rate limiting logic that suits your needs. By default the DefaultRateLimitHandler is used which works exactly like the built-in rate limit logic before this update. If you did not explicitly use setRespectRateLimits(false), no change should be required.

If you previously used the option setRespectRateLimits(false) to disable the built-in rate limiting logic, you can now use the option setRateLimitHandler(null) to achieve the same results. The option setRespectRateLimits() has been removed.

Examples on how to create a custom RateLimitHandler will come soon.

Other changes

  • Fixed a few minor bugs relating to static data and the match endpoint.

4.0.0

6 years ago

Riot Games retired the v1/v2 API endpoints in favor of their new v3 API endpoints, so we needed to come up with a major update to support all those changes.

Highlights of version 4.0.0 include:

  • Added support for all the new and updated Riot API methods
  • Added support for asynchronous requests
  • Added timeout option for requests
  • Completely overhauled code structure
  • Various other additions and bugfixes

Due to the nature of Riot's API changes, most API methods are now incompatible with the previous ones. However, we tried to implement the wrapper methods as close as possible to the official documentation, and included javadoc for all methods, so hopefully you will get along well with these changes.

If you have trouble upgrading your project to riot-api-java 4.0.0, please refer to the included examples. If you still have trouble, feel free to open an issue.

v3.9.0

8 years ago

Champion Mastery API

This library now supports the recently announced Champion Mastery API.

New Methods

The following new methods (and their overloaded equivalents) have been added: getChampionMastery(PlatformId platformId, long summonerId, long championId) getChampionMasteries(PlatformId platformId, long summonerId) getChampionMasteryScore(PlatformId platformId, long summonerId) getTopChampionMasteries(PlatformId platformId, long summonerId, int count)

Documentation

The javadoc has recently been overhauled. You can check it out here.

v3.8.2

8 years ago

Patch update

  • Package names have been updated to fit traditional package naming conventions.
  • Other internal improvements for request code.

Note: Existing code may need to be updated to use this release.

v3.8.1

8 years ago

Bug Fix

Non-Tournament API requests should no longer return BAD REQUESTS for no reason. ;)

v3.8.0

8 years ago

Tournaments API

Support for the recently released Tournaments API has been added

New Methods

The following new methods have been added:

tournament-provider-v1


POST /tournament/public/v1/provider
  • createProvider(Region region, String callbackUrl)

POST /tournament/public/v1/tournament
  • createTournament(String tournamentName, int providerId)

POST /tournament/public/v1/code
  • createTournamentCodes(int tournamentId, int count, int teamSize, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, String metaData, long... allowedSummonerIds)

GET /tournament/public/v1/code/{tournamentCode}
  • getTournamentCode(String tournamentCode)

GET /tournament/public/v1/lobby/events/by-code/{tournamentCode}
  • getLobbyEventsByTournament(String tournamentCode)

PUT /tournament/public/v1/code/{tournamentCode}
  • updateTournamentCode(String tournamentCode, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, long... allowedSummonerIds)

match-v2.2


GET /api/lol/{region}/v2.2/match/by-tournament/{tournamentCode}/ids
  • getMatchesByTournament(Region region, String tournamentCode)

GET /api/lol/{region}/v2.2/match/for-tournament/{matchId}
  • getMatchForTournament(Region region, long matchId, String tournamentCode)

Example Usage

import java.util.List;
import constant.*;
import main.java.riotapi.*;
import dto.Tournament.TournamentCode;


public class LeagueApp {

    public static void main(String[] args) throws RiotApiException {

        RiotApi api = new RiotApi("<API-KEY-HERE>", "<TOURNAMENT-KEY-HERE>", Region.NA);

        // Create a tournament provider for the NA region, and provide a callback URL to which tournament game results in this region will be posted.
        int providerId = api.createProvider(Region.NA, "https://example.com");

        // Create a tournament under this provider named "Test Tournament".
        int tournamentId = api.createTournament("Test Tournament", providerId);

        /* Create a tournament code for a lobby with the following settings:
            - Team Size: 5
            - Map Type: Summoner's Rift
            - Pick Type: Blind Pick
            - Spectator Type: All
        */
        String tournamentCode = api.createTournamentCode(tournamentId, 5, TournamentMap.SUMMONERS_RIFT, PickType.BLIND_PICK, SpectatorType.ALL);

        System.out.println("TournamentCode: " + tournamentCode);

        // Get data for the tournament code and print the lobby name
        TournamentCode tournamentCodeData = api.getTournamentCode(tournamentCode);
        System.out.println("Lobby Name: " + tournamentCodeData.getLobbyName());
    }
}

Output

TournamentCode: NA0418f-13ea0635-63d0-4d55-aaf2-849763e7c6e3
Lobby Name: cf74243d-5e5c-49ef-96d5-427995179de1

v3.7.1

8 years ago

Preseason and Season 6

  • Preseason and Season 6 constants have been added.
  • Current season has been updated to Preseason 6.

New team methods

The following methods have been added -

  • getTeamByTeamId(Region, String)
  • getTeamByTeamId(String)
  • getTeamsByTeamIds(Region, String)
  • getTeamsByTeamIds(String)

Bug fixes

  • Match endpoint should now properly return timeline data.
  • getSummonerByName() should return a valid response, regardless of summoner name format.