You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.
Classes API
/api/classes
GET
will get every class
Request
No Authentication Header Required
No Request Body Required
Success Response
Status Code :
200 OK
Content-Type :
application/json
It will response as array which contains...
POST
will create class
Request
Authentication Header Required
x-access-token:jwt_token_value
Content-Type :
application/json
[min:max]
[min:max]
Success Response
Status Code :
201 Created
Content-Type :
application/json
Error Response
Status Code :
409 Conflict
Condition : If same class name is in database
/api/classes/:cid
GET
should get class of
cid
Request
No Authentication Header Required
No Request Body Required
Success Response
Status Code :
200 OK
Content-Type :
application/json
Error Response
Condition : if given cid is non-exist id in our database
Status Code :
404 Not Found
POST
should requested user will join class of cid
Request
Authentication Header Required
x-access-token:jwt_token_value
No Request Body required
Success Response
Status Code :
201 Created
Content-Type :
application/json
Error Response
Condition : If Requested
User
is creator of class or already joined class or class is full capacityStatus Code :
400 Bad Request
PATCH
should change element of class
Request
Authentication Header Required
x-access-token : jwt_token_value
Pending
, You can change onlyPending -> Processing
,Processing -> Ended
. can't be Requested as a reversed orderSuccess Response
Status-Code :
200 OK
Content-Type :
application/json
[]Changed_Value<string>
Error Response
Condition : If Requested User is not a creator of requested class, User requested unvalid Request
maxCapacity, state
Status Code :
400 Bad Request
[]Error<string>
DELETE
Delete Requested Class
Request
Authentication Required
x-access-token:jwt_token_value
No Request Body Required
Success Response
Status Code :
200 OK
No Response Body
Error Response
Condition : Requested cid is non-exist cid
Status Code :
404 Not Found
The text was updated successfully, but these errors were encountered: