-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusecase.sh
48 lines (36 loc) · 1.01 KB
/
usecase.sh
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
//user
curl -X POST -H "Content-Type: application/json" -d '
{
"userId": "[email protected]",
"name": "Test User"
}' "http://localhost:3024/users"
//identity
curl -X POST -H "Content-Type: application/json" -d '
{
"userId": "[email protected]",
"serviceId": "facebookmessengerbotappcivist",
"identity": "1446417348757530",
"enabled": true
}' "http://localhost:3024/identities"
//preference
curl -X POST -H "Content-Type: application/json" -d '
{
"userId": "[email protected]",
"serviceId": "facebookmessengerbotappcivist"
}' "http://localhost:3024/preferences"
curl http://localhost:3024/preferences
//update preference
curl -X PUT -H "Content-Type: application/json" -d '
{
"serviceId": "anewservice"
}' "http://localhost:3024/preferences/[email protected]"
curl http://localhost:3024/preferences
//message
curl -X POST -H "Content-Type: application/json" -d '{
"to": {
"name": "[email protected]"
},
"message": {
"text": "hello, world!"
}
}' "http://localhost:3024/messages"