@@ -46,9 +46,26 @@ def __init__(self, session: EdgarSession) -> None:
4646 self .params = {
4747 'action' : 'getcompany' ,
4848 'output' : 'atom' ,
49+ 'company' : '' ,
4950 'CIK' : '' ,
5051 'start' : '0' ,
51- 'count' : '100'
52+ 'Count' : '100' ,
53+ 'datea' : '' ,
54+ 'dateb' : ''
55+ }
56+
57+ def _reset_params (self ) -> None :
58+ """Resets the params for the next request."""
59+
60+ self .params = {
61+ 'CIK' : '' ,
62+ 'company' : '' ,
63+ 'Count' : '100' ,
64+ 'action' : 'getcompany' ,
65+ 'output' : 'atom' ,
66+ 'start' : '' ,
67+ 'datea' : '' ,
68+ 'dateb' : ''
5269 }
5370
5471 def __repr__ (self ) -> str :
@@ -106,7 +123,7 @@ def get_filings_by_cik(self, cik: str, start: int = 0, number_of_filings: int =
106123 num_of_items = number_of_filings
107124 )
108125
109- self .params [ 'CIK' ] = ''
126+ self ._reset_params ()
110127
111128 return response
112129
@@ -169,8 +186,7 @@ def get_filings_by_type(self, cik: str, filing_type: Union[str, Enum], start: in
169186 num_of_items = number_of_filings
170187 )
171188
172- self .params ['CIK' ] = ''
173- self .params ['type' ] = ''
189+ self ._reset_params ()
174190
175191 return response
176192
@@ -268,22 +284,16 @@ def query(
268284 start = start
269285 )
270286
271- self .params ['start' ] = start
272- self .params ['CIK' ] = cik
273- self .params ['SIC' ] = sic
274- self .params ['type' ] = filing_type
275- self .params ['company' ] = company_name
276- self .params ['datea' ] = after_date
277- self .params ['dateb' ] = before_date
287+ self ._reset_params ()
278288
279289 return entries
280290
281291 def get_filings_by_company_name (
282- self ,
283- company_name : str ,
284- number_of_filings : int = 100 ,
285- start : int = 0
286- ) -> List [dict ]:
292+ self ,
293+ company_name : str ,
294+ number_of_filings : int = 100 ,
295+ start : int = 0
296+ ) -> List [dict ]:
287297 """Returns all the filings (ownership and non-ownership).
288298
289299 ### Parameters
@@ -322,6 +332,6 @@ def get_filings_by_company_name(
322332 start = start
323333 )
324334
325- self .params [ 'company' ] = ''
335+ self ._reset_params ()
326336
327337 return entries
0 commit comments