Skip to content

Commit 6cf8b96

Browse files
committed
update readme
1 parent 61e286e commit 6cf8b96

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

README.md

+64
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,42 @@ CollectionResponse
111111
}
112112
```
113113

114+
#### Update Collection
115+
116+
Update a collection.
117+
118+
```
119+
POST /api/collections/:collectionid
120+
```
121+
122+
##### Request Payload
123+
124+
```ts
125+
CollectionRequest
126+
```
127+
128+
*Example:*
129+
```json
130+
{
131+
"name": "My Games"
132+
}
133+
```
134+
135+
##### Response Payload
136+
137+
```ts
138+
CollectionResponse
139+
```
140+
141+
*Example:*
142+
```json
143+
{
144+
"id": "chf13ur2iejc717547r0",
145+
"created_at": "2023-05-12T10:16:27.319442753+00:00",
146+
"name": "My Games"
147+
}
148+
```
149+
114150
#### Delete Collection
115151

116152
Delete a collection by ID.
@@ -209,6 +245,34 @@ ObjectResponse
209245
}
210246
```
211247

248+
#### Update Object
249+
250+
Update an object in a collection.
251+
252+
```
253+
POST /api/collections/:collectionid/objects/:objectid
254+
```
255+
256+
##### Request Payload
257+
258+
```ts
259+
ObjectRequest
260+
```
261+
262+
*Example:*
263+
```json
264+
{
265+
"name": "Cyberpunk 2077",
266+
"data": {
267+
"publisher": "CD PROJECT RED",
268+
"developer": "CD PROJECT RED",
269+
"released": "2020-12-10T00:00:00Z",
270+
"tags": ["Cyberpunk", "Open World", "RPG", "Sci-fi", "Explicit"],
271+
"age_rating": "18"
272+
}
273+
}
274+
```
275+
212276
#### Delete Object
213277

214278
Delete an object in a collection by ID.

0 commit comments

Comments
 (0)