modifications to enable financials api from bankfind
This commit is contained in:
parent
160576d073
commit
e9cccc7e8b
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user