A chatbot for students to get info related to exam results, time table, etc.
This is the server application.
The client app can be found here
Contents
To run this project, you will need to add the following environment variables to your .env
file. Sample present in .env_sample
.
SECRET_KEY
Generate the secret key by running the following from the command line:
python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
-
DATABASE_URL
-
WP_PRIVATE_KEY
-
WP_CLAIMS_EMAIL
Student
- Obtain Auth Tokens (Login) :
POST /api-token-auth/
- Verify Auth Tokens :
POST /api-token-auth/
- User Information :
GET /login/info/[rollno]/
- Querying :
POST /login/query/
- Get Group Notifications :
GET /login/notif/
- Get Personal Notifications :
GET /login/personal/
- Support / Feedback :
POST /login/support/
Admin / Professor
- Post Group Notifications :
POST /login/notif/
- Post Personal Notifications :
POST /login/personal/
URL : /api/token-auth/
Method : POST
Auth required : NO
Request body
{
"username": "[valid username/rollnumber]",
"password": "[password in plain text]"
}
Code : 200 OK
Response body
{
"refresh": "[refresh_token]",
"access": "[access_token]"
}
URL : /api/token-verify/
Method : POST
Auth required : NO
Request body
{
"token": "[access token]",
}
Code : 200 OK
Response body
{}
URL : /api/profile/
Methods : GET
Auth required : YES
Code : 200 OK
Response body
{
"rno": "[username/roll number]",
"name": "[Name]",
"batch": 3
}
URL : /api/query/
Method : POST
Auth required : YES
Request body
{
"query": "[query in plain text]"
}
Code : 200 OK
Response body
{
"response": [
{
"text": "Hey! How you doin?"
},
{
"image": "https://example.com/wave.jpg"
},
...
]
}
URL : /api/groupnotif/
Methods : GET
Auth required : YES
Code : 200 OK
Response body
[
{
"teacher":"Prof. Sagan",
"subject":"Voyager 1",
"notice":"Pale Blue Dot",
"interest":"Astrophysics",
"creation_date":"2021-01-19"
}
]
URL : /api/individualnotif/
Methods : GET
Auth required : YES
Code : 200 OK
Response body
[
{
"teacher":"Prof. Feynman",
"subject":"Fun to Imagine",
"notice":"The Oxygen atoms snap in to the Carbon atoms to create a Catastrophe! 🔥",
"creation_date":"2021-01-19"
}
]
URL : /api/feedback/
Method : POST
Auth required : YES
Request body
{
"subject": "[Subject]",
"details": "[Feedback]"
}
Code : 201 OK
Response body
{
"subject": "[Subject]",
"details": "[Feedback]",
}
-
API reference for Push Notifications and Admin side endpoints (POST Notifitions)
-
Installation, Features and screenshots