Example #1
0
 /// <summary>
 /// Performs a <see cref="SteamNewsRequest"/> and deserialises it to the underlying <see cref="SteamNewsContainer"/>
 /// </summary>
 /// <param name="client">The <see cref="SteamApiClient"/> to use</param>
 /// <param name="request">The <see cref="SteamNewsRequest"/> to perform</param>
 /// <returns>A <see cref="SteamNewsContainer"/> containing the <see cref="SteamNewsItem"/>s</returns>
 private static SteamNewsContainer GetAppNews(this ApiClient client, SteamNewsRequest request)
 {
     return(client.Perform <SteamNewsResponse>(request).Container);
 }
Example #2
0
        /// <summary>
        /// Creates and performs a <see cref="SteamNewsRequest"/> using the provided options
        /// </summary>
        /// <param name="client">The <see cref="SteamApiClient"/> to use</param>
        /// <param name="appId">The AppId to get the news for</param>
        /// <param name="max">The max number of news entries to return</param>
        /// <param name="descriptionLength">The max chars the body should contain</param>
        /// <returns>A <see cref="SteamNewsContainer"/> containing up-to the <see cref="max"/> number of <see cref="SteamNewsItem"/> with each content entry being no more than <see cref="descriptionLength"/> chars</returns>
        public static SteamNewsContainer GetAppNews(this ApiClient client, uint appId, uint max, uint descriptionLength)
        {
            var request = new SteamNewsRequest(appId, max, descriptionLength);

            return(GetAppNews(client, request));
        }