Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tinwaninja/nodejs-nytimes
https://github.com/tinwaninja/nodejs-nytimes
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tinwaninja/nodejs-nytimes
- Owner: tinwaninja
- Created: 2020-08-14T10:12:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-14T13:38:47.000Z (over 4 years ago)
- Last Synced: 2024-11-13T08:37:03.899Z (2 months ago)
- Language: JavaScript
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NY Times Simple API
## Script Installation
-------Because I did not include the node_modules folder, so it is necessary to do the installation command as follows:
git clone https://github.com/tinwaninja/NodeJS-NYTimes.git
cd NodeJS-NYTimes
npm install
node server.js
-------
In an integrated API based on the NYTimes developer, refactoring is carried out to obtain the required data based on news and books data from JSON obtained from NYTimes.
## Use of the NEWS APICalling the refactoring API results to get the news list JSON data can be done by accessing the following:
To get all news lists, you can use the GET method on the URL:
http://127.0.0.1:3000/news/For news lists based on searching and sorting, you can use the KEYWORD and TYPE_SORT parameters as follows:
http://127.0.0.1:3000/news/{KEYWORD}/{TYPE_SORT}{TYPE_SORT} can use the following values:
newest
oldest
relevance
Example : http://127.0.0.1:3000/news/Covid/newest
##
## Use of the BOOKS API
-------
Calling the refactoring API to get JSON list of books data can be done as follows:
http://127.0.0.1:3000/books/{TYPE_LIST}Types of {TYPE_LIST} can use the following values:
e-book-fiction
hardcover-fiction
paperback-nonfiction
Example: http://127.0.0.1:3000/books/hardcover-fiction