15 lines
374 B
JavaScript
15 lines
374 B
JavaScript
#include xhr.js
|
|
|
|
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);
|
|
},
|
|
};
|
|
};
|