/// <inheritdoc cref="GetCommentsAsync"/> public static ValueTask <HttpResponseMessage> GetCommentsResponseAsync(HttpClient client, WebsiteKind websiteKind, int entryId, CommentSorting sorting = CommentSorting.Date, double apiVersion = Core.ApiVersion) { return(Core.GetResponseFromApiAsync(client, GetCommentsUri(websiteKind, entryId, sorting, apiVersion))); }
/// <summary> /// Gets an URL to get comments threads /// <para/> /// <remarks>Original name: getEntryCommentsLevels</remarks> /// </summary> /// <param name="websiteKind">Kind of website</param> /// <param name="entryId">Entry id</param> /// <param name="sorting">Sorting of comments</param> /// <param name="apiVersion">Target version of API</param> /// <returns>Ready URL, e.g.: https://api.dtf.ru/v1.9/entry/0/comments/levels/date</returns> public static Uri GetCommentsThreadsUri(WebsiteKind websiteKind, int entryId, CommentSorting sorting = CommentSorting.Date, double apiVersion = Core.ApiVersion) { var relative = $"{entryId}/comments/levels/{sorting.ToString().ToLowerInvariant()}"; var baseUri = GetDefaultEntryUrl(websiteKind, apiVersion); return(new Uri($"{baseUri}/{relative}")); }
/// <inheritdoc cref="Osnova.Net.Entries.Entry.GetCommentsThreadsAsync"/> public static ValueTask <CommentThreads> GetEntryCommentsThreadsAsync(HttpClient client, WebsiteKind websiteKind, int entryId, CommentSorting sorting = CommentSorting.Date, double apiVersion = Core.ApiVersion) { return(Entry.GetCommentsThreadsAsync(client, websiteKind, entryId, sorting, apiVersion)); }