forked from Technex18/technexUser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md~
executable file
·64 lines (56 loc) · 1.77 KB
/
README.md~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# TECHNEX
# Api Documentation
## Registration Api
<br> <br>
Url: http://technex-ca.herokuapp.com/api/register
<br>
Method: POST
<br>
Json object Expected : //(all fields required)<br>
{<br>
"email" : emailOfUser,<br>
"first_name" : firstName,<br>
"last_name" : lastName,<br>
"password" : password,<br>
"college" : collegeName,<br>
"year" : year(1,2,3,4,5)<br>
"mobile_number" : mobileNumber<br>
}<br><br>
Json Response for Successful registration:<br>
{<br>
"status" : "Profile created successfully"<br>
}<br><br>
Json Response for Error in Registration(validation Erorr):<br>
{<br>
"status" : "Registration in error",<br>
"field_name": errorInField //field_name is same as above expected<br>
}<br><br>
Json Response for Invalid Request(requests other than post):<br>
{<br>
"Error" : True,<br>
"status" : "invalid request,Post request Please!"<br>
}<br><br><br>
## Login Api
<br><br>
Url: http://technex-ca.herokuapp.com/api/login
<br>
Method: POST
<br>
Json object Expected:<br> {<br>
"email" : email,<br>
"password" : password<br>
}<br><br>
Json Response for successful Login: <br>
{<br>
"status" : "logged in"<br>
}<br><br>
Json Response for wrong Username/password:<br>
{<br>
"Error" : True,<br>
"status" : "Invalid Credentials!"<br>
}<br>
Json Response for invalid form submission(empty username/password and other validation errors):<br>
{<br>
"Error" : True,<br>
"status" : "Please Fill the form correctly!"<br>
}<br><br><br>