Forum Discussion
Kev_B
Advisor
Thanks Vikas,
I'm most interested in using the count function on posts, is there an easy way to do this with API v2?
Thanks
PerBonomi
7 years agoBoss
This is a starting point:
<#assign user_id = 123/> <#assign board_id = 'help'/> <#assign date_start = "yyyy-MM-dd"/> <#assign date_end = "yyyy-MM-dd"/> <#assign timezone = "+01:00"/> <#assign query = rest("2.0","/search?q=" + "SELECT count(*) FROM messages WHERE board.id = '${board_id}' AND author.id = '${user_id}' AND post_time >= ${date_start}T00:00:00${timezone} AND post_time <= ${date_end}T00:00:00${timezone}"?url) /> <#assign post_count = query.data.count!0/> ${post_count}
Related Content
- 8 months ago
- 5 years ago
- 5 years ago