Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.

Commit

Permalink
adding missing resources to base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward F. Long, Jr committed Dec 29, 2011
1 parent 04d4c28 commit 24e125b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aweber_api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
Expand All @@ -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')
Expand Down

0 comments on commit 24e125b

Please sign in to comment.