File tree Expand file tree Collapse file tree 6 files changed +21
-12
lines changed Expand file tree Collapse file tree 6 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,15 @@ Create a new User before proceeding. Make sure you update `config.local.sh`.
5252
5353### Member
5454
55- Create a Member
56- List Members
57- Get a Member
58- Update a Member
59- Delete a Member
55+ 1 . Create a Member - this will invite a user into a conversation. Add the ` MEMBER_ID ` to your ` config.local.sh ` .
56+ 2 . List Members
57+ 3 . Get a Member
58+ 4 . Update a Member - this will change the member from ` invited ` to ` joined ` . Use get member to confirm.
59+ 5 . Delete a Member - Use list members to confirm deletion - the User will have a state ` LEFT ` as the mebership has been dissolved.
60+
61+ Create a new Member before proceeding. Make sure you update ` config.local.sh ` .
62+
63+ At this point you will have two members (with same ` USER_ID ` ), one with status ` LEFT ` and one with ` invited ` .
6064
6165### Event
6266
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- source " ../config.sh"
3+ source " ../../config.sh"
4+ source " ../../jwt.sh"
45
56curl -X " POST" " https://api.nexmo.com/beta/conversations/$CONVERSATION_ID /members" \
67 -H ' Authorization: Bearer ' $JWT \
78 -H ' Content-Type: application/json' \
89 -d $' {
9- "user_id": "$USER_ID",
10+ "user_id": "' $USER_ID ' ",
1011 "action": "invite",
1112 "channel": {
1213 "type": "app"
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- source " ../config.sh"
3+ source " ../../config.sh"
4+ source " ../../jwt.sh"
45
56curl -X " DELETE" " https://api.nexmo.com/beta/conversations/$CONVERSATION_ID /members/$MEMBER_ID " \
67 -H ' Authorization: Bearer ' $JWT \
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- source " ../config.sh"
3+ source " ../../config.sh"
4+ source " ../../jwt.sh"
45
56curl " https://api.nexmo.com/beta/conversations/$CONVERSATION_ID /members/$MEMBER_ID " \
67 -H ' Authorization: Bearer ' $JWT \
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- source " ../config.sh"
3+ source " ../../config.sh"
4+ source " ../../jwt.sh"
45
56curl " https://api.nexmo.com/beta/conversations/$CONVERSATION_ID /members" \
67 -H ' Authorization: Bearer ' $JWT \
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- source " ../config.sh"
3+ source " ../../config.sh"
4+ source " ../../jwt.sh"
45
56curl -X " PUT" " https://api.nexmo.com/beta/conversations/$CONVERSATION_ID /members/$MEMBER_ID " \
67 -H ' Authorization: Bearer ' $JWT \
78 -H ' Content-Type: application/json' \
89 -d $' {
9- "user_id": "$USER_ID",
10+ "user_id": "' $USER_ID ' ",
1011 "action": "join",
1112 "channel": {
1213 "type": "app"
You can’t perform that action at this time.
0 commit comments