Sunny
12 years agoAce
Board Views
Hi,
I want to get the board_views with its board_id for all the boards in a category, that too in a desc sorted way.
Is there any API which might help me getting my requirement?
Or some optimal solution for this.
Hi,
I want to get the board_views with its board_id for all the boards in a category, that too in a desc sorted way.
Is there any API which might help me getting my requirement?
Or some optimal solution for this.
I don't believe a single API call will get you this result, I think you'll have to make the "/boards" call on the category to get the list of boards, then make the "/board/board_id/metrics" on each board to get the "board_views" for that board. You can sort the list as you create it. The disadvantage is that this might be time/resource intensive, and might slow down the page load time.
One way to get around that might be to write this code in an endpoint, and implement caching, so you only have to make this call once every couple of seconds/minutes/hours. You can then make the call to the endpoint from any component to get the sorted list.
VenkS wrote:
One way to get around that might be to write this code in an endpoint, and implement caching, so you only have to make this call once every couple of seconds/minutes/hours. You can then make the call to the endpoint from any component to get the sorted list.
Are you saying here, do your own caching or mean that the queries in the Endpoint will be cached (?). If you are referring to the former then do you have any further details how one could "implement caching" inside an Endpoint?