Skip to content

Commit 488bd34

Browse files
committed
add documentType to get_periods
1 parent 951c443 commit 488bd34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

regcensus/api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def get_jurisdictions(jurisdictionID=''):
175175
return clean_columns(output)
176176

177177

178-
def get_periods(jurisdictionID=''):
178+
def get_periods(jurisdictionID='', documentType=3):
179179
"""
180180
Get dates available for all or one specific jurisdiction
181181
and compatible series IDs
@@ -187,7 +187,8 @@ def get_periods(jurisdictionID=''):
187187
if jurisdictionID:
188188
output = pd.io.json.json_normalize(
189189
requests.get(
190-
URL + f'/periods?jurisdiction={jurisdictionID}').json())
190+
URL + (f'/periods?jurisdiction={jurisdictionID}&'
191+
f'documentType={documentType}')).json())
191192
else:
192193
output = pd.io.json.json_normalize(
193194
requests.get(URL + f'/periods/available').json())

0 commit comments

Comments
 (0)