Forum Discussion
TariqHussain
Boss
Most Recent Articles -
Select * from messages where depth = 0 order by post_time DESC
Most Pupular Articlrs -
Select * from messages where depth = 0 order by kudos.sum(weight) DESC
Regarding the factors:
- You can get this from the post_time field, which will be returned by the above queries.
- Do you want to get the articles posted under one week? or the comment posted on the articles under one week? This thread would be helpful to get the articles which are posted under one week https://community.lithium.com/t5/Developer-Discussion/posts-count-of-last-7-days/m-p/315841/highlight/true#M12205
- Parent board is a board under which the article is created E.g for this post the parent board will be Developer Discussion. You can fetch this from the result you will get from the message API's board.id or board.title. In case you want to fetch all the articles from one board you can use this query -
SELECT * FROM messages WHERE board.id = 'wireless_support'
Documentation for this https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=messages#constraints-board.id
maxwelldhsu
8 years agoGuide
TariqHussain Thanks for this! I'll read more on it.
Quick question on the side. If I'd like to test a REST api call on Stage, however I'm calling my actual community site. How do I get it to work?
On stage, it shows an error. I assume because the Board ID doesn't exist in stage, but on the live community.
Thanks again!
- TariqHussain8 years agoBoss
maxwelldhsu - If you are trying on this query on stage, use a board id which is available on stage. You also can try this query on production as below.
Related Content
- 8 months ago
- 9 months ago
- 3 years ago
- 2 years ago