Skip to content

Commit 012a0fd

Browse files
committed
Adding PyDocs
1 parent 7f8caa0 commit 012a0fd

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

pyclowder/collections.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,17 @@ def __init__(self, client=None, host=None, key=None, username=None, password=Non
156156
self.client = ClowderClient(host=host, key=key, username=username, password=password)
157157

158158
def create(self, name, description, parent_id, space_id):
159+
"""Create a new collection in Clowder.
160+
161+
Keyword arguments:
162+
connector -- connector information, used to get missing parameters and send status updates
163+
host -- the clowder host, including http and port, should end with a /
164+
key -- the secret key to login to clowder
165+
collectionname -- name of new dataset to create
166+
description -- description of new dataset
167+
parentid -- id of parent collection
168+
spaceid -- id of the space to add dataset to
169+
"""
159170

160171
if parent_id:
161172
if space_id:
@@ -195,4 +206,9 @@ def create(self, name, description, parent_id, space_id):
195206
return collection_id
196207

197208
def get_all_collections(self):
198-
return self.client.get("/collections")
209+
"""
210+
Get All Collections in Clowder
211+
212+
:return: List of collections in Clowder
213+
"""
214+
return self.client.get("/collections")

0 commit comments

Comments
 (0)