-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.txt
105 lines (84 loc) · 3.27 KB
/
api.txt
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
http://localhost:5000/api/users POST Регистрация
headers(Content-Type, application/json)
{
"name": "Alekslomyarius",
"email":"[email protected]",
"password":"123456"
}
http://localhost:5000/api/auth GET Аутентификация
headers(x-auth-token, <token>)
http://localhost:5000/api/auth POST
headers(Content-Type, application/json)
{
"email": "[email protected]",
"password": "123456"
}
http://localhost:5000/api/profile/me GET Информация о пользователе
headers(x-auth-token, <token>)
http://localhost:5000/api/profile POST Добавление или изменение информации о пользователе
headers(Content-Type, application/json; x-auth-token, <token>)
{
"company": "asd",
"status": "Developer",
"website": "asdasd",
"skills": "Pythos, JS",
"location": "Tambov",
"bio": "ASddsa",
"githubusername": "Alekslomyarius",
"youtube": "youtube"
}
http://localhost:5000/api/profile GET Информация о всех пользователях
headers(Content-Type, application/json)
http://localhost:5000/api/profile/user/:user_id GET Информация о пользователе по его ID
headers(Content-Type, application/json)
http://localhost:5000/api/profile/experience PUT
headers(Content-Type, application/json; x-auth-token, <token>)
{
"title": "asdasdfaerqweqretq qwer ",
"company": "asdfeqwr qwer qa faf",
"location": "as werqwerdf",
"from": "1-1-2020",
"current": true,
"description": "Awdwe qwerqwerwq eqwrq ewq rrf"
}
http://localhost:5000/api/profile/experience/exp_id DELETE
headers(x-auth-token, <token>)
http://localhost:5000/api/profile GET Информация о всех пользователях
headers(Content-Type, application/json)
http://localhost:5000/api/profile/user/:user_id GET Информация о пользователе по его ID
headers(Content-Type, application/json)
http://localhost:5000/api/profile/education PUT
headers(Content-Type, application/json; x-auth-token, <token>)
{
"school": "asdasdfaerqweqretq qwer ",
"degree": "asdfeqwr qwer qa faf",
"fieldofstudy": "as werqwerdf",
"from": "1-1-2020",
"current": true,
"description": "Awdwe qwerqwerwq eqwrq ewq rrf"
}
http://localhost:5000/api/profile/education/edu_id DELETE
headers(x-auth-token, <token>)
http://localhost:5000/api/profile/github/:username GET
http://localhost:5000/api/posts POST
headers(Content-Type, application/json; x-auth-token, <token>)
{
"text": ""
}
http://localhost:5000/api/posts GET
headers(x-auth-token, <token>)
http://localhost:5000/api/posts/:id GET
headers(Content-Type, application/json; x-auth-token, <token>)
http://localhost:5000/api/posts DELETE
headers(Content-Type, application/json; x-auth-token, <token>)
http://localhost:5000/api/posts/like/:id PUT
headers(Content-Type, application/json; x-auth-token, <token>)
http://localhost:5000/api/posts/unlike/:id PUT
headers(Content-Type, application/json; x-auth-token, <token>)
http://localhost:5000/api/posts/api/comment/:id POST
headers(Content-Type, application/json; x-auth-token, <token>)
{
"text": ""
}
http://localhost:5000/api/posts/comment/:id/:comment_id DELETE
headers(Content-Type, application/json; x-auth-token, <token>)