diff --git a/spending_summary.md b/spending_summary.md index 8323d88..57ec0d6 100644 --- a/spending_summary.md +++ b/spending_summary.md @@ -65,7 +65,8 @@ def get_some_transactions(access_token: str, start_date: str, end_date: str) -> ``` -Inspecting the output of `get_some_transactions`, we see that there are multiple accounts, 337 transactions among them, but only 100 transactions returned from this API call. Two of these accounts are for savings, so presumably they're only going to have transfers rather than purchases. + +Inspecting the output of `get_some_transactions`, we see that there are multiple accounts, 337 transactions among them, but only 100 transactions returned from this API call. Two of these accounts are for savings, so presumably they're only going to have transfers rather than purchases: ```python >>> from get_some_transactions_v1 import get_some_transactions @@ -96,7 +97,15 @@ Inspecting the output of `get_some_transactions`, we see that there are multiple ``` ## Get **The Right** Transactions -Looking at the transactions themselves, we see that there is a `category` field which sometimes has a list of values, sometimes `None`. Among the categories there are "Transfer", "Credit Card", and "Deposit": These aren't going to be useful in gleaning spending activity, so we'll refactor our `get_some_transactions` function to 1) skip transactions with those categories and 2) skip accounts with a subtype of "savings" or "cd". Let's also 3) make sure to get all available transactions by using pagination and 4) just return transactions. +Looking at the transactions themselves, we see that there is a `category` field which sometimes has a list of values, sometimes `None`. Among the categories there are "Transfer", "Credit Card", and "Deposit": These aren't going to be useful in gleaning spending activity, so we'll refactor our `get_some_transactions` function to + +1. skip transactions with those categories +2. skip accounts with a subtype of "savings" or "cd". + +Let's also + +3. make sure to get all available transactions by using pagination +4. just return transactions: ```python >>> some_transactions['transactions'].keys()