phpanhey / comdirect_financialreport

generates an overview diagramm of your last 5 month income/expenses with the help of comdirect-rest api.
5 stars 1 forks source link

merged get_transactions, get_date_object & get_month_transactions #2

Closed gerritnowald closed 1 year ago

gerritnowald commented 1 year ago

Hi! While adapting your code to my project (https://github.com/gerritnowald/budget_book), I realized that the functions get_transactions, get_date_object & get_month_transactions can be merged, to make the code shorter and more concise. get_date_object is only needed because the date format is defined differently in get_month_transactions. Then get_month_transactions basically is just a wrapper for get_transactions, which is not used anywhere else, so they can be merged. Also I replaced the while loop with a for loop.

I tested it by converting my transactions to a dataframe and displaying it. I did not test the figure creation & signal bot parts, but they should still work if the output from get_month_transactions is the same.