struct Srcom::Run::Submission

Included Modules

Defined in:

srcr/mappings/run/submission/submission.cr

Constant Summary

Log = Srcom::Log.for("run.submission")

Constructors

Instance Method Summary

Constructor Detail

def self.new(category : String, times : Hash(String, Float64 | Time::Span), level : String | Nil = nil, date : Time | Nil = nil, region : String | Nil = nil, platform : String | Nil = nil, verified : Bool = false, players : Array(Submission::Player) | Nil = nil, emulated : Bool = false, video : String | Nil = nil, comment : String | Nil = nil, splitsio : String | Nil = nil, variables : Hash(String, Submission::Variable) | Nil = nil) #

Creates a run submission with the given properties (mind the notes below!).

Valid keys for the times hash are: "realtime", "realtime_noloads", or "ingame"

date refers to the date the run was played on. If not provided the current date will be assumed to be the date the run was played on.

region and platform must be IDs.

Valid values for splitsio are a splitsio ID (such as "7h47") or a link to a link to the splits on splits.io, such as "https://splits.io/7h47".

NOTE Unless the user submitting is a moderator of the game the run is being submitted to (or a global moderator) the fields #players and #verified must not be set! If players is not provided, the user authenticated for the run submission will be assumed to be the only player of the run.

NOTE At least one of the timing methods specified in times must be one of the timing methods supported by the game the run is being submit to.


[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def category : String #

[View source]
def comment : String | Nil #

[View source]
def date : Time | Nil #

[View source]
def emulated : Bool #

[View source]
def level : String | Nil #

[View source]
def platform : String | Nil #

[View source]
def players : Array(Submission::Player) | Nil #

[View source]
def region : String | Nil #

[View source]
def splitsio : String | Nil #

[View source]
def times : Hash(String, Float64) #

[View source]
def variables : Hash(String, Submission::Variable) | Nil #

[View source]
def verified : Bool #

[View source]
def video : String | Nil #

[View source]