// WorldsByName public Task <DatabaseWorld[]> GetWorldsByNameAsync(string name, int limit = int.MaxValue) { return(DatabaseUtils.RecursiveLoadRangeAsync(this.Client, "Worlds", "name", null, name, name, limit, dbo => dbo.GetString("name")) .Then(t => t.Result.Select(DatabaseWorld.FromDatabaseObject).ToArray()) .ToSafeTask()); }
// WorldsByPlays public Task <DatabaseWorld[]> GetWorldsByPlaysAsync(int minPlays, int maxPlays, int limit = int.MaxValue) { return(DatabaseUtils.RecursiveLoadRangeAsync(this.Client, "Worlds", "plays", null, maxPlays, minPlays, limit, dbo => dbo.GetString("plays")) .Then(t => t.Result.Select(DatabaseWorld.FromDatabaseObject).ToArray()) .ToSafeTask()); }
// WorldsByCrew public Task <DatabaseWorld[]> GetWorldsByCrewAsync(Crew crew, int limit = int.MaxValue) { return(DatabaseUtils.RecursiveLoadRangeAsync(this.Client, "Worlds", "ByCrew", null, crew.Id, crew.Id, limit, dbo => dbo.GetString("Crew")) .Then(t => t.Result.Select(DatabaseWorld.FromDatabaseObject).ToArray()) .ToSafeTask()); }