HumanBrainProject / ebrains-storage

Python client interface for EBRAINS Collaboratory Drive (Seafile) and Bucket (data-proxy) storage
Apache License 2.0
8 stars 3 forks source link

fix: get default repo #29

Closed xgui3783 closed 8 months ago

xgui3783 commented 8 months ago

current implementation of getting default repo seems to be incorrect. e.g.

now

from ebrains_drive import DriveApiClient

token="ey..."

client = DriveApiClient(token=token)

repo = client.repos.get_default_repo()

print(repo) # AttributeError: 'Repo' object has no attribute 'id'

according to seafile api it appears the /api2/default-repo endpoint returns the id, and from the id, one can get the repo.

This PR addresses this issue.