Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client.get_collections_list shouldn't be a classmethod? #44

Closed
gjoseph92 opened this issue Apr 28, 2021 · 0 comments
Closed

Client.get_collections_list shouldn't be a classmethod? #44

gjoseph92 opened this issue Apr 28, 2021 · 0 comments

Comments

@gjoseph92
Copy link

catalog = Client.open('https://earth-search.aws.element84.com/v0')
catalog.get_collections_list()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-ade3012ce385> in <module>
----> 1 catalog.get_collections_list()

~/Library/Caches/pypoetry/virtualenvs/stackstac-talk-YcC8wOkC-py3.9/lib/python3.9/site-packages/pystac_client/client.py in get_collections_list(self)
    158             of an API are always and only ever collections
    159         """
--> 160         return self.get_child_links()
    161 
    162     def search(self,

TypeError: get_child_links() missing 1 required positional argument: 'self'

get_collections_list is a classmethod, but it seems like it's not meant to be?

@classmethod
def get_collections_list(self):
"""Gets list of available collections from this Catalog. Alias for get_child_links since children
of an API are always and only ever collections
"""
return self.get_child_links()

Version: 0.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant