Bioconductor / GenomicDataCommons

Provide R access to the NCI Genomic Data Commons portal.
http://bioconductor.github.io/GenomicDataCommons/
84 stars 23 forks source link

Better mechanism for field checking in using filters in API calls #11

Closed seandavi closed 7 years ago

seandavi commented 7 years ago

Right now, the filters() function does the right thing, but only if the correct endpoint is specified in the call. Instead of having the user define the endpoint, it would be better to have each API call guarantee the correct endpoint and, thus, field checking in the call.

Instead of this:

cases(filters=filters(....,endpoint='cases'))

Do this:

cases(filters=FILTER_EXPRESSION)
# inside cases
filters = filters(FILTER_EXPRESSION,endoint='cases')