File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -600,12 +600,16 @@ Create a post on a user's profile feed
600600api .create (' posts' , {
601601 content: ' Hello World' ,
602602 targetUser: {
603- id: ' 42603' ,
604- type: ' users'
603+ data: {
604+ id: ' 42603' ,
605+ type: ' users'
606+ }
605607 },
606608 user: {
607- id: ' 42603' ,
608- type: ' users'
609+ data: {
610+ id: ' 42603' ,
611+ type: ' users'
612+ }
609613 }
610614})
611615` ` `
Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ const app = async () => {
2323 await api . create ( 'posts' , {
2424 content : 'Hello world' ,
2525 targetUser : {
26- id,
27- type : 'users'
26+ data : {
27+ id,
28+ type : 'users'
29+ }
2830 } ,
2931 user : {
30- id,
31- type : 'users'
32+ data : {
33+ id,
34+ type : 'users'
35+ }
3236 }
3337 } )
3438}
Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ try {
2323 api . create ( 'posts' , {
2424 content : 'Hello World' ,
2525 targetUser : {
26- id : 42603 ,
27- type : 'users'
26+ data : {
27+ id : 42603 ,
28+ type : 'users'
29+ }
2830 } ,
2931 user : {
30- id : 77404 ,
31- type : 'users'
32+ data : {
33+ id : 77404 ,
34+ type : 'users'
35+ }
3236 }
3337 } )
3438 . then ( response => console . log ( response ) )
Original file line number Diff line number Diff line change @@ -317,12 +317,16 @@ export default class Kitsu {
317317 * api.create('posts', {
318318 * content: 'Hello World',
319319 * targetUser: {
320- * id: '42603',
321- * type: 'users'
320+ * data: {
321+ * id: '42603',
322+ * type: 'users'
323+ * }
322324 * },
323325 * user: {
324- * id: '42603',
325- * type: 'users'
326+ * data: {
327+ * id: '42603',
328+ * type: 'users'
329+ * }
326330 * }
327331 * })
328332 * @example <caption>Create multiple resources (API must support the Bulk Extension)</caption>
Original file line number Diff line number Diff line change @@ -275,12 +275,16 @@ export default class Kitsu {
275275 * api.create('posts', {
276276 * content: 'Hello World',
277277 * targetUser: {
278- * id: '42603',
279- * type: 'users'
278+ * data: {
279+ * id: '42603',
280+ * type: 'users'
281+ * }
280282 * },
281283 * user: {
282- * id: '42603',
283- * type: 'users'
284+ * data: {
285+ * id: '42603',
286+ * type: 'users'
287+ * }
284288 * }
285289 * })
286290 * @example <caption>Create multiple resources (API must support the Bulk Extension)</caption>
You can’t perform that action at this time.
0 commit comments