Skip to content

Commit

Permalink
Fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
KaluNight authored and stelar7 committed Apr 8, 2024
1 parent dd82484 commit 332b497
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import no.stelar7.api.r4j.basic.constants.api.regions.LeagueShard;
import no.stelar7.api.r4j.basic.utils.Pair;
import no.stelar7.api.r4j.pojo.lol.spectator.*;
import no.stelar7.api.r4j.pojo.lol.spectator.v5.SpectatorConnectionInformation;

import java.util.*;

public final class SpectatorV5API
Expand Down Expand Up @@ -74,7 +72,7 @@ public List<SpectatorGameInfo> getFeaturedGames(LeagueShard server)
* @param puuid the puuid
* @return SpectatorGameInfo
*/
public SpectatorConnectionInformation getCurrentGame(LeagueShard server, String puuid)
public SpectatorGameInfo getCurrentGame(LeagueShard server, String puuid)
{
DataCallBuilder builder = new DataCallBuilder().withURLParameter(Constants.PUUID_ID_PLACEHOLDER, puuid)
.withEndpoint(URLEndpoint.V5_SPECTATOR_CURRENT)
Expand All @@ -92,7 +90,7 @@ public SpectatorConnectionInformation getCurrentGame(LeagueShard server, String

try
{
SpectatorConnectionInformation fg = (SpectatorConnectionInformation) builder.build();
SpectatorGameInfo fg = (SpectatorGameInfo) builder.build();

data.put("value", fg);
DataCall.getCacheProvider().store(URLEndpoint.V5_SPECTATOR_CURRENT, data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import no.stelar7.api.r4j.basic.constants.types.ApiKeyType;
import no.stelar7.api.r4j.impl.R4J;
import no.stelar7.api.r4j.impl.lol.raw.SpectatorV5API;
import no.stelar7.api.r4j.pojo.lol.spectator.v5.SpectatorConnectionInformation;
import no.stelar7.api.r4j.pojo.lol.spectator.SpectatorGameInfo;
import no.stelar7.api.r4j.pojo.shared.RiotAccount;
import no.stelar7.api.r4j.tests.SecretFile;

Expand All @@ -29,7 +29,7 @@ public void testCurrentGame()
SpectatorV5API api = r4J.getLoLAPI().getSpectatorV5API();
RiotAccount acc = r4J.getAccountAPI().getAccountByTag(RegionShard.EUROPE, "Incandescence33", "EUW", ApiKeyType.LOL);

SpectatorConnectionInformation currentGame = api.getCurrentGame(LeagueShard.EUW1, acc.getPUUID());
SpectatorGameInfo currentGame = api.getCurrentGame(LeagueShard.EUW1, acc.getPUUID());
System.out.println(currentGame);
}
}

0 comments on commit 332b497

Please sign in to comment.