UNPKG

finnhub-ts

Version:
66 lines (65 loc) 1.63 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Finnhub API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0; // Some imports not used depending on template conditions // @ts-ignore const axios_1 = require("axios"); exports.BASE_PATH = "https://finnhub.io/api/v1".replace(/\/+$/, ""); /** * * @export */ exports.COLLECTION_FORMATS = { csv: ",", ssv: " ", tsv: "\t", pipes: "|", }; /** * * @export * @class BaseAPI */ class BaseAPI { basePath; axios; configuration; constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) { this.basePath = basePath; this.axios = axios; if (configuration) { this.configuration = configuration; this.basePath = configuration.basePath || this.basePath; } } } exports.BaseAPI = BaseAPI; ; /** * * @export * @class RequiredError * @extends {Error} */ class RequiredError extends Error { field; name = "RequiredError"; constructor(field, msg) { super(msg); this.field = field; } } exports.RequiredError = RequiredError;