Added Workshop.Query.RankedByTrendDays

This commit is contained in:
Garry Newman 2016-12-05 11:22:12 +00:00
parent 255e80b58d
commit f64d0d15af

View File

@ -35,6 +35,12 @@ public class Query : IDisposable
public ulong? UserId { get; set; }
/// <summary>
/// If order is RankedByTrend, this value represents how many days to take
/// into account.
/// </summary>
public int RankedByTrendDays { get; set; }
public UserQueryType UserQueryType { get; set; } = UserQueryType.Published;
/// <summary>
@ -108,6 +114,9 @@ unsafe void RunInternal()
if ( RequireTags.Count > 0 )
workshop.ugc.SetMatchAnyTag( Handle, !RequireAllTags );
if ( RankedByTrendDays > 0 )
workshop.ugc.SetRankedByTrendDays( Handle, (uint) RankedByTrendDays );
foreach ( var tag in ExcludeTags )
workshop.ugc.AddExcludedTag( Handle, tag );
@ -214,6 +223,8 @@ public bool IsRunning
/// </summary>
public List<ulong> FileId { get; set; } = new List<ulong>();
/// <summary>
/// Don't call this in production!
/// </summary>