From 24e125b22e45da0ccb4c8b921dffb12270aad03a Mon Sep 17 00:00:00 2001 From: "Edward F. Long, Jr" Date: Thu, 29 Dec 2011 14:28:14 -0500 Subject: [PATCH] adding missing resources to base.py --- aweber_api/base.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aweber_api/base.py b/aweber_api/base.py index ba8e51a..24d4e1c 100644 --- a/aweber_api/base.py +++ b/aweber_api/base.py @@ -13,16 +13,20 @@ class AWeberBase(object): """ Provides functionality shared accross all AWeber objects """ - collections_map = { 'account' : ['lists', 'integrations'], 'broadcast_campaign' : ['links', 'messages'], + 'component': [], + 'custom_field': [], 'followup_campaign' : ['links', 'messages'], + 'integration': [], 'link' : ['clicks'], 'list' : ['campaigns', 'custom_fields', 'subscribers', 'web_forms', 'web_form_split_tests'], 'message' : ['opens', 'tracked_events'], + 'service-root': 'accounts', 'subscriber' : [], + 'tracked_events': [], 'web_form': [], 'web_form_split_test' : ['components'] } @@ -46,7 +50,7 @@ def _read_response(self, url, response): if 'entries' in response: from aweber_api.collection import AWeberCollection return AWeberCollection(url, response, self.adapter) - if 'id' in response: + if 'resource_type_link' in response: from aweber_api.entry import AWeberEntry return AWeberEntry(url, response, self.adapter) raise TypeError('Unknown value returned')