class TwilioVocalizer(object): def __init__(self): self.wrapper = TwilioWrapper() self.vocalizer = Vocalizer() def vocalize(self, action_type, number, message=None): statement = "I am now %s number %s" % (action_type, number) if action_type == "messaging": self.wrapper.message_home(message) statement += " with message %s" % message elif action_type == "calling": self.wrapper.call_home() self.vocalizer.vocalize(statement)
def __init__(self): self.wrapper = TwilioWrapper() self.vocalizer = Vocalizer()