Closed Nikro closed 1 year ago
I fixed this using fetch in master, give it a try
Ah, true, but the way it was implemented initially, each of the requests would have overwritten each other in the cache. I think it would be better to just update the readme and state that only a single department is supported, at least for now.
On Sat, May 13, 2023 at 5:41 AM Nagailic Sergiu (Nikro) @.***> wrote:
@Nikro commented on this pull request.
In node_helper.js:
@@ -570,23 +574,42 @@ module.exports = NodeHelper.create({ for (var id of objectIDs) { var url =
https://collectionapi.metmuseum.org/public/collection/v1/objects/${id}
;
- request(url, function (error, response, body) {
- var obj = JSON.parse(body);
- const req = https.request(url, (res) => {
That should do the trick as well :)
Also we have to either fix docs or the approach on feeding multiple department ids - as unfortunately the API doesn't support multiple IDs 😞
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>
Thing fixed:
For now, it takes some time to process these, as it's many request (in my case with 30 images, it's roughly 30s or so) - but images do actually load now ^_^