systemcatch / eiapy

A simple wrapper for the U.S. Energy Information Administration API
https://pypi.org/project/eiapy/
MIT License
23 stars 8 forks source link

Allow only data to be returned #9

Open systemcatch opened 6 years ago

systemcatch commented 6 years ago

Is it worth allowing just data to be returned? Something like this;

>>> from eiapy import Series
>>> cal_to_mex = Series('EBA.CISO-CFE.ID.H')
>>> cal_to_mex.last(5, data_only=True)
[['20180401T07Z', -11],
['20180401T06Z', -16],
['20180401T05Z', -11],
['20180401T04Z', -7],
['20180401T03Z', -5]]

This saves the user having to inspect the response and add something like ['series'][0]['data'] to get pure data. However this is quite a bit of work to implement, does it provide much value?