neel_psl
8 years agoAce
How can i create a Custom Component to give Kudos to Ideas?
I want to create a Custom Component, where, Ideas are fetched from specific Idea Broad, want functionality to be able to give/remove Kudos to specific Ideas (please suggest API's for this, if poss...
- 8 years ago
Welcome to lithium community.
Fetch idea from specific board.
select * from messages where conversation.style = 'idea' and board.id = 'specific-board'
Here is the documentation for same.
To Give kudo.
To Remove kudo.
For Custom Pagination
https://community.lithium.com/t5/Developer-Discussion/Implement-custom-pagination/m-p/106695
You just need to use ORDER BY in your query to fetch Top, Hot & New Ideas
E.g New Ideas
select * from messages where conversation.style = 'idea' and board.id = 'specific-board' order by post_time DESC
Hot Ideas
select * from messages where conversation.style = 'idea' and board.id = 'specific-board' order by popularity DESC
To Post a new comment under an idea
- 8 years ago
Its recommended to use API V2 over API V1 as it can fetch all the meta data of an idea which is not available in API V1 and you will need to make multiple calls in V1 to fetch all the meta data of an idea. However below are V1 calls.
Fetch Idea from from specific Broad,
http://community-url/restapi/vc/boards/id/specific-board-id/topics
Recent Ideas
http://community-url/restapi/vc/boards/id/specific-board-id/topics/recent
Remove kudo, Revoke Kudo, Post new comment call was already API V1.