File tree Expand file tree Collapse file tree 5 files changed +113
-0
lines changed Expand file tree Collapse file tree 5 files changed +113
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ import nexmo
3
+ from pprint import pprint
4
+
5
+ client = nexmo .Client (
6
+ key = NEXMO_API_KEY ,
7
+ secret = NEXMO_API_SECRET
8
+ )
9
+
10
+ response = client .application_v2 .create_application ({
11
+ "name" : "Code Example App" ,
12
+ "capabilities" : {
13
+ "messages" : {
14
+ "webhooks" : {
15
+ "inbound_url" : {
16
+ "address" : "https://example.com/webhooks/inbound" ,
17
+ "http_method" : "POST"
18
+ },
19
+ "status_url" : {
20
+ "address" : "https://example.com/webhooks/status" ,
21
+ "http_method" : "POST"
22
+ }
23
+ }
24
+ }
25
+ }
26
+ })
27
+
28
+ pprint (response )
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ import nexmo
3
+ from pprint import pprint
4
+
5
+ client = nexmo .Client (
6
+ key = NEXMO_API_KEY ,
7
+ secret = NEXMO_API_SECRET
8
+ )
9
+
10
+ response = client .application_v2 .delete_application (NEXMO_APPLICATION_ID )
11
+
12
+ pprint (response )
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ import nexmo
3
+ from pprint import pprint
4
+
5
+ client = nexmo .Client (
6
+ key = NEXMO_API_KEY ,
7
+ secret = NEXMO_API_SECRET
8
+ )
9
+
10
+ response = client .application_v2 .get_application (NEXMO_APPLICATION_ID )
11
+
12
+ pprint (response )
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ import nexmo
3
+ from pprint import pprint
4
+
5
+ client = nexmo .Client (
6
+ key = NEXMO_API_KEY ,
7
+ secret = NEXMO_API_SECRET
8
+ )
9
+
10
+ response = client .application_v2 .list_applications ()
11
+
12
+ pprint (response )
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ import nexmo
3
+ from pprint import pprint
4
+
5
+ client = nexmo .Client (
6
+ key = NEXMO_API_KEY ,
7
+ secret = NEXMO_API_SECRET
8
+ )
9
+
10
+ response = client .application_v2 .update_application (NEXMO_APPLICATION_ID , {
11
+ "name" : "Python Update App" ,
12
+ "capabilities" : {
13
+ "messages" : {
14
+ "webhooks" : {
15
+ "inbound_url" : {
16
+ "address" : "https://example.com/webhooks/inbound" ,
17
+ "http_method" : "POST"
18
+ },
19
+ "status_url" : {
20
+ "address" : "https://example.com/webhooks/status" ,
21
+ "http_method" : "POST"
22
+ }
23
+ }
24
+ },
25
+ "voice" : {
26
+ "webhooks" : {
27
+ "answer_url" : {
28
+ "address" : "https://example.com/webhooks/answer" ,
29
+ "http_method" : "POST"
30
+ },
31
+ "event_url" : {
32
+ "address" : "https://example.com/webhooks/event" ,
33
+ "http_method" : "POST"
34
+ }
35
+ }
36
+ },
37
+ "rtc" : {
38
+ "webhooks" : {
39
+ "event_url" : {
40
+ "address" : "https://example.com/webhooks/event" ,
41
+ "http_method" : "POST"
42
+ }
43
+ }
44
+ },
45
+ "vbc" : {}
46
+ }
47
+ })
48
+
49
+ pprint (response )
You can’t perform that action at this time.
0 commit comments