iro/offer/smstrade.py
branchdevel
changeset 186 b381eaa774ab
parent 183 07ee5543751b
child 213 3620bacf1152
equal deleted inserted replaced
185:8ad6c097bc5b 186:b381eaa774ab
    77             "concat_sms":('boolean',False),
    77             "concat_sms":('boolean',False),
    78             "message_id":('boolean',False),
    78             "message_id":('boolean',False),
    79             "count":('boolean',False),
    79             "count":('boolean',False),
    80             "cost":('boolean',False),
    80             "cost":('boolean',False),
    81            }
    81            }
    82     def __init__(self, name, config):       
    82     def __init__(self, name):       
    83         self.url = "https://gateway.smstrade.de"
    83         self.url = "https://gateway.smstrade.de"
    84         Provider.__init__(self,name,config,{"sms":["basic","economy","gold","direct"]})
    84         Provider.__init__(self, name, {"sms":["basic","economy","gold","direct"]})
    85         self.options.update({
    85         self.options.update({
    86             "key":Option(lambda x,y:x,long="smstrade Gateway Key https://login.smstrade.de/index.php?gateway", must=True)
    86             "key":Option(lambda x,y:x,long="smstrade Gateway Key https://login.smstrade.de/index.php?gateway", must=True)
    87             })
    87             })
    88         self.loadConfig()
       
    89 
    88 
    90     def send(self, route, sms, recipient):
    89     def send(self, route, sms, recipient):
    91         """send SMS with $sms to $recipients"""
    90         """send SMS with $sms to $recipients"""
    92         logger.debug('smstrade.sendSMS(%s,%s)'%(sms,  recipient))
    91         logger.debug('smstrade.sendSMS(%s,%s)'%(sms,  recipient))
    93         route = unicode(route)
    92         route = unicode(route)