Skip to content

Commit 3249cbf

Browse files
committed
examples: Add an extension example
1 parent 4fdb601 commit 3249cbf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

examples/extension.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env python
2+
"""Example of using the sample client to get an extension
3+
4+
Copyright (C) 2015, Digium, Inc.
5+
Matthew Jordan <[email protected]>
6+
"""
7+
8+
from pyswitchvox.client import Client
9+
10+
URL = '127.0.0.1'
11+
USERNAME = 'admin'
12+
PASSWORD = 'password'
13+
14+
client = Client(URL, USERNAME, PASSWORD)
15+
resp = client.extensions.getInfo(extensions=['100'])
16+
17+
print resp

0 commit comments

Comments
 (0)