Skip to content

Team-ThunderHack/Support-a-thon-Backend-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup API at your localhost :

1 )Fork the repo
2) Clone at local host
3) Setup virtual env by python3 -m venv env
4) Activate virtual env by . env/bin/activate
5) Install all packages in requirements.txt by pip install -r /path/to/requirements.txt
6) cd interview
7) python manage.py runserver

API Docs:

End Points:

1) api/create (POST Method)

Description : To create a user with the following details and save his/her details in the database.

Parameters :
name => character Field
key => integer Field
email => character Field
password => character Field

Example :
http://127.0.0.1:8000/create?name=ankur&email=ankur@gmail.com&password=1234567&key=73627

Responses :
A ) If user is created and entered into DB : User Created Successfully
B) If key is invalid : Invalid Key

2) api/authenticate (GET Method)

Description : To check the password entered by the user.

Parameters :
key => integer Field
email => character Field
password => character Field

Example :
[http://127.0.0.1:8000/create?name=ashutosh&email=ashutosh@sample.com&password=123456&key=73627](http://127.0.0.1:8000/authenticate?email=ankur@gmail.com&password=1234567&key=73627)

Responses :
A) If password is correct : Correct Password
B) If password is incorrect : Incorrect Password
C) If key is invalid : Invalid Key

3) api/doAnalysis (GET Method)

Description : To check the password entered by the user.

Parameters :
key => integer Field
email => character Field
questionID => integer Field
path => character Field

Example :
http://127.0.0.1:8000/doAnalysis?email=ashutosh@sample.com&key=73627&questionID=1&path=/Users/anilaswani/Desktop/interview/sample.wav

Responses :
A) List with question ID , wpm, filled Words List and filler Phrases List
[ "35", 61.723602484472046, [ "Like" ], [] ]
B) If key is invalid : Invalid Key

4) api/getDetails (GET Method)

Description : To check the password entered by the user.

Parameters :
key => integer Field
email => character Field
questionID => integer Field

Example :
http://127.0.0.1:8000/getDetails?email=vijay@gmail.com&key=73627&questionID=1

Responses :
A) List with question ID , wpm, filled Words List and filler Phrases List
[ "vijay@gmail.com", 35, 61, "["Like"]", "[]" ]
B) If key is invalid : Invalid Key