diff --git a/patreon/api.py b/patreon/api.py index 65427d7..20db40c 100644 --- a/patreon/api.py +++ b/patreon/api.py @@ -97,6 +97,10 @@ def head_and_tail(path): # Path was valid until leaf, at which point nothing was found if current_dict is None or (head is not None and tail is None): return None + + elif type(current_dict) == dict and head not in current_dict: + return None + # Path stopped before leaf was reached elif current_dict and type(current_dict) != six.text_type: raise Exception( @@ -135,4 +139,4 @@ def __as_utc(dt): return dt.astimezone(utc_timezone()) else: return dt.replace(tzinfo=utc_timezone()) - return dt \ No newline at end of file + return dt diff --git a/patreon/schemas/member.py b/patreon/schemas/member.py index a89cc5d..cba491c 100644 --- a/patreon/schemas/member.py +++ b/patreon/schemas/member.py @@ -9,11 +9,13 @@ class Attributes(object): full_name = 'full_name' email = 'email' pledge_relationship_start = 'pledge_relationship_start' + pledge_cadence = 'pledge_cadence' lifetime_support_cents = 'lifetime_support_cents' currently_entitled_amount_cents = 'currently_entitled_amount_cents' last_charge_date = 'last_charge_date' last_charge_status = 'last_charge_status' note = 'note' + next_charge_date = 'next_charge_date' will_pay_amount_cents = 'will_pay_amount_cents'