cvat-sdk
Version:
CVAT SDK is a Javascript library. It provides you access to Javascript functions and objects that simplify server interaction and provide additional functionality like data validation and serialization.
44 lines (39 loc) • 1.27 kB
JavaScript
var globalAxios = require('axios');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var globalAxios__default = /*#__PURE__*/_interopDefaultLegacy(globalAxios);
const BASE_PATH = "http://localhost".replace(/\/+$/, "");
const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|"
};
class BaseAPI {
constructor(configuration, basePath = BASE_PATH, axios = globalAxios__default["default"]) {
this.basePath = void 0;
this.axios = void 0;
this.configuration = void 0;
this.basePath = basePath;
this.axios = axios;
if (configuration) {
var _configuration$basePa;
this.configuration = configuration;
this.basePath = (_configuration$basePa = configuration.basePath) != null ? _configuration$basePa : basePath;
}
}
}
class RequiredError extends Error {
constructor(field, msg) {
super(msg);
this.field = void 0;
this.field = field;
this.name = "RequiredError";
}
}
const operationServerMap = {};
exports.BASE_PATH = BASE_PATH;
exports.BaseAPI = BaseAPI;
exports.COLLECTION_FORMATS = COLLECTION_FORMATS;
exports.RequiredError = RequiredError;
exports.operationServerMap = operationServerMap;
//# sourceMappingURL=base.js.map