Did I find the right examples for you? yes no

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)
Gather digits from the caller's keypad

:param action: URL to which the digits entered will be sent
:param method: submit to 'action' url using GET or POST
:param numDigits: how many digits to gather before returning
:param timeout: wait for this many seconds before returning
:param finishOnKey: key that triggers the end of caller input

src/t/w/twilio-python-HEAD/tests/test_twiml.py   twilio-python(Download)
    def testEmpty(self):
        """ a gather with nothing inside"""
        r = Response()
        r.append(twiml.Gather())
        r = self.strip(r)
    def testNestedSayPlayPause(self):
        """ a gather with a say, play, and pause"""
        r = Response()
        g = twiml.Gather()
        g.append(twiml.Say("Hey"))
    def testAddAttribute(self):
        """add attribute"""
        r = twiml.Gather(foo="bar")
        r = self.strip(r)
        assert_equal(r, '<?xml version="1.0" encoding="UTF-8"?><Gather foo="bar" />')
 
    def testNoDeclaration(self):
        """add attribute"""
        r = twiml.Gather(foo="bar")
    def testImproperNesting(self):
        """ bad nesting"""
        verb = twiml.Gather()
        self.assertRaises(TwimlException, verb.append, twiml.Gather())
        self.assertRaises(TwimlException, verb.append, twiml.Record())

src/p/y/python-twilio2-HEAD/tests/test_twiml.py   python-twilio2(Download)
    def testEmpty(self):
        """ a gather with nothing inside"""
        r = Response()
        r.append(twiml.Gather())
        r = self.strip(r)
    def testNestedSayPlayPause(self):
        """ a gather with a say, play, and pause"""
        r = Response()
        g = twiml.Gather()
        g.append(twiml.Say("Hey"))
    def testAddAttribute(self):
        """add attribute"""
        r = twiml.Gather(foo="bar")
        r = self.strip(r)
        self.assertEquals(r, '<?xml version="1.0" encoding="utf-8"?><Gather foo="bar" />')
 
    def testNoDeclaration(self):
        """add attribute"""
        r = twiml.Gather(foo="bar")
    def testImproperNesting(self):
        """ bad nesting"""
        verb = twiml.Gather()
        self.assertRaises(TwimlException, verb.append, twiml.Gather())
        self.assertRaises(TwimlException, verb.append, twiml.Record())