def get_lead_activity(self, email=None): if not email or not isinstance(email, (str, unicode)): raise ValueError('Must supply an email as a non empty string.') body = get_lead_activity.wrap(email) response = self.request(body) if response.status_code == 200: return get_lead_activity.unwrap(response) else: raise Exception(response.text)
def get_lead_activity(self, email=None, key_value=None, key_type='EMAIL', activity_types=None, limit=100, offset=0): if email: key_value = email key_type = 'EMAIL' if not key_value or not isinstance(key_value, (str, unicode)): raise ValueError('Must supply a key_value(i.e. email) as a non empty string.') body = get_lead_activity.wrap(key_type=key_type, key_value=key_value, activity_types=activity_types, batch_size=limit, offset=offset) response = self.request(body) print response.content if response.status_code == 200: return get_lead_activity.unwrap(response) else: raise Exception(response.text)