@@ -188,15 +188,15 @@ def get_reading_time(*args, **kwargs):
188188 'documentationUrl' , 'footNote' ]]
189189
190190
191- def get_series (jurisdictionID = None , verbose = 0 ):
191+ def get_series (jurisdictionID = None , documentType = None , verbose = 0 ):
192192 """
193193 Get series and date metadata for all or one specific jurisdiction
194194
195195 Args: jurisdictionID (optional): ID for the jurisdiction
196196
197197 Returns: pandas dataframe with the metadata
198198 """
199- url_call = series_url (jurisdictionID )
199+ url_call = series_url (jurisdictionID , documentType )
200200 if verbose :
201201 print (f'API call: { url_call } ' )
202202 return clean_columns (json_normalize (requests .get (url_call ).json ()))
@@ -391,11 +391,17 @@ def list_industries(keyword=None, codeLevel=3, standard='NAICS', onlyID=False):
391391 i ["industryName" ]: i ["industryID" ] for i in json }.items ()))
392392
393393
394- def series_url (jurisdictionID ):
394+ def series_url (jurisdictionID , documentType = None ):
395395 """Gets url call for series endpoint."""
396396 url_call = URL + '/series'
397- if jurisdictionID :
397+ if jurisdictionID and documentType :
398+ url_call += (
399+ f'?jurisdiction={ jurisdictionID } &'
400+ f'documentType={ documentType } ' )
401+ elif jurisdictionID :
398402 url_call += f'?jurisdiction={ jurisdictionID } '
403+ elif documentType :
404+ url_call += f'?documentType={ documentType } '
399405 return url_call
400406
401407
0 commit comments