@@ -195,7 +195,7 @@ def get_periods(jurisdictionID=''):
195195 if jurisdictionID :
196196 output = pd .io .json .json_normalize (
197197 requests .get (
198- URL + f'/periods?jurisdictionID ={ jurisdictionID } ' ).json ())
198+ URL + f'/periods?jurisdiction ={ jurisdictionID } ' ).json ())
199199 else :
200200 output = pd .io .json .json_normalize (
201201 requests .get (URL + f'/periods/available' ).json ())
@@ -228,23 +228,33 @@ def list_topics():
228228 """
229229 Returns: a dictionary containing names of topics and associated IDs
230230 """
231- json = requests .get (URL + f'/topics' ).json ()
231+ json = requests .get (URL + f'/topics/ ' ).json ()
232232 return dict (sorted ({t ["topicName" ]: t ["topicID" ] for t in json }.items ()))
233233
234234
235235def list_series ():
236236 """
237237 Returns: dictionary containing names of series and associated IDs
238238 """
239- json = requests .get (URL + f'/series' ).json ()
239+ json = requests .get (URL + f'/series/ ' ).json ()
240240 return dict (sorted ({s ["seriesName" ]: s ["seriesID" ] for s in json }.items ()))
241241
242242
243+ def list_document_types ():
244+ """
245+ Returns: a dictionary containing names of documenttypes and associated IDs
246+ """
247+ json = requests .get (URL + f'/documenttypes/' ).json ()
248+ return dict (sorted ({
249+ d ["subtypeName" ]: d ["documentSubtypeID" ]
250+ for d in json if d ["subtypeName" ]}.items ()))
251+
252+
243253def list_agencies ():
244254 """
245255 Returns: dictionary containing names of agencies and associated IDs
246256 """
247- json = requests .get (URL + '/agencies' ).json ()
257+ json = requests .get (URL + '/agencies/ ' ).json ()
248258 return dict (sorted ({
249259 a ["agencyName" ]: a ["agencyID" ]
250260 for a in json if a ["agencyName" ]}.items ()))
@@ -254,7 +264,7 @@ def list_jurisdictions():
254264 """
255265 Returns: dictionary containing names of jurisdictions and associated IDs
256266 """
257- json = requests .get (URL + f'/jurisdictions' ).json ()
267+ json = requests .get (URL + f'/jurisdictions/ ' ).json ()
258268 return dict (sorted ({
259269 j ["jurisdictionName" ]: j ["jurisdictionID" ] for j in json }.items ()))
260270
@@ -266,7 +276,7 @@ def list_industries(jurisdictionID):
266276 Returns: dictionary containing names of industries and their NAICS codes
267277 """
268278 json = requests .get (
269- URL + f'/industries?jurisdiction={ jurisdictionID } ' ).json ()
279+ URL + f'/industries?jurisdiction={ jurisdictionID } / ' ).json ()
270280 return dict (sorted ({
271281 i ["industryName" ]: i ["industryCode" ] for i in json }.items ()))
272282
0 commit comments