예제 #1
0
 def add_subscriber(self, email_address, data):
     sub = ET_Subscriber()
     sub.auth_stub = self.client
     sub.props = {
         'EmailAddress': email_address,
         'SubscriberKey': email_address,
         'Attributes': self.build_attributes(data)
     }
     response = sub.post()
     return self.process_result(response)
예제 #2
0
 def add_subscriber(self, email_address, data, list_ids=None):
     sub = ET_Subscriber()
     sub.auth_stub = self.client
     sub.props = {
         'EmailAddress': email_address,
         'SubscriberKey': email_address,
         'Attributes': self.build_attributes(data)
     }
     if list_ids:
         sub.props['Lists'] = self.build_lists(list_ids)
     response = sub.post()
     return self.process_result(response)