@@ -53,6 +53,57 @@ def collection_queryables(self, collection_id: str) -> dict:
53
53
path = f'collections/{ collection_id } /queryables'
54
54
return self ._request (path = path )
55
55
56
+ def collection_create (self , data : str ) -> bool :
57
+ """
58
+ implements POST /collections
59
+
60
+ @type collection_id: string
61
+ @type data: string
62
+ @param data: collection data
63
+
64
+ @returns: single collection result
65
+ """
66
+
67
+ path = 'collections'
68
+
69
+ self .headers ['Content-Type' ] = 'application/json'
70
+
71
+ _ = self ._request (method = 'POST' , path = path , data = data )
72
+
73
+ return True
74
+
75
+ def collection_update (self , collection_id : str , data : str ) -> bool :
76
+ """
77
+ implements PUT /collections/{collectionId}
78
+
79
+ @type collection_id: string
80
+ @param collection_id: id of collection
81
+ @type data: string
82
+ @param data: collection data
83
+
84
+ @returns: ``bool`` of update result
85
+ """
86
+
87
+ path = f'collections/{ collection_id } '
88
+ _ = self ._request (method = 'PUT' , path = path , data = data )
89
+
90
+ return True
91
+
92
+ def collection_delete (self , collection_id : str ) -> bool :
93
+ """
94
+ implements DELETE /collections/{collectionId}
95
+
96
+ @type collection_id: string
97
+ @param collection_id: id of collection
98
+
99
+ @returns: ``bool`` of deletion result
100
+ """
101
+
102
+ path = f'collections/{ collection_id } '
103
+ _ = self ._request (method = 'DELETE' , path = path )
104
+
105
+ return True
106
+
56
107
def collection_items (self , collection_id : str , ** kwargs : dict ) -> dict :
57
108
"""
58
109
implements /collection/{collectionId}/items
@@ -145,7 +196,7 @@ def collection_item_update(self, collection_id: str, identifier: str,
145
196
@type data: string
146
197
@param data: raw representation of data
147
198
148
- @returns: ``bool`` of deletion result
199
+ @returns: ``bool`` of update result
149
200
"""
150
201
151
202
path = f'collections/{ collection_id } /items/{ identifier } '
0 commit comments