def get_activity(self): """Invoke the API method to return all Subscriber activity. * Note: This method only works on Subscriber Entry resources. refer to the AWeber API Reference Documentation at https://labs.aweber.com/docs/reference/1.0#subscriber for more details on how to call this method. """ self._method_for('subscriber') params = {'ws.op': 'getActivity'} query_string = urlencode(params) url = '{0.url}?{1}'.format(self, query_string) data = self.adapter.request('GET', url) collection = aweber_api.AWeberCollection(url, data, self.adapter) collection._data['total_size'] = self._get_total_size(url) return collection
def findSubscribers(self, **kwargs): """Invoke the API method to find all subscribers on all Lists * Note: This method only works on Account Entry resources and requires access to subscriber information. please refer to the AWeber API Reference Documentation at https://labs.aweber.com/docs/reference/1.0#account for more details on how to call this method. """ self._method_for('account') params = {'ws.op': 'findSubscribers'} params.update(kwargs) query_string = urlencode(params) url = '{0.url}?{1}'.format(self, query_string) data = self.adapter.request('GET', url) collection = aweber_api.AWeberCollection(url, data, self.adapter) collection._data['total_size'] = self._get_total_size(url) return collection
def get_broadcasts(self, status, **kwargs): """Invoke the API method to retrieve broadcasts by status. * Note: This method only works on List Entry resources. Please refer to the AWeber API Reference Documentation at https://labs.aweber.com/docs/reference/1.0#get_broadcasts for more details on how to call this method. """ self._method_for('list') params = {'status': status} params.update(kwargs) query_string = urlencode(params) url = '{0.url}/broadcasts?{1}'.format(self, query_string) data = self.adapter.request('GET', url) collection = aweber_api.AWeberCollection(url, data, self.adapter) collection._data['total_size'] = self._get_broadcast_count( query_string) return collection