diff --git a/bankfind/__init__.py b/bankfind/__init__.py index 10507a9..a514528 100644 --- a/bankfind/__init__.py +++ b/bankfind/__init__.py @@ -4,5 +4,5 @@ __version__ = '0.0.1' from .main import (get_failures, get_history, get_institutions, # noqa - get_locations, get_summary) + get_locations, get_summary, get_financials) from .metadata import meta_dict # noqa diff --git a/bankfind/base.py b/bankfind/base.py index 21a1b9a..6e7f400 100644 --- a/bankfind/base.py +++ b/bankfind/base.py @@ -50,6 +50,14 @@ class BF: 'offset': 0, 'format': 'json', 'search': False + }, + 'financials': { + 'sort_by': 'REPDTE', + 'sort_order': 'DESC', + 'limit': 10000, + 'offset': 0, + 'format': 'json', + 'download': False } } @@ -121,6 +129,7 @@ class BF: search: str = None, **kwargs): params = self._construct_params(key, filters, search, **kwargs) + print(urllib.parse.urlencode(params)) r = requests.get( f"https://banks.data.fdic.gov/api/{key}", params=urllib.parse.urlencode(params) diff --git a/bankfind/metadata/__init__.py b/bankfind/metadata/__init__.py index dd0c6d3..2a240dd 100644 --- a/bankfind/metadata/__init__.py +++ b/bankfind/metadata/__init__.py @@ -3,6 +3,7 @@ from .history import history_dict from .institution import institution_dict from .location import location_dict from .summary import summary_dict +from .financials import financials_dict meta_dict = { @@ -10,5 +11,6 @@ meta_dict = { 'history': history_dict, 'institutions': institution_dict, 'locations': location_dict, - 'summary': summary_dict + 'summary': summary_dict, + 'financials': financials_dict }