Class SubmitRunRequest
- java.lang.Object
-
- com.treescrub.spedran.SingleResourceRequest<T>
-
- com.treescrub.spedran.ModifyResourceRequest<Run>
-
- com.treescrub.spedran.requests.builders.run.SubmitRunRequest
-
public class SubmitRunRequest extends ModifyResourceRequest<Run>
A request builder to submit aRunto SRC.
-
-
Constructor Summary
Constructors Constructor Description SubmitRunRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubmitRunRequestcategory(Category category)Sets theCategoryfor the run.SubmitRunRequestcategory(String categoryId)Sets theCategoryfor the run.SubmitRunRequestcomment(String comment)Sets the comment/description for the run.SubmitRunRequestcustomVariable(Variable variable, String valueText)Sets the value for aVariablewith custom user defined text.SubmitRunRequestcustomVariable(String variableId, String valueText)Sets the value for aVariablewith custom user defined text.SubmitRunRequestdate(LocalDate runDate)Sets the date that this run was played on.SubmitRunRequestemulated(boolean isEmulated)Sets whether the run was played on an emulator.SubmitRunRequestguestPlayer(Guest guest)Adds aGuestthat participated in the run.SubmitRunRequestguestPlayer(String guestName)Adds aGuestthat participated in the run.SubmitRunRequestingameTime(Duration ingameTime)Sets the ingame time (IGT) for the run.SubmitRunRequestlevel(Level level)Sets theLevelfor the run.SubmitRunRequestlevel(String levelId)Sets theLevelfor the run.SubmitRunRequestplatform(Platform platform)Sets thePlatformfor the run.SubmitRunRequestplatform(String platformId)Sets thePlatformfor the run.SubmitRunRequestrealTime(Duration realTime)Sets the realtime (RTA) time for the run.SubmitRunRequestrealTimeNoLoads(Duration realTimeNoLoads)Sets the realtime (RTA) with loads removed time for the run.SubmitRunRequestregion(Region region)Sets theRegiongame version for the run.SubmitRunRequestregion(String regionId)Sets theRegiongame version for the run.SubmitRunRequestsplitsIO(String splitsIO)Sets the ID or URL for the splits.io run page.SubmitRunRequestuserPlayer(User user)Adds aUserthat participated in the run.SubmitRunRequestuserPlayer(String userId)Adds aUserthat participated in the run.SubmitRunRequestvariable(Variable variable, String valueId)Sets the value for aVariablewith a predefined value ID.SubmitRunRequestvariable(String variableId, String valueId)Sets the value for aVariablewith a predefined value ID.SubmitRunRequestverified()Sets the run to be immediately verified when submitted.SubmitRunRequestvideo(String videoUrl)Sets the video URL for the run.-
Methods inherited from class com.treescrub.spedran.ModifyResourceRequest
complete
-
-
-
-
Method Detail
-
category
public SubmitRunRequest category(Category category)
Sets theCategoryfor the run.- Parameters:
category- the category that the run is in- Returns:
- this builder object
-
category
public SubmitRunRequest category(String categoryId)
Sets theCategoryfor the run.- Parameters:
categoryId- the category ID that the run is in- Returns:
- this builder object
-
level
public SubmitRunRequest level(Level level)
Sets theLevelfor the run.- Parameters:
level- the level that the run is on- Returns:
- this builder object
-
level
public SubmitRunRequest level(String levelId)
Sets theLevelfor the run.- Parameters:
levelId- the level ID that the run is on- Returns:
- this builder object
-
date
public SubmitRunRequest date(LocalDate runDate)
Sets the date that this run was played on.- Parameters:
runDate- the date this run was ran on- Returns:
- this builder object
-
region
public SubmitRunRequest region(Region region)
Sets theRegiongame version for the run.- Parameters:
region- the region of the game for the run- Returns:
- this builder object
-
region
public SubmitRunRequest region(String regionId)
Sets theRegiongame version for the run.- Parameters:
regionId- the region ID of the game for the run- Returns:
- this builder object
-
platform
public SubmitRunRequest platform(Platform platform)
Sets thePlatformfor the run.- Parameters:
platform- the platform that this run was played on- Returns:
- this builder object
-
platform
public SubmitRunRequest platform(String platformId)
Sets thePlatformfor the run.- Parameters:
platformId- the platform ID that this run was played on- Returns:
- this builder object
-
verified
public SubmitRunRequest verified()
Sets the run to be immediately verified when submitted.
Requires permissions to verify runs for the leaderboard that the run is being submitted to.- Returns:
- this builder object
-
realTime
public SubmitRunRequest realTime(Duration realTime)
Sets the realtime (RTA) time for the run.- Parameters:
realTime- aDurationwith the RTA time- Returns:
- this builder object
-
realTimeNoLoads
public SubmitRunRequest realTimeNoLoads(Duration realTimeNoLoads)
Sets the realtime (RTA) with loads removed time for the run.- Parameters:
realTimeNoLoads- aDurationwith the RTA no loads time- Returns:
- this builder object
-
ingameTime
public SubmitRunRequest ingameTime(Duration ingameTime)
Sets the ingame time (IGT) for the run.- Parameters:
ingameTime- aDurationwith the ingame time- Returns:
- this builder object
-
userPlayer
public SubmitRunRequest userPlayer(User user)
Adds aUserthat participated in the run.- Parameters:
user- a user that is a player in the run- Returns:
- this builder object
-
userPlayer
public SubmitRunRequest userPlayer(String userId)
Adds aUserthat participated in the run.- Parameters:
userId- the ID of a user that is a player in the run- Returns:
- this builder object
-
guestPlayer
public SubmitRunRequest guestPlayer(Guest guest)
Adds aGuestthat participated in the run.- Parameters:
guest- a guest that is a player in the run- Returns:
- this builder object
-
guestPlayer
public SubmitRunRequest guestPlayer(String guestName)
Adds aGuestthat participated in the run.- Parameters:
guestName- the name of a guest that is a player in the run- Returns:
- this builder object
-
emulated
public SubmitRunRequest emulated(boolean isEmulated)
Sets whether the run was played on an emulator.- Parameters:
isEmulated- whether an emulator was used- Returns:
- this builder object
-
video
public SubmitRunRequest video(String videoUrl)
Sets the video URL for the run.- Parameters:
videoUrl- aStringwith a URL to a video hosting site- Returns:
- this builder object
-
comment
public SubmitRunRequest comment(String comment)
Sets the comment/description for the run.- Parameters:
comment- aStringwith the custom comment- Returns:
- this builder object
-
splitsIO
public SubmitRunRequest splitsIO(String splitsIO)
Sets the ID or URL for the splits.io run page.- Parameters:
splitsIO- aStringwith an ID or URL to a splits.io page- Returns:
- this builder object
-
variable
public SubmitRunRequest variable(Variable variable, String valueId)
Sets the value for aVariablewith a predefined value ID.- Parameters:
variable- the variable to set for the runvalueId- the value ID to set for the variable- Returns:
- this builder object
-
variable
public SubmitRunRequest variable(String variableId, String valueId)
Sets the value for aVariablewith a predefined value ID.- Parameters:
variableId- the variable ID to set for the runvalueId- the value ID to set for the variable- Returns:
- this builder object
-
customVariable
public SubmitRunRequest customVariable(Variable variable, String valueText)
Sets the value for aVariablewith custom user defined text.- Parameters:
variable- the variable to set for the runvalueText- the value to set for the variable- Returns:
- this builder object
-
customVariable
public SubmitRunRequest customVariable(String variableId, String valueText)
Sets the value for aVariablewith custom user defined text.- Parameters:
variableId- the variable ID to set for the runvalueText- the value to set for the variable- Returns:
- this builder object
-
-