vit_faculties

所属分类:语音合成
开发工具:JavaScript
文件大小:2025KB
下载次数:0
上传日期:2021-09-06 11:59:28
上 传 者sh-1993
说明:  一个简单的API从VIT官方网站返回学院列表。目前仅支持金奈校区
(A simple API that returns the list of faculties from the official VIT website. Currently only supports Chennai campus)

文件列表:
LICENSE (1069, 2021-09-06)
main.js (431, 2021-09-06)
modules (0, 2021-09-06)
modules\fetchFaculties.js (2798, 2021-09-06)
node_modules (0, 2021-09-06)
node_modules\.bin (0, 2021-09-06)
node_modules\.bin\is-ci (295, 2021-09-06)
node_modules\.bin\is-ci.cmd (166, 2021-09-06)
node_modules\.bin\mime (293, 2021-09-06)
node_modules\.bin\mime.cmd (164, 2021-09-06)
node_modules\.bin\nodemon (315, 2021-09-06)
node_modules\.bin\nodemon.cmd (186, 2021-09-06)
node_modules\.bin\nodetouch (315, 2021-09-06)
node_modules\.bin\nodetouch.cmd (186, 2021-09-06)
node_modules\.bin\nopt (303, 2021-09-06)
node_modules\.bin\nopt.cmd (174, 2021-09-06)
node_modules\.bin\rc (289, 2021-09-06)
node_modules\.bin\rc.cmd (160, 2021-09-06)
node_modules\.bin\semver (347, 2021-09-06)
node_modules\.bin\semver.cmd (218, 2021-09-06)
node_modules\.yarn-integrity (27648, 2021-09-06)
node_modules\@sindresorhus (0, 2021-09-06)
node_modules\@sindresorhus\is (0, 2021-09-06)
node_modules\@sindresorhus\is\dist (0, 2021-09-06)
node_modules\@sindresorhus\is\dist\index.d.ts (6063, 2021-09-06)
node_modules\@sindresorhus\is\dist\index.js (10891, 2021-09-06)
node_modules\@sindresorhus\is\dist\index.js.map (10526, 2021-09-06)
node_modules\@sindresorhus\is\license (1109, 2021-09-06)
node_modules\@sindresorhus\is\package.json (1256, 2021-09-06)
node_modules\@szmarczak (0, 2021-09-06)
node_modules\@szmarczak\http-timer (0, 2021-09-06)
node_modules\@szmarczak\http-timer\LICENSE (1071, 2021-09-06)
node_modules\@szmarczak\http-timer\package.json (889, 2021-09-06)
node_modules\@szmarczak\http-timer\source (0, 2021-09-06)
node_modules\@szmarczak\http-timer\source\index.js (2095, 2021-09-06)
... ...

# VIT Faculties ### Description: A simple API that returns the list of faculties from the official VIT website. Currently only supports Chennai campus. It uses web scraping to scrap the faculty list from the official site of VIT and stores the result in a JSON file. This process of scraping is done only when the application starts or once every x days`(default 7)` which can be customized by modifying the `routes/api.js` file and it saves the result to a JSON file`(routes/database/faculty.json)`. Every time a request is made to fetch the faculty list, it returns the saved info from the JSON file instead of scraping for every request. This reduces the response time by a LOT, from more than 2 seconds to a few milliseconds. This makes a big difference. It has a simple built-in authentication. ### How to Use: 1. Clone the repository using `git clone https://github.com/Rakeshkumar-7/vit_faculties.git` 2. Open the terminal in the project directory 3. Install the required modules before running using `npm install` 4. Run the program using `node main.js ` 5. The program runs a local server at `http://localhost:3000` by default. 6. To get the faculty list, send a POST request to `http://localhost:3000/api/faculties` with the following body: - "key": "542d3c6f-79cc-42f0-aa63-2b472bdaa9a1" `(default, can be changed on routes/database/APIkeys.json)` - "reason": "The reason for the request" `(can be any reason, just for logging purpose)` 7. You can send the POST request using Postman software or any other preferred way. The API returns a JSON response containing the faculties grouped by their school/division. It has the Name, Hierarchical position, Image URL of each faculty listed in the site

近期下载者

相关文件


收藏者