Skip to content

Commit 62eb892

Browse files
author
Tony Bedford
committed
Fix and test Users.
1 parent 9426233 commit 62eb892

File tree

7 files changed

+21
-14
lines changed

7 files changed

+21
-14
lines changed

conversation/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ Create a new Conversation before moving on to testing User. Make sure you update
4141

4242
### User
4343

44-
Create a User
45-
List Users
46-
Create a User
47-
Get a User
48-
Update a User
49-
Delete a User
50-
Get a User Conversations
44+
1. Create a User - set the variable `USER_ID` in your `config.local.sh` file.
45+
2. List Users
46+
3. Get a User
47+
4. Update a User - then use get-user.sh to make sure the user was updated.
48+
5. Get a User Conversations - the user has not been joined to any conversations so this will be an empty array.
49+
6. Delete a User - list users to confirm empty array is returned.
50+
51+
Create a new User before proceeding. Make sure you update `config.local.sh`.
5152

5253
### Member
5354

conversation/user/create-user.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
source "../config.sh"
3+
source "../../config.sh"
4+
source "../../jwt.sh"
45

56
curl -X "POST" "https://api.nexmo.com/beta/users" \
67
-H 'Authorization: Bearer '$JWT\

conversation/user/delete-user.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
source "../config.sh"
3+
source "../../config.sh"
4+
source "../../jwt.sh"
45

56
curl -X "DELETE" "https://api.nexmo.com/beta/users/$USER_ID" \
67
-H 'Authorization: Bearer '$JWT\

conversation/user/get-user.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
source "../config.sh"
3+
source "../../config.sh"
4+
source "../../jwt.sh"
45

56
curl "https://api.nexmo.com/beta/users/$USER_ID" \
67
-H 'Authorization: Bearer '$JWT\

conversation/user/list-user-conversations.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
source "../config.sh"
3+
source "../../config.sh"
4+
source "../../jwt.sh"
45

56
curl "https://api.nexmo.com/beta/users/$USER_ID/conversations" \
67
-H 'Authorization: Bearer '$JWT\

conversation/user/list-users.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
source "../config.sh"
3+
source "../../config.sh"
4+
source "../../jwt.sh"
45

56
curl "https://api.nexmo.com/beta/users" \
67
-H 'Authorization: Bearer '$JWT\

conversation/user/update-user.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/bin/bash
22

3-
source "../config.sh"
3+
source "../../config.sh"
4+
source "../../jwt.sh"
45

56
curl -X "PUT" "https://api.nexmo.com/beta/users/$USER_ID" \
67
-H 'Authorization: Bearer '$JWT\
78
-H 'Content-Type: application/json' \
89
-d $'{
910
"name": "ANOTHER_NEW_NAME",
10-
"display_name": "A New Display Name"
11+
"display_name": "Another New Display Name"
1112
}'
1213

1314

0 commit comments

Comments
 (0)