追书神器API

时间:2018-02-05 18:37:12   收藏:0   阅读:3993

  由于自己喜欢看小说,有的时候不方便手机看的时候希望在电脑上面看,但很多网站有广告啊,于是封装了套手机版的追书神器API

 

  目前只做了搜索 详情 书评 换源 正文

 

调用方式:

//搜索小说
            var searchResult = BookApi.Search("凡人修仙传");

            //筛选
            var book = searchResult.books.FirstOrDefault(x=>x.author == "忘语");

            //获取小说描述
            var detail = BookApi.GetBookDetails(book._id);
            System.Console.WriteLine(detail.JsonSerialize());
            System.Console.WriteLine();

            //获取小说书评
            var comment = BookApi.GetComment(book._id, 0, 30);
            System.Console.WriteLine(comment.total);

            //获取小说源
            var sources = BookApi.GetBookSource(book._id);
            foreach (var bookSource in sources)
            {
                System.Console.WriteLine(bookSource.name);
            }

            //获取小说目录
            var catalog = BookApi.GetBookCatalog(sources[0]._id);
            foreach (var catalogChapter in catalog.chapters)
            {
                System.Console.WriteLine(catalogChapter.title);
            }

            //获取指定章节正文
            var bookContent = BookApi.GetBookContent(catalog.chapters[0].link);
            System.Console.WriteLine(bookContent.chapter.cpContent);

链接: https://pan.baidu.com/s/1pMNgMqZ 密码: kpy6

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!