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