Documentation ¶
Overview ¶
Package record is an interface to record League of Legends games to a file using data from the spectator endpoint. Most if not all of the methods here will return *RecordingError as the underlying error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("not found") ErrUnknownPlatform = errors.New("unknown platform") )
Error variables to check what errors have occurred.
Functions ¶
func GetPlatformVersion ¶
GetPlatformVersion returns the current version of the specified platform.
func IsValidPlatform ¶
IsValidPlatform returns whether or not a platform is valid (i.e. has an entry in the map of platforms and platform URLs).
func Record ¶
Record starts a new recording that writes into a *recording.Recording and blocks until the recording ends or an error occurs. Note that partial data may be written to the recording, even if the recording was unsuccessful. This partial data can probably be played back. ErrNotFound enclosed in a *RecordingError is returned if there is no game that can be recorded from the provided parameters.
Types ¶
type RecordingError ¶
RecordingError is the error container most, if not all, errors from the methods in the record package will return.
func (*RecordingError) Error ¶
func (r *RecordingError) Error() string
Error formats the error with its stack into a string.