Go to file
Malar Kannan a5a23853ef update logout doc 2017-09-01 10:39:28 +05:30
.gitignore 1. implemented new api endpoints 2017-08-31 19:44:54 +05:30
README.md update logout doc 2017-09-01 10:39:28 +05:30
SPEC.md initial commit 2017-08-31 14:14:47 +05:30
models.py update readme 2017-09-01 10:28:56 +05:30
requirements.txt improved class-attendance respons 2017-09-01 09:53:40 +05:30
server.py update readme 2017-09-01 10:28:56 +05:30

README.md

Worflow

install the dependencies by running pip install -r requirements.txt start the server by running $python server.py

Login

$ http --session=./session.json -f POST http://127.0.0.1:5000/api/login username=user@example.com password=password

Update Attendance

The time is optional and it may contain values 'now' or ISO-8601 time-string

Student :

$ http --session=./session.json -f POST http://127.0.0.1:5000/api/attendance/student presence=absent identifier=2 time=now

Class :

$ http --session=./session.json -f POST http://127.0.0.1:5000/api/attendance/class presence=present identifier=1 time=now

Get Attendance

The start_time and end_time are optional and they may contain values 'now' or time string

Student:

$ http --session=./session.json GET "http://127.0.0.1:5000/api/attendance/student?identifier=2&start_time=now&end_time=now"

or

$ http --session=./session.json GET "http://127.0.0.1:5000/api/attendance/student?identifier=3&start_time=now&end_time=now"

Class:

$ http --session=./session.json GET "http://127.0.0.1:5000/api/attendance/class?identifier=1"

Logout

$ http --session=./session.json GET "http://127.0.0.1:5000/api/logout"