ddr

package
v0.0.0-...-cb6fcfe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2020 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDdrRouter

func CreateDdrRouter() *mux.Router

CreateDdrRouter will create a mux router to be attached to the main router, prefixed with '/ddr'.

func ProfileGet

func ProfileGet(rw http.ResponseWriter, r *http.Request)

ProfileGet will retrieve formatted profile details for the current user.

func ProfileRefreshPatch

func ProfileRefreshPatch(rw http.ResponseWriter, r *http.Request)

ProfileRefreshPatch will perform a full refresh of all song difficulties in the database for the user. This is an expensive operation and should be used sparingly.

func ProfileUpdatePatch

func ProfileUpdatePatch(rw http.ResponseWriter, r *http.Request)

ProfileUpdatePatch will check the past 50 plays for the user. These scores will be added to the database, and then the difficulty details will be updated for the user. This should be used in favour of ProfileRefreshPatch where possible.

func ProfileWorkoutDataGet

func ProfileWorkoutDataGet(rw http.ResponseWriter, r *http.Request)

func SongJacketGet

func SongJacketGet(rw http.ResponseWriter, r *http.Request)

func SongScoresGet

func SongScoresGet(rw http.ResponseWriter, r *http.Request)

func SongsGet

func SongsGet(rw http.ResponseWriter, r *http.Request)

SongsGet will retrieve a list of all songs from the database. Data returned will not include the jacket image, which should be retrieved with the `/ddr/songs/images` endpoint.

func SongsPatch

func SongsPatch(rw http.ResponseWriter, r *http.Request)

SongsPatch will attempt to find which songs on eagate are not yet in the database, and proceed to add songs as their difficulties to the database. TODO: if this fails after adding the songs to the database, new difficulties will be missing with no current recovery method.

func SongsReloadPatch

func SongsReloadPatch(rw http.ResponseWriter, r *http.Request)

func SongsScoresExtendedGet

func SongsScoresExtendedGet(rw http.ResponseWriter, r *http.Request)

SongScoresGet will retrieve score details for the user defined within the request JWT.

func SongsScoresGet

func SongsScoresGet(rw http.ResponseWriter, r *http.Request)

SongScoresGet will retrieve score details for the user defined within the request JWT.

func UpdatePlayerProfile

func UpdatePlayerProfile(user user_models.User, client util.EaClient) (err bst_models.Error)

updatePlayerProfile will do a full update of the user's profile. This includes updating the player information, the playcount, adding the recent scores and updating song statistics. TODO: if the user has played more than 50 songs, this will not update unknown song statistics. This can currently still be achieved manually.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL