Code Monkey home page Code Monkey logo

node-book-api's Introduction

移动书城api

说明:本项目为移动书城的api,数据为nodejs爬虫爬取,爬虫地址在此

使用了express构建,需配合爬虫爬取数据

在线api暂时关闭,提供sql文件下载,包含了api所需的数据,可直接导入mysql中,下载地址

接口说明

安装
git clone [email protected]:tgxhx/node-crawler.git
npm install

运行
node app.js

默认端口为3333,若不想使用3333端口,可使用以下命令:

Mac/Linux
PORT=4000 node app.js

windows 下使用 git-bash 或者 cmder 等终端执行以下命令:
set PORT=4000 && node app.js

书籍详情

说明:调用此接口获取书籍详情

无参数时,获取所有书籍详情

可选参数:

id:指定书籍详情

接口地址:/booklist

调用例子:/booklist?id=1

书籍分类

说明:调用此接口获取书籍分类

必选参数:

type:指定书籍类型

type参数说明:玄幻1 修真2 都市3 历史4 网游5

接口地址:/type

调用例子:/type?type=1

章节内容

说明:调用此接口获取指定书籍和指定章节

必选参数:

book:指定书籍

id:指定章节

接口地址:/book

调用例子:/book?book=10&id=1

章节标题列表

说明:调用此接口获取指定书籍章节标题列表

必选参数:

id:指定书籍

接口地址:/titles

调用例子:/titles?id=1

node-book-api's People

Contributors

tgxhx avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.