Ejemplo n.º 1
0
        public async Task GetSubmissionCommentIds()
        {
            var client = new PsawClient();

            string[] ids = await client.GetSubmissionCommentIds("a2df38");

            Assert.True(ids.Length > 2000);
        }
Ejemplo n.º 2
0
        public async Task GetSubmissionComments()
        {
            const string submissionId = "a2df38";

            var client     = new PsawClient();
            var commentIds = (await client.GetSubmissionCommentIds(submissionId)).Take(500).ToArray();

            // Only taking 500 because more would result in a [Request Line is too large (8039 > 4094)] error
            var comments = await client.Search <CommentEntry>(new SearchOptions
            {
                Ids = commentIds
            });

            Assert.Equal(500, comments.Length);
        }