Querying Replies In A Date/Time Range
Hi!
New to Khoros so just trying to figure out a couple of things with their API and querying...
I am looking to see who has replied to any post in a given time frame so I have:
SELECT id, replies, conversation.last_post_time FROM messages WHERE conversation.last_post_time > 2021-02-10T18:00:45.846Z AND conversation.last_post_time < 2021-02-10T19:00:45.846Z AND depth = 0
This gives me an array of replies which is fine but do I need to then get the ID of that message and look it up to get the user ID and then look the user up?
I am thinking there has to be a better way I can do this with the query but am having trouble getting success. Can anyone point me in the right direction?
Thanks,!
Try adding author to your select statement. You can also get other author attributes, such as the avatar by adding author.avatar to the select statement.
The depth=0 in your query is actually going to get you root posts. If you want only replies you want depth!=0