I had some trouble using the setup example on a freshly installed craft due to the lack of ->getParsedContent() method being applied to parse the body content, which, in the provided stock news section, is a rich text field. Without the getParsedContent you only get a empty object for body in your api endpoint.
Also removed both 'summary' => $entry.summary, since the default news does not seem to have one.
Just thought it might help someone that tries this sample code. :)
I had some trouble using the setup example on a freshly installed craft due to the lack of ->getParsedContent() method being applied to parse the body content, which, in the provided stock news section, is a rich text field. Without the getParsedContent you only get a empty object for body in your api endpoint.
Also removed both 'summary' => $entry.summary, since the default news does not seem to have one.
Just thought it might help someone that tries this sample code. :)