Class Run


  • public class Run
    extends IdentifiableResource
    A speedrun on SRC.

    This class is immutable and thread-safe.
    • Method Detail

      • setPlayers

        public RunPlayersRequest setPlayers()
        Gets a new RunPlayersRequest builder to set the players on this run.
        Requires a set API key with sufficient permissions to change the players on this run.
        Returns:
        a RunPlayersRequest builder
      • setStatus

        public RunStatusRequest setStatus()
        Gets a new RunStatusRequest builder to change the status of this run.
        Requires an API key with sufficient permissions to reject/verify runs.
        Returns:
        a request builder to set the status
      • getWeblink

        public String getWeblink()
        Returns a String containing the URL of the run on SRC.
        Returns:
        a link to the run
      • getGame

        public String getGame()
        Returns a String containing the ID of this run's game.
        Returns:
        the id of the game this run belongs to
        See Also:
        Game, Spedran.getGame(String)
      • getLevel

        public Optional<String> getLevel()
        Returns an Optional String containing the ID of this run's level. If this run has no associated level, returns an empty Optional.
        Returns:
        an Optional with the ID of this run's level
        See Also:
        Level, Spedran.getLevel(String)
      • getComment

        public Optional<String> getComment()
        Gets the description of this run.
        Returns:
        an Optional with the run comment
      • getStatus

        public RunStatus getStatus()
        Gets the current verification status of this run.
        Returns:
        a RunStatus with verification info
      • getPlayers

        public List<RunPlayer> getPlayers()
        Gets a List of the runners of this run.
        Returns:
        an unmodifiable List of the runners
      • getSubmitTime

        public Optional<Instant> getSubmitTime()
        Returns the Instant that this run was submitted to SRC.
        Returns:
        a Instant
      • getRunTimes

        public RunTimes getRunTimes()
        Gets the times for this run in each timing category.
        Returns:
        a RunTimes object that has timing info
      • getSystem

        public RunSystem getSystem()
        Gets the system that this run was played on.
        Returns:
        a RunSystem object that has system info
      • getSplits

        public Optional<Link> getSplits()
        Gets a link to the API of a splits hosting site. Currently only supports Splits.io.
        Returns:
        an Optional with a Link that contains info about splits
      • getVariableValues

        public Map<String,​String> getVariableValues()
        Returns a Map with each key being a variable ID, and the corresponding value being the variable value ID.
        Returns:
        an unmodifiable Map between variable IDs and variable value IDs