forked from mauriciodeoliveirareis/CityBuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restApiUsage.txt
69 lines (39 loc) · 1.38 KB
/
restApiUsage.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
Gets the last inserted question
http://localhost:3000/getLastQuestion
Gets all the questions
http://localhost:3000/getQuestions
Gets all the questions with category Culture
http://localhost:3000/getQuestions?category=Culture
Gets all the answers
http://localhost:3000/getAnswers
Gets all the answers from the question with id 54fb0a2df16479f81d56a4f0
http://localhost:3000/getAnswers?question_id=54fb0a2df16479f81d56a4f0
//insert two questions at once
curl -X POST -H "Content-Type: application/json" -d '[
{
"Question": "Do you like your neighbourhood?",
"category": "Culture"
}
,{
"Question": "Did you grow up in your neighbourhood?",
"category": "Culture"
}
]' http://localhost:3000/putQuestionList
curl -X POST -H "Content-Type: application/json" -d '[
{
"Question": "Have you ever feel uncorfortable in the presence of some adult?",
"category": "Molestation"
}
,{
"Question": "Have you ever feel uncorfortable in the presence of some kid?",
"category": "Bulling"
}
]' http://localhost:3000/putQuestionList
curl -X POST -H "Content-Type: application/json" -d '{
"Question": "Have you ever feel uncorfortable with the presence of a deadline?",
"category": "Molestation"
}' http://localhost:3000/putQuestion
curl -X POST -H "Content-Type: application/json" -d '{
"Question": "Am I the last one?",
"category": "Molestation"
}' http://localhost:3000/putQuestion