Outstanding explanation. Thanks very much for this response. It highlights something I had not realized before:
From these responses I am gathering that (like you say) interacting with the JSON API can be a good start in many cases, that could avoid the need for coding up a new theme or plugin. But there are some types of data that are not exposed by the API. To access and do stuff with those data types, you would need to use the Discourse data serializer to expose that data; and to do that serialization, you need to use a plugin.
Seems like one good example of data that is not available through the API are the group owners of a group. I say this because (regarding accessing group owners):
One point of confusion–in the Discourse API, when you get a specific group, one of the returned traits is listed as "is_group_owner": true
, so not sure what that is supposed to mean…
But seems like to get the group owner I’d need to serialize the group owner trait.
Are there good examples of using the Discourse serializer? I’ve seen this, but given its importance a how-to with a few examples would be extremely helpful.
The closest example I’ve got is:
This is helpful, but not quite right (at least it gives me errors saying “invalid plugin”). I’m not sure how to adjust it so that on the group index page I can access the group owners for each group.