diff --git a/src/Steam.Models/NewsItemModel.cs b/src/Steam.Models/NewsItemModel.cs index 887662e..eaf7b03 100644 --- a/src/Steam.Models/NewsItemModel.cs +++ b/src/Steam.Models/NewsItemModel.cs @@ -19,5 +19,7 @@ public class NewsItemModel public ulong Date { get; set; } public string Feedname { get; set; } + + public string[] Tags { get; set; } } } \ No newline at end of file diff --git a/src/SteamWebAPI2/Interfaces/ISteamNews.cs b/src/SteamWebAPI2/Interfaces/ISteamNews.cs index b26583f..af090e0 100644 --- a/src/SteamWebAPI2/Interfaces/ISteamNews.cs +++ b/src/SteamWebAPI2/Interfaces/ISteamNews.cs @@ -7,6 +7,6 @@ namespace SteamWebAPI2.Interfaces { public interface ISteamNews { - Task> GetNewsForAppAsync(uint appId, uint? maxLength = null, DateTime? endDate = null, uint? count = null); + Task> GetNewsForAppAsync(uint appId, uint? maxLength = null, DateTime? endDate = null, uint? count = null, string feeds = null, string[] tags = null); } } \ No newline at end of file diff --git a/src/SteamWebAPI2/Interfaces/SteamNews.cs b/src/SteamWebAPI2/Interfaces/SteamNews.cs index ee799f6..4bff68c 100644 --- a/src/SteamWebAPI2/Interfaces/SteamNews.cs +++ b/src/SteamWebAPI2/Interfaces/SteamNews.cs @@ -33,8 +33,10 @@ public SteamNews(IMapper mapper, ISteamWebRequest steamWebRequest, ISteamWebInte /// /// /// + /// + /// /// - public async Task> GetNewsForAppAsync(uint appId, uint? maxLength = null, DateTime? endDate = null, uint? count = null) + public async Task> GetNewsForAppAsync(uint appId, uint? maxLength = null, DateTime? endDate = null, uint? count = null, string feeds = null, string[] tags = null) { ulong? endDateUnixTimeStamp = null; @@ -49,6 +51,8 @@ public async Task> GetNewsForAppAsync(ui parameters.AddIfHasValue(maxLength, "maxlength"); parameters.AddIfHasValue(endDateUnixTimeStamp, "enddate"); parameters.AddIfHasValue(count, "count"); + parameters.AddIfHasValue(feeds, "feeds"); + parameters.AddIfHasValue(tags, "tags"); var steamWebResponse = await steamWebInterface.GetAsync("GetNewsForApp", 2, parameters); diff --git a/src/SteamWebAPI2/Models/SteamNewsResultContainer.cs b/src/SteamWebAPI2/Models/SteamNewsResultContainer.cs index 61162a2..5951a22 100644 --- a/src/SteamWebAPI2/Models/SteamNewsResultContainer.cs +++ b/src/SteamWebAPI2/Models/SteamNewsResultContainer.cs @@ -31,6 +31,9 @@ internal class NewsItem [JsonProperty("feedname")] public string Feedname { get; set; } + + [JsonProperty("tags")] + public string[] Tags { get; set; } } internal class SteamNewsResult diff --git a/src/SteamWebAPI2/Utilities/SteamWebRequest.cs b/src/SteamWebAPI2/Utilities/SteamWebRequest.cs index bb80ce8..6f61e07 100644 --- a/src/SteamWebAPI2/Utilities/SteamWebRequest.cs +++ b/src/SteamWebAPI2/Utilities/SteamWebRequest.cs @@ -110,6 +110,8 @@ private async Task> SendWebRequestAsync(HttpMethod httpM } parameters.Insert(0, new SteamWebRequestParameter("key", steamWebApiKey)); + //parameters.Insert(0, new SteamWebRequestParameter("feeds", "SteamDB")); -- Demonstration of Implementing Feeds Parameter + //parameters.Insert(0, new SteamWebRequestParameter("tags", "halloween")); -- Demonstration of Implementing Tags Parameter HttpResponseMessage httpResponse = null;