This repository has been archived by the owner on Feb 26, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapiary.apib
71 lines (50 loc) · 1.69 KB
/
apiary.apib
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
65
66
67
68
69
70
71
FORMAT: 1A
HOST: https://api.thatspretty.cool/
# RESTful-api
A simple authentication API.
You should **NOT** put any personal information on to the API and we are not responsible for any of the data you place on it.
[View the GitHub](https://github.com/dudeisbrendan03/RESTful-api)
## User Management Collection [/user]
### Create a user [POST]
You may create a new user using this action.
Your user will only be created if:
- First, last names, email, password and mobile number are strings
- ToS is true
- Email contains an '@'
- Name doesn't contain the following: !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?
- Password contains the following: !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? and is longer than 8 characters
+ Request (application/json)
{
"fName": "Test",
"lName": "User",
"email": "asd@asd.net",
"pass": "1234567@abcdef",
"tos": true,
"mobile": "+441241365123"
}
+ Response 204 (application/json)
### Fetch user details [GET]
Grab a users details (does not currently have any authentication implemented
+ Parameters
+ email (required, string, `asd@asd.net`)
+ Response 200 (application/json)
{
"fName": "etst",
"lName": "test",
"mobile": "+441241365123",
"email": "asd@asd.net",
"tos": true
}
## Token Management Collection [/auth]
### Get token (login) [POST]
+ Request (application/json)
{
"email": "asd@asd.net",
"pass": "1234567@abcdef"
}
+ Response 200 (application/json)
{
"email": "asd@asd.net",
"token": "",
"expires": 1558040417587
}