From f64d0d15afb82e2e5c5062662571486b98328545 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 5 Dec 2016 11:22:12 +0000 Subject: [PATCH] Added Workshop.Query.RankedByTrendDays --- Facepunch.Steamworks/Interfaces/Workshop.Query.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Facepunch.Steamworks/Interfaces/Workshop.Query.cs b/Facepunch.Steamworks/Interfaces/Workshop.Query.cs index 3cb98ea..5c1cda0 100644 --- a/Facepunch.Steamworks/Interfaces/Workshop.Query.cs +++ b/Facepunch.Steamworks/Interfaces/Workshop.Query.cs @@ -35,6 +35,12 @@ public class Query : IDisposable public ulong? UserId { get; set; } + /// + /// If order is RankedByTrend, this value represents how many days to take + /// into account. + /// + public int RankedByTrendDays { get; set; } + public UserQueryType UserQueryType { get; set; } = UserQueryType.Published; /// @@ -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 /// public List FileId { get; set; } = new List(); + + /// /// Don't call this in production! ///