From a2dd6c1a039439e4dd5024533b8bc426d852890b Mon Sep 17 00:00:00 2001 From: Nevio <0x19@users.noreply.github.com> Date: Fri, 6 Jun 2014 14:23:02 +0200 Subject: [PATCH 01/12] Removing whitespace --- telapi/data/telapi.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/telapi/data/telapi.json b/telapi/data/telapi.json index 8dc24ca..37b44b5 100644 --- a/telapi/data/telapi.json +++ b/telapi/data/telapi.json @@ -610,7 +610,7 @@ "Ping", "PlayLastRecording" ], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/response/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/response/", "blank": false }, "Say": { @@ -620,7 +620,7 @@ "language" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/say/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/say/", "blank": false }, "Play": { @@ -628,7 +628,7 @@ "loop" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/play/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/play/", "blank": false }, "Gather": { @@ -644,7 +644,7 @@ "Play", "Pause" ], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/gather/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/gather/", "blank": true }, "Record": { @@ -662,7 +662,7 @@ "fileFormat" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/record/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/record/", "blank": true }, "Dial": { @@ -693,7 +693,7 @@ "Conference", "Sip" ], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/dial/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/dial/", "blank": false }, "Number": { @@ -703,7 +703,7 @@ "url" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/dial/number/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/dial/number/", "blank": false }, "Conference": { @@ -723,7 +723,7 @@ "stayAlone" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/dial/conference/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/dial/conference/", "blank": false }, "Sip": { @@ -732,7 +732,7 @@ "method" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/dial/sip/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/dial/sip/", "blank": false }, "Hangup": { @@ -740,7 +740,7 @@ "schedule" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/hangup/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/hangup/", "blank": false }, "Redirect": { @@ -748,7 +748,7 @@ "method" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/redirect/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/redirect/", "blank": true }, "Reject": { @@ -756,7 +756,7 @@ "reason" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/reject/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/reject/", "blank": true }, "Pause": { @@ -764,7 +764,7 @@ "length" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/pause/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/pause/", "blank": true }, "Sms": { @@ -777,7 +777,7 @@ "statusCallbackMethod" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/sms/sms/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/sms/sms/", "blank": false }, "Ping": { @@ -785,13 +785,13 @@ "method" ], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/ping/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/ping/", "blank": false }, "PlayLastRecording": { "attributes": [], "nesting": [], - "docs_url": "http: //www.telapi.com/docs/api/inboundxml/voice/playlastrecording/", + "docs_url": "http://www.telapi.com/docs/api/inboundxml/voice/playlastrecording/", "blank": true } } From 1173e07628b024268139cc0498c09de42af9a14d Mon Sep 17 00:00:00 2001 From: Matt Williamson Date: Mon, 16 Jun 2014 16:02:29 -0400 Subject: [PATCH 02/12] Resolves #7 --- telapi/inboundxml/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telapi/inboundxml/__init__.py b/telapi/inboundxml/__init__.py index 9076e26..697775d 100644 --- a/telapi/inboundxml/__init__.py +++ b/telapi/inboundxml/__init__.py @@ -2,6 +2,7 @@ from new import classobj from telapi.schema import SCHEMA + class Element(object): """Root XML element. Also, base class for all other InboundXML elements""" @@ -41,7 +42,7 @@ def __unicode__(self): attribute_string = ' ' + ' '.join(['%s="%s"' % (escape(unicode(k)), escape(unicode(v))) for k, v in self._attributes.items()]) - return u"<%s%s>%s" % (self._element_name, attribute_string, body_string, self._element_name) + return u"<%s%s>%s" % (self._element_name, attribute_string, escape(body_string), self._element_name) def _ensure_attribute(self, name): if name not in self._allowed_attributes: From 00d7561771dbf66852c39b8f946aed875cf06c42 Mon Sep 17 00:00:00 2001 From: Matt Williamson Date: Mon, 16 Jun 2014 16:21:04 -0400 Subject: [PATCH 03/12] Bumping versiion --- telapi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telapi/__init__.py b/telapi/__init__.py index f2df2ef..3fd1bb2 100644 --- a/telapi/__init__.py +++ b/telapi/__init__.py @@ -1,2 +1,2 @@ __all__ = ['rest', 'inboundxml', 'utils', 'schema'] -VERSION = '0.2.3' +VERSION = '0.2.4' From 54073d9b6b55bc41da20495a47a0643355993e72 Mon Sep 17 00:00:00 2001 From: Nevio <0x19@users.noreply.github.com> Date: Tue, 17 Jun 2014 18:56:12 +0200 Subject: [PATCH 04/12] improving incoming_phone_numbers filter_params --- telapi/data/telapi.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/telapi/data/telapi.json b/telapi/data/telapi.json index 37b44b5..04f66dc 100644 --- a/telapi/data/telapi.json +++ b/telapi/data/telapi.json @@ -409,7 +409,13 @@ "update_params": { "voice_url": "VoiceUrl", "voice_url": "VoiceUrl" - } + }, + "filter_params": [ + "Contains", + "AreaCode", + "InRegion", + "InPostalCode" + ] }, "available_phone_numbers": { "name": "AvailablePhoneNumber", From f63299c0df54ddd5ff189cfe4c84a9bddcbc5fdd Mon Sep 17 00:00:00 2001 From: Nevio Vesic Date: Tue, 17 Jun 2014 19:30:25 +0200 Subject: [PATCH 05/12] new version 0.2.5 --- telapi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telapi/__init__.py b/telapi/__init__.py index 3fd1bb2..86fe5c3 100644 --- a/telapi/__init__.py +++ b/telapi/__init__.py @@ -1,2 +1,2 @@ __all__ = ['rest', 'inboundxml', 'utils', 'schema'] -VERSION = '0.2.4' +VERSION = '0.2.5' From 37f65c64c4608b5a7d55227e4f53a10ff65ec496 Mon Sep 17 00:00:00 2001 From: Michael Palumbo Date: Wed, 18 Jun 2014 01:08:14 +0000 Subject: [PATCH 06/12] Fixed escaping body of inboundxml Elements. --- telapi/inboundxml/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telapi/inboundxml/__init__.py b/telapi/inboundxml/__init__.py index 697775d..8038e83 100644 --- a/telapi/inboundxml/__init__.py +++ b/telapi/inboundxml/__init__.py @@ -32,7 +32,7 @@ def __str__(self): def __unicode__(self): attribute_string = '' - body_string = ''.join([unicode(child) for child in self._children]) or self._body + body_string = ''.join([unicode(child) for child in self._children]) or escape(unicode(self._body)) if not self._allow_blank and not body_string.strip(): raise ValueError('The "%s" element cannot be blank!' % @@ -42,7 +42,7 @@ def __unicode__(self): attribute_string = ' ' + ' '.join(['%s="%s"' % (escape(unicode(k)), escape(unicode(v))) for k, v in self._attributes.items()]) - return u"<%s%s>%s" % (self._element_name, attribute_string, escape(body_string), self._element_name) + return u"<%s%s>%s" % (self._element_name, attribute_string, body_string, self._element_name) def _ensure_attribute(self, name): if name not in self._allowed_attributes: From de536fe612b7da7211086117d304b11aea58abde Mon Sep 17 00:00:00 2001 From: Nevio Vesic Date: Wed, 18 Jun 2014 15:35:35 +0200 Subject: [PATCH 07/12] New version --- telapi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telapi/__init__.py b/telapi/__init__.py index 86fe5c3..2758722 100644 --- a/telapi/__init__.py +++ b/telapi/__init__.py @@ -1,2 +1,2 @@ __all__ = ['rest', 'inboundxml', 'utils', 'schema'] -VERSION = '0.2.5' +VERSION = '0.2.5.1' From 8df3da4883413399f5f2d9bbfa97ee260e7600b9 Mon Sep 17 00:00:00 2001 From: Michael Palumbo Date: Wed, 25 Jun 2014 23:21:54 +0000 Subject: [PATCH 08/12] Fix bug that does not allow unicode string to be passed as the first argument at the creation of an inboundxml Element. Ensure str or unicode strings will work. --- telapi/inboundxml/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telapi/inboundxml/__init__.py b/telapi/inboundxml/__init__.py index 8038e83..dee6775 100644 --- a/telapi/inboundxml/__init__.py +++ b/telapi/inboundxml/__init__.py @@ -19,7 +19,7 @@ def __init__(self, *args, **kwargs): self._children = [] for i, arg in enumerate(args): - if i == 0 and isinstance(arg, str): + if i == 0 and isinstance(arg, basestring): self._body = arg elif isinstance(arg, Element): self._children.append(arg) From 971fda4d60b2385087fb4e7da8865dc917105dbd Mon Sep 17 00:00:00 2001 From: Nevio Vesic Date: Mon, 30 Jun 2014 20:50:00 +0200 Subject: [PATCH 09/12] bumping version --- telapi/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telapi/__init__.py b/telapi/__init__.py index 2758722..35ad414 100644 --- a/telapi/__init__.py +++ b/telapi/__init__.py @@ -1,2 +1,2 @@ __all__ = ['rest', 'inboundxml', 'utils', 'schema'] -VERSION = '0.2.5.1' +VERSION = '0.2.5.2' From 54707fddecbd40314fe2cc211ce1759c49e851ad Mon Sep 17 00:00:00 2001 From: Tihomir Piha Date: Wed, 15 Oct 2014 23:36:14 +0200 Subject: [PATCH 10/12] fixed SendDigits --- telapi/data/telapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telapi/data/telapi.json b/telapi/data/telapi.json index 04f66dc..42f6954 100644 --- a/telapi/data/telapi.json +++ b/telapi/data/telapi.json @@ -229,7 +229,7 @@ "url": "Url", "method" : "Method", "timeout" : "Timeout", - "send_digits" : "SendDigits", + "send_digits" : "PlayDtmf", "status_callback" : "StatusCallback", "status_callback_method" : "StatusCallbackMethod", "fallback_url" : "FallbackUrl", From ca44d03d16eb04effc41a2435fa475cae8ff5235 Mon Sep 17 00:00:00 2001 From: Yedid Date: Tue, 24 Feb 2015 11:08:48 -0500 Subject: [PATCH 11/12] readme warning --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a34088d..a568dc2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +**PLEASE NOTE THAT THIS LIBRARY IS NOT ACTIVELY MAINTAINED BY TELAPI** + telapi-python ============= From a13dcb12f7ae5ca9f681b96f2802fff6ec2aff32 Mon Sep 17 00:00:00 2001 From: Matt Williamson Date: Mon, 25 Jan 2016 16:14:10 -0500 Subject: [PATCH 12/12] Added license file --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d4de9c1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2012, TelTech Systems, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file