Coder Social home page Coder Social logo

rajesha76 / advisorapiproject Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.88 MB

APIs using Django (or any other Python-based Web framework) for an advisor network where users can come and book an advisor for a call.

Python 5.07% Shell 0.92% PowerShell 0.36% Xonsh 0.24% CSS 47.28% JavaScript 46.12%

advisorapiproject's Introduction

NurtureLabs Assignment

Backend Assignment (Python)

APIs using Django (or any other Python-based Web framework) for an advisor network where users can come and book an advisor for a call.

The following roles should be allowed

Admin

API: Add an advisor

Method:

  • POST

Authentication

  • Not needed for this assignment

Endpoint:

  • /admin/advisor/

Request:

  • Advisor name
  • Advisor Photo URL
Response:
  • No Response
  • Just return 200_OK if the request is successful
  • Return 400_BAD_REQUEST if any of the above fields are missing

User

API: Can register as a user

Method:

  • POST

Endpoint:

  • /user/register/

Request:

  • Name
  • Email
  • Password

Response:

Body:
  • JWT Authentication Token
  • User id
Status
  • 200_OK if the request is successful
  • 400_BAD_REQUEST if any of the above fields are missing

API: Can log in as a user

Method:

  • POST

Endpoint:

  • /user/login/

Request:

  • Email
  • Password

Response:

Body:
  • JWT Authentication Token
  • User id
Status
  • 200_OK if the request is successful
  • 400_BAD_REQUEST if any of the above fields are missing
  • Return 401_AUTHENTICATION_ERROR if the email/password combination was wrong

API: Get the list of advisors

Method:

  • GET

Endpoint:

  • /user//advisor

Request:

  • None

Response:

Body:
  • An array of advisor objects with each object having
  • Advisor Name
  • Advisor Profile Pic
  • Advisor Id
Status
  • 200_OK if the request is successful

API: Can book call with an advisor

Method:

  • POST

Endpoint:

  • /user//advisor//

Request:

  • Booking time (a DateTime string)

Response:

Body:
  • None
Status
  • 200_OK if the request is successful

API: Can get all the booked calls

Method:

  • GET

Endpoint:

  • /user//advisor/booking/

Request:

  • None

Response:

Body:
  • An array of advisor objects with each object having
  • Advisor Name
  • Advisor Profile Pic
  • Advisor Id
  • Booking time
  • Booking id
Status
  • 200_OK if the request is successful

advisorapiproject's People

Contributors

rajesha76 avatar

Stargazers

Sourish Bhattacharyya avatar

Watchers

 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.