Documentation ¶
Index ¶
- func CreateDdrRouter() *mux.Router
- func ProfileGet(rw http.ResponseWriter, r *http.Request)
- func ProfileRefreshPatch(rw http.ResponseWriter, r *http.Request)
- func ProfileUpdatePatch(rw http.ResponseWriter, r *http.Request)
- func ProfileWorkoutDataGet(rw http.ResponseWriter, r *http.Request)
- func SongJacketGet(rw http.ResponseWriter, r *http.Request)
- func SongScoresGet(rw http.ResponseWriter, r *http.Request)
- func SongsGet(rw http.ResponseWriter, r *http.Request)
- func SongsPatch(rw http.ResponseWriter, r *http.Request)
- func SongsReloadPatch(rw http.ResponseWriter, r *http.Request)
- func SongsScoresExtendedGet(rw http.ResponseWriter, r *http.Request)
- func SongsScoresGet(rw http.ResponseWriter, r *http.Request)
- func UpdatePlayerProfile(user user_models.User, client util.EaClient) (err bst_models.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDdrRouter ¶
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.