CSV operator is a RESTFull API for doing basic operations with csv files. The API is available at https://csv-operator.herokuapp.com/
Just clone the repo and run npm install
followed by npm start
- Node.js
15.5.1
- TypeScript
4.4.3
- Express
4.17.1
-
Books
{title: string; isbn: string; author: string; description: string;}
-
Magazine
{title: string; isbn: string; author: string; publishedAt: string;}
-
GeneralType
extends Book, Magazine {}
-
Handler
(req: Request, res: Response) => void
-
Endpoint
{url: string; handler: Handler;}
- methods:
GET
- responses:
{books: [], magazines: []}
- description: retrieves all information about books and magazines
- methods:
GET
- responses:
{all: []}
- description: retrieves all information about books and magazines combined in the same array and sorted by title.
- methods:
GET
orPOST
- query params:
isbn
orauthor
- body:
{Book}
- responses:
{book: {}}
,{books: []}
, or{message: "some confirmation"}
- description: retrieves all information about books, find books by isbn, find books by author email, and add new records to the existing csv file.
- methods:
GET
orPOST
- query params:
isbn
orauthor
- body:
{Magazine}
- responses:
{magazine: {}}
,{magazines: []}
, or{message: "some confirmation"}
- description: retrieves all information about magazines, find magazines by isbn, find magazines by author email, and add new records to the existing csv file.
- Determining the types needed for the data.
- Some design choices like whether to use a class for storing and operating on the retrieved data.