ITC-CRIB / jupyter-fairly

A JupyterLab extension for seamless integration of Jupyter-based research environments and research data repositories.
https://fairly.readthedocs.io
MIT License
8 stars 3 forks source link

Method list_my_archives() in FourTuData client returns status code instead of response body #24

Closed manuGil closed 2 years ago

manuGil commented 2 years ago

The list_my_archives() is returning the status code instead of the list of archives.

Example:

data_repository = FourTuData()
list_of_archives=data_repository.list_my_archives()
print(list_of_archives)

Output:

<Response [200]>
jurra commented 2 years ago

Hi @Manuel I think for the package itself it should return an api response. Perhaps a cli or a gui should return indeed list the list. Otherwise we loose the response data? What do you think?

The response object is something we will need to manipulate further I think, that is why I am storing it at the moment.

manuGil commented 2 years ago

Hi @manuel I think for the package itself it should return an api response. Perhaps a cli or a gui should return indeed list the list. Otherwise we loose the response data? What do you think?

The response object is something we will need to manipulate further I think, that is why I am storing it at the moment.

Yes, we can opt for always returning the response object in the methods of the class. If we agree on that, then I can write a few helper functions to manipulate the content internally as dictionaries. I need to manipulate the content to pass it to the Handlers. Using dictionaries internally means that we will be able to easily pass data to the Handlers as JSON. If you agree with this, please check that the methods always return a response object (from the Request package)

manuGil commented 2 years ago

This was fixed with the fairly package