Class DownloadManager
DownloadManager singleton
Methods
DownloadManager:GetPacklist () | Returns the packlist (Which is requested at startup automatically). |
DownloadManager:GetDownloadingPacks () | Returns an indexed table of the currently downloading downloadable packs. |
DownloadManager:GetUsername () | Returns the currently logged in user's username (Or an empty string if not logged in) |
DownloadManager:GetSkillsetRank (string) | Returns the currently logged in user's online rank for the provided skillset |
DownloadManager:GetSkillsetRating () | Returns the currently logged in user's online MSD rating for the provided skillset |
DownloadManager:GetDownloads () | Returns an indexed table with all the currently downloading download tables. |
DownloadManager:IsLoggedIn () | Returns a boolean that indicates if the player is currently logged in to the API server |
DownloadManager:Login (string, string) | Begins an asynchronous attempt to login with the provided username (First parameter) and password (Second one) |
DownloadManager:LoginWithToken (string) | Begins an asynchronous attempt to login with the provided auth Token |
DownloadManager:Logout () | Ends the current session (If it exists) |
DownloadManager:GetLastVersion () | Returns the string for the latest version (According to the API server) |
DownloadManager:GetTopSkillsetScore (float, string) |
Returns the Nth (First parameter) top online score for the given skillset (Second param)
|
DownloadManager:GetTopChartScoreCount (string) | Returns the amount of leaderboard scores for the given chart |
DownloadManager:GetTopChartScore (string, float) |
Returns the Nth (Second parameter) top online score for the given skillset (First param)
|
DownloadManager:GetCoreBundle (string) | Returns the packs in the core bundle in an indexed table. |
DownloadManager:DownloadCoreBundle (string) | Queues all the packs in the bundle named after the first parameter for download. |
DownloadManager:GetToken () | Returns the current Authenthication Token used for the server API. |
DownloadManager:RequestChartLeaderBoard (string) | Recieves a chartkey, and returns the online leaderboard for that chart. |
DownloadManager:ToggleRateFilter (bool) | RetuSets rate filtering to the boolean passed for the chart leaderboards |
DownloadManager:GetCurrentRateFilter () | Returns true if rate filtering is enabled for the chart leaderboards |
Methods
- DownloadManager:GetPacklist ()
-
Returns the packlist (Which is requested at startup automatically).
Returns:
-
PackList
- DownloadManager:GetDownloadingPacks ()
-
Returns an indexed table of the currently downloading downloadable packs.
Returns:
-
{DownloadablePack}
- DownloadManager:GetUsername ()
-
Returns the currently logged in user's username (Or an empty string if not logged in)
Returns:
-
string
- DownloadManager:GetSkillsetRank (string)
-
Returns the currently logged in user's online rank for the provided skillset
Parameters:
- string
Returns:
-
PackList
- DownloadManager:GetSkillsetRating ()
-
Returns the currently logged in user's online MSD rating for the provided skillset
Returns:
-
PackList
- DownloadManager:GetDownloads ()
-
Returns an indexed table with all the currently downloading download tables.
Returns:
-
{Download}
- DownloadManager:IsLoggedIn ()
-
Returns a boolean that indicates if the player is currently logged in to the API server
Returns:
-
bool
- DownloadManager:Login (string, string)
-
Begins an asynchronous attempt to login with the provided username (First parameter) and password (Second one)
Parameters:
- string
- string
Returns:
-
void
- DownloadManager:LoginWithToken (string)
-
Begins an asynchronous attempt to login with the provided auth Token
Parameters:
- string
Returns:
-
void
- DownloadManager:Logout ()
-
Ends the current session (If it exists)
Returns:
-
void
- DownloadManager:GetLastVersion ()
-
Returns the string for the latest version (According to the API server)
Returns:
-
string
- DownloadManager:GetTopSkillsetScore (float, string)
-
Returns the Nth (First parameter) top online score for the given skillset (Second param)
The lua tables for Online Profile Scores are defined here: https://github.com/etternagame/etterna/blob/develop/src/DownloadManager.cpp#L1645-L1659 TODO: Properly document online profile cores
Parameters:
- float
- string
Returns:
-
OnlineProfileScore
- DownloadManager:GetTopChartScoreCount (string)
-
Returns the amount of leaderboard scores for the given chart
Parameters:
- string
Returns:
-
float
- DownloadManager:GetTopChartScore (string, float)
-
Returns the Nth (Second parameter) top online score for the given skillset (First param)
The lua tables for Online Chart Leaderboard Scores are defined here: https://github.com/etternagame/etterna/blob/develop/src/DownloadManager.cpp#L1686-L1727 TODO: Properly document online chart leaderboard scores
Parameters:
- string
- float
Returns:
-
ChartLeaderboardScore
- DownloadManager:GetCoreBundle (string)
-
Returns the packs in the core bundle in an indexed table.
Additionally, the table has key TotalSize and AveragePackDifficulty with the appropiate values in it for ease of use.
Parameters:
- string
Returns:
-
{DownloadablePack}
- DownloadManager:DownloadCoreBundle (string)
-
Queues all the packs in the bundle named after the first parameter for download.
Parameters:
- string
Returns:
-
void
- DownloadManager:GetToken ()
-
Returns the current Authenthication Token used for the server API.
It is recommended that themes store this to automatically relogin and not the username/password for security reasons.
Returns:
-
string
- DownloadManager:RequestChartLeaderBoard (string)
-
Recieves a chartkey, and returns the online leaderboard for that chart.
Parameters:
- string
Returns:
-
{HighScore}
- DownloadManager:ToggleRateFilter (bool)
-
RetuSets rate filtering to the boolean passed for the chart leaderboards
Parameters:
- bool
Returns:
-
void
- DownloadManager:GetCurrentRateFilter ()
-
Returns true if rate filtering is enabled for the chart leaderboards
Returns:
-
bool