private async Task <NMSG_Response> GetCommentsFromNMSG() { if (CommentSession == null) { return(null); } return(await CommentSession.GetCommentFirstAsync()); }
public async Task GetCommentAsync(string videoId) { var res = await _context.Video.VideoWatch.GetInitialWatchDataAsync(videoId, false, false); Assert.IsNotNull(res.WatchApiResponse.WatchApiData.Comment); var commentSession = new CommentSession(_context, res.WatchApiResponse.WatchApiData); var commentRes = await commentSession.GetCommentFirstAsync(); Assert.IsNotNull(commentRes.Comments); Assert.IsNotNull(commentRes.Leaves); Assert.IsNotNull(commentRes.Threads); if (commentRes.GlobalNumRes.NumRes > 0) { Assert.IsTrue(commentRes.Comments.Any()); } }