示例#1
0
        private async Task <NMSG_Response> GetCommentsFromNMSG()
        {
            if (CommentSession == null)
            {
                return(null);
            }

            return(await CommentSession.GetCommentFirstAsync());
        }
示例#2
0
        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());
            }
        }
示例#3
0
 public async Task <PostCommentResponse> SubmitComment(string comment, TimeSpan position, string commands)
 {
     return(await CommentSession.PostCommentAsync(position, comment, commands));
 }