本文整理汇总了Python中twilio.twiml.Response.addDial方法的典型用法代码示例。如果您正苦于以下问题:Python Response.addDial方法的具体用法?Python Response.addDial怎么用?Python Response.addDial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类twilio.twiml.Response
的用法示例。
在下文中一共展示了Response.addDial方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testAddConferenceConvenceMethod
# 需要导入模块: from twilio.twiml import Response [as 别名]
# 或者: from twilio.twiml.Response import addDial [as 别名]
def testAddConferenceConvenceMethod(self):
""" add a conference to a dial, conviently"""
r = Response()
d = r.addDial()
d.addConference("My Room")
r = self.strip(r)
self.assertEquals(r, '<?xml version="1.0" encoding="utf-8"?><Response><Dial><Conference>My Room</Conference></Dial></Response>')
示例2: testAddNumberConvience
# 需要导入模块: from twilio.twiml import Response [as 别名]
# 或者: from twilio.twiml.Response import addDial [as 别名]
def testAddNumberConvience(self):
"""add a number to a dial, convience method"""
r = Response()
d = r.addDial()
d.addNumber("1231231234")
r = self.strip(r)
self.assertEquals(r, '<?xml version="1.0" encoding="utf-8"?><Response><Dial><Number>1231231234</Number></Dial></Response>')
示例3: testAddNumberConvenienceStatusCallbackEvent
# 需要导入模块: from twilio.twiml import Response [as 别名]
# 或者: from twilio.twiml.Response import addDial [as 别名]
def testAddNumberConvenienceStatusCallbackEvent(self):
""" add a number to a dial, convience method """
r = Response()
d = r.addDial()
d.addNumber("1231231234", statusCallback="http://example.com", statusCallbackEvent="initiated completed")
r = self.strip(r)
assert_equal(r, '<?xml version="1.0" encoding="UTF-8"?><Response><Dial><Number statusCallback="http://example.com" statusCallbackEvent="initiated completed">1231231234</Number></Dial></Response>')
示例4: testConvienceMethod
# 需要导入模块: from twilio.twiml import Response [as 别名]
# 或者: from twilio.twiml.Response import addDial [as 别名]
def testConvienceMethod(self):
""" should dial to a url via post"""
r = Response()
r.addDial()
r = self.strip(r)
self.assertEquals(r, '<?xml version="1.0" encoding="utf-8"?><Response><Dial /></Response>')