Closed gbilder closed 6 years ago
@gbilder
I will fix it.
Hello @gbilder
It seems it is a bug from previous versions. Are you trying with version 1.2.0?
Python 3.6.3 (default, Oct 3 2017, 21:45:48)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from crossref.restful import Works
In [2]: works = Works()
In [3]: works.filter(type='book').sample(10).url
Out[3]: 'https://api.crossref.org/works?filter=type%3Abook&sample=10'
In [4]: works.sample(10).filter(type='book').url
Out[4]: 'https://api.crossref.org/works?filter=type%3Abook&sample=10'
Does not seem to like filter before sample, but does not complain:
Sample before filter works as expected: