예제 #1
0
        public async Task TestGetPublicBlogContent()
        {
            var session = new NotionSession(TestUtils.CreateOfficialNotionSessionInfo());
            var pages   = await session.GetTopLevelPages().ToListAsync();

            Assert.IsNotNull(pages);
            Assert.AreNotEqual(0, pages.Count);
            Assert.IsNotNull(pages[0].Title.Title[0].PlainText);
        }
예제 #2
0
        public async Task TestGetSyndicationFeed()
        {
            var session = new NotionSession(TestUtils.CreateOfficialNotionSessionInfo());
            var pages   = await session.GetTopLevelPages().ToListAsync();

            Assert.IsNotNull(pages);
            var page = pages.Where(p => p.Title?.Title?.FirstOrDefault().PlainText == "Public blog").FirstOrDefault();

            Assert.IsNotNull(page);

            var feed = await session.GetSyndicationFeed(page);

            Assert.IsNotNull(feed?.Items);
            Assert.AreNotEqual(0, feed.Items.Count());
        }