Skip to content

Commit c2fdc06

Browse files
authored
Merge pull request #27 from QuantGov/list-series-fix
0.4.5
2 parents 49b3283 + c464475 commit c2fdc06

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

regcensus/api.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,22 +336,26 @@ def list_document_types(jurisdictionID=None, verbose=0):
336336
for d in json if d["subtypeName"]}.items()))
337337

338338

339-
def list_series(jurisdictionID=None, documentType=None):
339+
def list_series(jurisdictionID, documentType=None):
340340
"""
341-
Args: jurisdictionID (optional): ID for the jurisdiction
341+
Args:
342+
jurisdictionID: ID for the jurisdiction
343+
documentType (optional): ID for type of document
342344
343345
Returns: dictionary containing names of series and associated IDs
344346
"""
345-
url_call = series_url(jurisdictionID, documentType)
347+
url_call = periods_url(jurisdictionID, documentType)
346348
json = requests.get(url_call).json()
347349
return dict(sorted({
348-
s["seriesName"]: s["seriesID"]
350+
s["series"]["seriesName"]: s["series"]["seriesID"]
349351
for s in json}.items()))
350352

351353

352354
def list_dates(jurisdictionID, documentType=None, verbose=0):
353355
"""
354-
Args: jurisdictionID: ID for the jurisdiction
356+
Args:
357+
jurisdictionID: ID for the jurisdiction
358+
documentType (optional): ID for type of document
355359
356360
Returns: list of dates available for the jurisdiction
357361
"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name='regcensus',
7-
version='0.4.4',
7+
version='0.4.5',
88
description='Python package for accessing data from the QuantGov API',
99
url='https://github.com/QuantGov/regcensus-api-python',
1010
author='QuantGov',

0 commit comments

Comments
 (0)