@@ -104,6 +104,28 @@ def __init__(self, choices, **options):
104104 else :
105105 self ._dict [opt ] = options [opt ]
106106
107+ class Answer (TropoAction ):
108+ """
109+ Class representing the "answer" Tropo action. Builds a "answer" JSON object.
110+ Class constructor arg: headers, a Object
111+ Class constructor options: headers
112+ Convenience function: Tropo.answer()
113+
114+ (See https://www.tropo.com/docswebapi/answer)
115+
116+ { "answer": {
117+ "headers": Object } }
118+ """
119+ action = 'answer'
120+ options_array = []
121+
122+ def __init__ (self , headers , ** options ):
123+ self ._dict = {'headers' : headers }
124+ for opt in self .options_array :
125+ if opt in options :
126+ self ._dict [opt ] = options [opt ]
127+
128+
107129class Call (TropoAction ):
108130 """
109131 Class representing the "call" Tropo action. Builds a "call" JSON object.
@@ -820,6 +842,15 @@ def ask(self, choices, **options):
820842 self ._steps .append (Ask (choices , ** options ).obj )
821843
822844
845+ def answer (self , headers , ** options ):
846+ """
847+ Places a call or sends an an IM, Twitter, or SMS message. To start a call, use the Session API headers tell Tropo headers launch your code.
848+ Arguments: headers is a String.
849+ Argument: **options is a set of optional keyword arguments.
850+ See https://www.tropo.com/docs/webapi/answer
851+ """
852+ self ._steps .append (Answer (headers , ** options ).obj )
853+
823854 def call (self , to , ** options ):
824855 """
825856 Places a call or sends an an IM, Twitter, or SMS message. To start a call, use the Session API to tell Tropo to launch your code.
0 commit comments