Added Workshop.Item.PreviewImageUrl

This commit is contained in:
Garry Newman 2016-10-13 10:37:13 +01:00
parent 0b3db02843
commit 430c24df08
3 changed files with 8 additions and 2 deletions

View File

@ -56,8 +56,9 @@ namespace Facepunch.Steamworks.Test
foreach ( var item in Query.Items )
{
Console.WriteLine( "{0}", item.Title );
Console.WriteLine( "\t WebsiteViews: {0}", item.WebsiteViews );
Console.WriteLine( "\t VotesUp: {0}", item.VotesUp );
Console.WriteLine( "\t WebsiteViews: {0}", item.WebsiteViews );
Console.WriteLine( "\t VotesUp: {0}", item.VotesUp );
Console.WriteLine( "\t PreviewUrl: {0}", item.PreviewImageUrl );
}
}
}

View File

@ -183,6 +183,7 @@ namespace Facepunch.Steamworks
public int FollowerCount { get; internal set; }
public int WebsiteViews { get; internal set; }
public int ReportScore { get; internal set; }
public string PreviewImageUrl { get; internal set; }
}
}
}

View File

@ -108,6 +108,10 @@ namespace Facepunch.Steamworks
Items[i].FollowerCount = GetStat( data.Handle, i, ItemStatistic.NumFollowers );
Items[i].WebsiteViews = GetStat( data.Handle, i, ItemStatistic.NumUniqueWebsiteViews );
Items[i].ReportScore = GetStat( data.Handle, i, ItemStatistic.ReportScore );
string url = null;
if ( workshop.ugc.GetQueryUGCPreviewURL( data.Handle, (uint)i, out url ) )
Items[i].PreviewImageUrl = url;
}
TotalResults = (int)data.TotalMatchingResults;