2024-12-17 21:23:38 +00:00
|
|
|
#include xhr.js
|
2024-01-24 21:53:26 +00:00
|
|
|
|
|
|
|
const MszUiharu = function(apiUrl) {
|
|
|
|
const maxBatchSize = 4;
|
|
|
|
const lookupOneUrl = apiUrl + '/metadata';
|
|
|
|
|
|
|
|
return {
|
|
|
|
lookupOne: async targetUrl => {
|
|
|
|
if(typeof targetUrl !== 'string')
|
|
|
|
throw 'targetUrl must be a string';
|
|
|
|
|
|
|
|
return $x.post(lookupOneUrl, { type: 'json' }, targetUrl);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|