Skip to content

Dimah02/myclinic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myclinic

Simple Clinic App Api, that have the most of the basics clinic operations, made by Express and Mongodb, to serve this app.


if you want to use it, after cloning run:

git clone https://github.com/Dimah02/myclinic-api.git
cd myclinic-api
npm i
npm run serve

Authentication

  • HTTP Authentication, scheme: bearer, required for all endpoints except login and signup.

Endpoints


POST signup

POST /user/signup

Body Parameters

{
  "name": "user_name",
  "email": "[email protected]",
  "password": "strongpassword"
}

POST login

POST /user/login

Body Parameters

{
  "email": "[email protected]",
  "password": "strongpassword"
}

POST update_info

POST /user/update_info

Body Parameters

{
  "id": "user_id",
  "name": "user_name",
  "email": "[email protected]",
  "gender": "femal",
  "height": "168",
  "weight": "78",
  "medical_history": "medical_history",
  "allergy_to_medications": "allergy_to_medications",
  "birth_date": "birth_date",
  "blood_type": "blood_type"
}

GET get_clinics

GET /clinics


GET get_doctor

GET /doctors/{id}


POST make_review

POST /doctors/{id}/reviews

Body Parameters

{
  "userId": "userId",
  "userName": "userName",
  "rating": 5,
  "comment": "awesome"
}

DELETE cancel_review

DELETE /doctors/{id}/reviews/{reviewId}


POST create_appointments

POST /appointments

Body Parameters

{
  "doctorId": "doctorId",
  "date": "2024-11-29T00:00:00.000",
  "time": "15:00",
  "userId": "userId"
}

POST cancel_appointments

POST /appointments/{id}/cancel


POST get_appointments

POST /users/{id}/appointments





This is my first deployed API! I want to thank myself and everyone who has contributed to my knowledge over the years (✿◠‿◠). If you have any comments, please feel free to reach out.

Releases

No releases published

Packages

No packages published