@@ -68,10 +68,15 @@ The server may respond with...
6868
6969Create a new user.
7070
71+ Before ` POST ` ing to ` /u ` , get the data from ` /init ` . See Authorization section
72+ for information.
73+
7174#### Payload
7275
7376* ` username ` : The display name of the user
7477* ` password ` : The password for the new user (will be hashed before storing)
78+ * ` sid ` : The session ID you got from ` /init `
79+ * ` captcha ` : The solution to the captcha you got from ` /init `
7580
7681#### Response
7782
@@ -91,16 +96,13 @@ The server may respond with...
9196
9297Get a user by their ID.
9398
94- #### Payload
95-
96- None.
97-
9899#### Response
99100
100101* ` username ` : The display name of the user
101102* ` id ` : The user's ID
102103* ` created ` : The time the user registered
103104* ` about ` : The user's biography
105+ * ` items ` : A list of the IDs of the items the user has created
104106
105107### GET ` /u `
106108
@@ -135,10 +137,34 @@ the item they were replying to.
135137
136138Create a new item.
137139
140+ #### Payload
141+
142+ * ` title ` : The title of the item (only applicable for posts)
143+ * ` content ` : The content of the item
144+ * ` parent ` : The ID of the parent item (only applicable for comments)
145+
146+ #### Response
147+
148+ The server may respond with...
149+
150+ * ` 201 Created ` if the item was successfully made
151+ * ` 400 Bad Request ` if the ` content ` field is missing, or the ` parent ` ** and**
152+ ` title ` fields are missing.
153+ * ` 404 Not Found ` if the parent ID is invalid (empty is not invalid)
154+ * ` 500 Internal Server Error ` if the server encountered an error.
155+
138156### GET ` /i/{id} `
139157
140158Get an item by ID.
141159
160+ #### Response
161+
162+ * ` creator ` : The ID of the user who made the item
163+ * ` id ` : The ID of the item
164+ * ` parent ` : The ID of the parent of the item (only applicable for comments)
165+ * ` title ` : The title of the item (only applicable for posts)
166+ * ` children ` : A list of IDs of comments replying to the item.
167+
142168### PATCH ` /i/{id} `
143169
144170Update an item by ID. This can only be done by its creator.
@@ -148,6 +174,14 @@ Update an item by ID. This can only be done by its creator.
148174Delete an item by ID. This can only be done by its creator or an instance
149175administrator.
150176
177+ #### Response
178+
179+ The server may respond with...
180+
181+ * ` 204 No Content ` if deletion was successful
182+ * ` 404 Not Found ` if the item is not found
183+ * ` 500 Internal Server Error ` if the server had an error.
184+
151185### GET ` /i?limit={limit}&offset={offset}&sort={sort} `
152186
153187The ` sort ` parameter should be one of:
0 commit comments