-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathendpoints.json
41 lines (41 loc) · 1.26 KB
/
endpoints.json
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
{
"endpoints": {
"topics": {
"GET": {
"/api/topics": "returns all the topics",
"/api/topics/:topicName": "returns the topic info, by given topic name"
},
"POST": {
"/api/topics": "returns the newly POSTED topic"
}
},
"articles": {
"GET": {
"/api/articles": "returns all the articles",
"/api/articles/:article_id": "returns all the articles by the given article_id",
"/api/articles/:article_id/comments": "returns all the comments for a given article, by a article_id"
},
"PATCH": {
"/api/articles/:article_id": "returns a patched article by given article_id"
},
"POST": {
"/api/articles/:article_id/comments": "returns the newly POSTED comment, POSTED to a given article_id"
}
},
"comments": {
"PATCH": {
"/api/comments/:comment_id": "returns the comment by the given comment_id"
},
"DELETE": {
"/api/comments/:comment_id": "returns the deleted comment by comment_id"
}
},
"users": {
"POST": { "/api/users": "returns the newly POSTED user" },
"GET": {
"/api/users/:username": "returns the user by the username given",
"/api/users": "returns all users"
}
}
}
}