Skip to content

Commit 61269c1

Browse files
committed
Implemented CollectionsEndpoint.
Added missing attribute in CollectionResponse. Added extra doc strings to events and assets endpoints.
1 parent 0eebf40 commit 61269c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

open_sea_v1/endpoints/collections.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def url(self):
4848

4949
@property
5050
def parsed_http_response(self) -> list[CollectionResponse]:
51-
return self.parse_http_response(CollectionResponse, 'collections')
51+
resp_json = self._http_response.json()
52+
collections_json = resp_json if isinstance(resp_json, list) else resp_json['collections']
53+
collections = [CollectionResponse(collection_json) for collection_json in collections_json]
54+
return collections
5255

5356
def _get_request(self, **kwargs):
5457
params = dict(

0 commit comments

Comments
 (0)