https://github.com/sheam-tech/randomapi
https://github.com/sheam-tech/randomapi
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sheam-tech/randomapi
- Owner: sheam-tech
- Created: 2022-09-03T16:43:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-03T17:33:59.000Z (over 2 years ago)
- Last Synced: 2024-12-31T12:30:05.747Z (5 months ago)
- Language: JavaScript
- Homepage: randomapi.vercel.app
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
I have tocreate an API that generates random user data. The random user data should have the following properties:
- Id
- gender
- name
- contact
- address
- photoUrl## required to use the following endpoints to perform the operation:
### GET /user/random A random user
- Get a random user from the .json file
### GET /user/all A list of random users
- Get all the users from the .json file
- Limit the number of users using query parameter(s)### POST /user/save Save a random user
- Save a user in the .json file
- validate the body and check if all the required properties are present in the body.### PATCH /user/update Update a random user
- Update a user's information in the .json file using its id
- validate the user id### PATCH /user/bulk-update update multiple users
- Update multiple users' information in the .json file
- Take an array of user ids and assign it to the body.
- validate the body.### DELETE /user/ delete
- Delete a user from the .json file using its id
- validate the user id