File tree Expand file tree Collapse file tree 14 files changed +30
-54
lines changed Expand file tree Collapse file tree 14 files changed +30
-54
lines changed Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl -X " DELETE" " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID " \
6+ curl -X " DELETE" " https://api.nexmo.com/v1/conversations/$CONV_ID " \
77 -H ' Authorization: Bearer ' $JWT \
88 -H ' Content-Type: application/json'
99
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID " \
6+ curl " https://api.nexmo.com/v1/conversations/$CONV_ID " \
77 -H ' Authorization: Bearer ' $JWT \
8- -H ' Content-Type: application/json'
9-
10-
11-
8+ -H ' Content-Type: application/json'
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl -X " PUT" " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID " \
6+ curl -X " PUT" " https://api.nexmo.com/v1/conversations/$CONV_ID " \
77 -H ' Authorization: Bearer ' $JWT \
88 -H ' Content-Type: application/json' \
99 -d $' {
10- "name": "$CONV_NEW_NAME ",
11- "display_name": "$CONV_NEW_DISPLAY_NAME "
10+ "name": "$CONV_NAME ",
11+ "display_name": "$CONV_DISPLAY_NAME "
1212}'
1313
1414
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ source "../../config.sh"
44source " ../../jwt.sh"
55
66# `from` is only required if you're using a JWT with a `sub` claim
7- curl -X " POST" " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID /events" \
7+ curl -X " POST" " https://api.nexmo.com/v1/conversations/$CONV_ID /events" \
88 -H ' Authorization: Bearer ' $JWT \
99 -H ' Content-Type: application/json' \
1010 -d $' {
1111 "type": "custom:YOUR_EVENT_NAME",
12- "from": "' $MEMBER_ID ' ",
12+ "from": "' $CONV_EVENT_FROM ' ",
1313 "body": {
1414 "your": "data"
1515 }
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl -X " POST" " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID /events" \
6+ curl -X " POST" " https://api.nexmo.com/v1/conversations/$CONV_ID /events" \
77 -H ' Authorization: Bearer ' $JWT \
88 -H ' Content-Type: application/json' \
99 -d $' {
10- "type": "message ",
11- "from": "' $MEMBER_ID ' "
10+ "type": "' $CONV_EVENT_TYPE ' ",
11+ "from": "' $CONV_EVENT_FROM ' "
1212 "body": {
1313 "message_type": "text",
1414 "text": "string"
1515 }
16- }'
17-
18-
19-
16+ }'
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl -X " DELETE" " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID /events/$EVENT_ID " \
6+ curl -X " DELETE" " https://api.nexmo.com/v1/conversations/$CONV_ID /events/$CONV_EVENT_ID " \
77 -H ' Authorization: Bearer ' $JWT \
8- -H ' Content-Type: application/json'
9-
10-
11-
12-
8+ -H ' Content-Type: application/json'
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID /events/$EVENT_ID " \
6+ curl " https://api.nexmo.com/v1/conversations/$CONV_ID /events/$CONV_EVENT_ID " \
77 -H ' Authorization: Bearer ' $JWT \
88 -H ' Content-Type: application/json'
99
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID /events" \
6+ curl " https://api.nexmo.com/v1/conversations/$CONV_ID /events" \
77 -H ' Authorization: Bearer ' $JWT \
88 -H ' Content-Type: application/json'
99
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl -X " POST" " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID /members" \
6+ curl -X " POST" " https://api.nexmo.com/v1/conversations/$CONV_ID /members" \
77 -H ' Authorization: Bearer ' $JWT \
88 -H ' Content-Type: application/json' \
99 -d $' {
1010 "user": {
11- "id": "' $USER_ID ' "
12- }
13- "state": "invited ",
11+ "id": "' $CONV_USER_ID ' "
12+ },
13+ "state": "' $CONV_MEMBER_STATE ' ",
1414 "channel": {
1515 "type": "app"
1616 }
Original file line number Diff line number Diff line change 33source " ../../config.sh"
44source " ../../jwt.sh"
55
6- curl -X " DELETE" " https://api.nexmo.com/v1/conversations/$CONVERSATION_ID /members/$MEMBER_ID " \
6+ curl -X " DELETE" " https://api.nexmo.com/v1/conversations/$CONV_ID /members/$CONV_MEMBER_ID " \
77 -H ' Authorization: Bearer ' $JWT \
8- -H ' Content-Type: application/json'
9-
8+ -H ' Content-Type: application/json'
You can’t perform that action at this time.
0 commit comments