hubmapconsortium / hubmap-api-py-client

Python client for the Cells API
MIT License
1 stars 0 forks source link

Details for cluster doesn't work? #15

Closed mccalluc closed 3 years ago

mccalluc commented 3 years ago

Even if there's nothing extra to add, maybe just return the same thing as the list for API consistency?

>>> from cells_api_py_client import Client
>>> client = Client('https://cells.dev.hubmapconsortium.org/api/')

>>> clusters_with_gene = client.select_clusters(where='gene', has='CASTOR2')
>>> assert len(clusters_with_gene) > 0

>>> clusters_with_gene.get_list(1)[0].keys()
dict_keys(['cluster_method', 'cluster_data', 'grouping_name', 'dataset'])

>>> clusters_with_gene.get_details(1)[0].keys()
Traceback (most recent call last):
...
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
SFD5311 commented 3 years ago

Should be fixed with commit: https://github.com/hubmapconsortium/cross_modality_query/commit/841a5bcf3b62544e5614dbc607da75c2386b65d0

mccalluc commented 3 years ago

Yep! ... though response isn't quite what I'd expect. Filed #22, closing this.