-
Notifications
You must be signed in to change notification settings - Fork 23
Description
When I make requests and use the groupby keyword for methods such as: latest, the groupby keyword is limited to MNET, GACC, and SUBGACC and other key words result in a MesoPyError.
Docs state:
groupby: string, optional
Results can be grouped by key words: state, county, country, cwa, nwszone, mwsfirezone, gacc, subgacc
e.g. groupby='state'
However, behavior is:
latest = meso.latest(stid=','.join(afc), groupby='nwszone')
MesoPyError Traceback (most recent call last)
in ()
----> 1 latest = meso.latest(stid=','.join(afc), groupby='nwszone')
/usr/local/lib/python3.6/site-packages/MesoPy.py in latest(self, **kwargs)
331 kwargs['token'] = self.token
332
--> 333 return self._get_response('stations/latest', kwargs)
334
335 def precip(self, start, end, **kwargs):
/usr/local/lib/python3.6/site-packages/MesoPy.py in _get_response(self, endpoint, request_dict)
160 except urllib.error.URLError:
161 raise MesoPyError(http_error)
--> 162 return self._checkresponse(json.loads(resp.decode('utf-8')))
163
164 def _check_geo_param(self, arg_list):
/usr/local/lib/python3.6/site-packages/MesoPy.py in _checkresponse(response)
119 elif response['SUMMARY']['RESPONSE_CODE'] == -1:
120 format_error = response['SUMMARY']['RESPONSE_MESSAGE']
--> 121 raise MesoPyError(format_error)
122 else:
123 raise MesoPyError(catch_error)
MesoPyError: 'GROUPBY must be either MNET, GACC, or SUBGACC.'
This is true for key words: state, county, country, cwa, nwszone, and mwsfirezone. And that last one seems like a typo, should mwsfirezone actually be: nwsfirezone?