rest icon indicating copy to clipboard operation
rest copied to clipboard

Difference between Post API & Content API

Open ArchBlood opened this issue 3 months ago • 6 comments

From working on https://github.com/humhub-contrib/legal/pull/68 I can see a few issues that can be noted when using the Rest API module definitions, namely some useful and some non-useful.

A number of definitions rely on one another which can be slightly confusing when implementing, Post API relies on Content API when triggering getPost() so I don't see a real need for the Post API if it just contains the same information as another API, it works but the reliance on another API is very high, I can understand this being done in Content API as this is where most of the data can be generated and retrieved but I'm not understanding why it is needed in Post API when all you should need a $post->id and $post->message, as of right now when using the Post API it pulls all the same information that the Content API does, the Post API should be a simplified version of Content API so not to confuse the person that is using it.

ArchBlood avatar Mar 08 '24 00:03 ArchBlood