File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,11 +211,23 @@ export default class Kitsu {
211211 * @param {Object|Object[] } body Data to send in the request
212212 * @param {Object } [headers] Additional headers to send with the request
213213 * @returns {Object|Object[] } JSON-parsed response
214- * @example <caption>Update a post </caption>
214+ * @example <caption>Update a resource </caption>
215215 * api.update('posts', {
216216 * id: '1',
217217 * content: 'Goodbye World'
218218 * })
219+ * @example <caption>Update a resource with relationships</caption>
220+ * api.update('posts', {
221+ * content: 'Hello World',
222+ * uploads: {
223+ * id: '167585',
224+ * type: 'uploads'
225+ * }
226+ * })
227+ * @example <caption>Clear to-one relationships from a resource</caption>
228+ * api.update('posts/1/relationships/uploads', null)
229+ * @example <caption>Clear to-many relationships from a resource</caption>
230+ * api.update('posts/1/relationships/uploads', [])
219231 * @example <caption>Update multiple resources (API must support the Bulk Extension)</caption>
220232 * api.update('posts', [
221233 * { id: '1', content: 'Hello World' },
You can’t perform that action at this time.
0 commit comments