@planet-a/affinity-node
Version:
API wrapper for the affinity.co API
62 lines (61 loc) • 1.4 kB
JavaScript
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPIRequestFactory {
constructor(configuration) {
Object.defineProperty(this, "configuration", {
enumerable: true,
configurable: true,
writable: true,
value: configuration
});
}
}
;
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(api, method, field) {
super("Required parameter " + field + " was null or undefined when calling " + api + "." + method + ".");
Object.defineProperty(this, "api", {
enumerable: true,
configurable: true,
writable: true,
value: api
});
Object.defineProperty(this, "method", {
enumerable: true,
configurable: true,
writable: true,
value: method
});
Object.defineProperty(this, "field", {
enumerable: true,
configurable: true,
writable: true,
value: field
});
Object.defineProperty(this, "name", {
enumerable: true,
configurable: true,
writable: true,
value: "RequiredError"
});
}
}