TSP Posted October 18, 2019 Posted October 18, 2019 Could you let this API point ( https://invisioncommunity.com/developers/rest-api?endpoint=forums/topics/GETindex ) and similar take in multiple ids (TopicIDs in this case)? So you can make an API-request for multiple topic Ids at once.
bfarber Posted October 18, 2019 Posted October 18, 2019 We can consider the suggestion, but no promises. Most REST API endpoints don't work that way (some do, sure, but generally the GET "item" endpoint accepts a single ID and returns a single record).
TSP Posted October 19, 2019 Author Posted October 19, 2019 16 hours ago, bfarber said: We can consider the suggestion, but no promises. Most REST API endpoints don't work that way (some do, sure, but generally the GET "item" endpoint accepts a single ID and returns a single record). The endpoint I was linking to is already an endpoint that returns multiple topics, you just dont allow to filter by topicIds, like you allow for forumIds In my case we have a frontpage with articles from our publishing system where we display comment counts. Previously we would get this directly from the database from all of the topicsIds connected to articles on the frontpage, but now we would like to query the API instead. This is an ajax module applying the comment counts to the articles on the frontpage, so it doesn't affect the timing of the loading of the frontpage. There is also some caching going on, but it's certainly a lot more intensive to do 20 API-requests one at a time, than all of them at once eiter way.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.