Skip to content

Technex18/ca_portal

 
 

Repository files navigation

Technex CA

Api Documentation

Login Api



Url: http://technex-ca.herokuapp.com/api/login/
Method: POST
Json object Expected :
{
"email":"[email protected]",
"password":"caportal"
}

Json Response for Wrong Post Request Method:
{
"status":"4"
}

Json Response for wrong user:
{
"status":"3"
}

Json Response for inactive user:
{
"status": "2"
}

Json Response if user ca profile is not chosen:
{
"status" : "0"
}

Json Response if user ca profile is chosen:
{
"status": "1"
"whatsappNumber": 9999999999,
"first_name": "bikram",
"last_name": "bharti",
"pastExp": "test",
"pinCode": 111111,
"whyChooseYou": "test",
"email": "[email protected]",
"postel_address": "123A XYZ Colony"
"college": "test",
"mobileNumber": 9999999999,
"status": 1,
"year": 2
}


AccountdetailApi



Url: http://technex-ca.herokuapp.com/api/editprofile/
Method: POST
Json object Expected :
{

"email":"[email protected]",
"first_name":"new firstname",
"last_name":"new lastname",
"mobileNumber":1234567898,
"whatsappNumber":9999999999,
"pinCode":123456,
"postal_address":"new address",
"year": 2
}

Json Response for Wrong Post Request Method:
{
"status":"Invalid Request"
}

Json Response for profile edit confirmation:
{
"status":"OK"
}


DashboardApi



Url: http://technex-ca.herokuapp.com/api/dashboard/
Method: POST
Json object Expected :
{
"email":"[email protected]"
}

Json Response for Wrong Post Request Method:
{
"status": 0
}

Json Response for No Director Detail:
{
"status":2
}

Json Response for No Student Body detail:
{
"status":3
}

Json Response for No Director Detail and No student Body detail :
{
"status":4
}

Json Response for Director detail, student detail:
{
"status": 1
"directordetail":"Details of the Director"
"studentbodydetail":"Details of student body"
}


LeaderApi



Url: http://technex-ca.herokuapp.com/api/leader/
Method: POST
Json object Expected :
{
"email":"[email protected]"
}

Json Response for Wrong Post Request Method:
{
"status": 0
}

Json Response for a non choosen CA:
{
"status": 2
}

Json Response for points:
{
"status": 1
"points": 10
"rank": 3(Same rank for same points and others as per position in list)
}


LeaderBoardApi



Url: http://technex-ca.herokuapp.com/api/leaderboard/
Method: GET

Json Response for Wrong GET Request Method:
{
"status": 0
}

Json Response for LeaderBoard:
{
"Leaderboard": [
{
"rank": 3
"points": 10(Same rank for same points and others as per position in list)
"username": "[email protected]"(email id is the username)
},
{
"rank": 3
"points": 10(Same rank for same points and others as per position in list)
"username": "[email protected]"(email id is the username)
}
{
"rank": 5
"points": 8(Same rank for same points and others as per position in list)
"username": "[email protected]"(email id is the username)
}
]
}


DashboardUpdateApi



Url: http://technex-ca.herokuapp.com/api/update/
Method: POST
Json object Expected :
{
"email":"[email protected]"
"directordetail":"Updated director details"
"studentbodydetail":"Updated studentbody details"
"notification":
[
{
"creation_time":"2017-10-07T12:13:10.756000+00:00"(String type casted time)
"mark_read":boolean(true/false)
}
{
"creation_time":"2017-10-07 12:12:42.037000+00:00"(String type casted time)
"mark_read":boolean(true/false)
}
]
}

Json Response no notification for given creation_time:
{
"status":2
}

Json Response for update confirmation:
{
"status": 1
}


NotificationApi



Url: http://technex-ca.herokuapp.com/api/notification/
Method: POST
Json object Expected :
{
"email":"[email protected]"
}

Json Response for Wrong Post Request Method:
{
"status": 0
}

Json Response for notifications:
{
"status": 1
"notification":
[
{
"message":"Message of first notification"
                                         "creation_time":"2017-10-07 12:12:54.656000+00:00"(String type casted time)
"mark_read":boolean(true/false)
}
{
"message":"Message of second notification"
"creation_time":"2017-10-07 12:13:10.756000+00:00"(String type casted time)
"mark_read":boolean(true/false)
}
]
}


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 67.3%
  • HTML 12.9%
  • Python 10.5%
  • JavaScript 9.3%