Coder Social home page Coder Social logo

feed's Introduction

API

The task was to design a set of base APIs mirroring Practo.

Dependencies

django
django-rest-framework
django-filter

Installation

pip install -r requirements.txt
python manage.py migrate

Description

  • Doctor APIs for adding,listing,filtering and searching based on locality and their speciality
  • Interaction API basically for liking and un-liking a Doctor
  • An availability API for knowing if the doctor is available for appointment

The admin route is enables for creating and updating users

Decided to use django-rest-framework and django-filter for it's robust and easy to use structure because of the time constraint.

django-rest-frameworks Viewsets helps in enabling GET-POST-PUT-DELETE APIs in an instant

Available API routes

Route Method Summary
/api/doctors GET List of available doctors
/api/doctors PUT For adding a new doctor
/api/doctors/<id> GET Retrieving a specific doctor detail
/api/doctors/<id> DELETE For deleting the doctor by id
/api/doctors?<parameters> GET For filtering and searching based on location,speciality and gender
/api/likes GET List of available interactions
/api/likes/ GET Retrieving a specific interactions detail
/api/likes/ DELETE For deleting the interactions by id
/api/like/ POST For liking/un-liking a specific doctor. Accepts doctor_id as the POST parameter. Requires user authentication
/api/availability GET List of availability of doctors
/api/availability PUT For adding a new availability with doctor as foreign key
/api/availability/<id> GET Retrieving a specific doctor availability by id
/api/availability/ DELETE For deleting the availability by id
/api/doctors?<parameters> GET For filtering and searching on knowing a doctor's availability. Accepts doctor_id and availability as parameters

TODO

  • Authentication for the Viewset APIs
  • Custom response for the Viewset APIs
  • Better request handling

feed's People

Contributors

arju88nair avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.