示例#1
0
    def call_create(self, source, destination, callFlow, webhook):
        """Creating a call

        Args:
            source(str)             : The caller ID of the call.
            destination(string)     : The number/address to be called.
            callFlow(object)        : The call flow object to be executed when the call is answered.
            webhook(object)         : The webhook object containing the url & required token.
        Raises:
            ErrorException          : On api returning errors

        Returns:
            Call(object)            : The Call object just created."""

        params = locals()
        del (params['self'])
        return Call().load(self.request('calls/', 'POST', params, VOICE_TYPE))
示例#2
0
 def call(self, id):
     """Retrieve the information of a specific call"""
     return Call().load(
         self.request('calls/' + str(id), 'GET', None, VOICE_TYPE))