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

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