UNPKG

camelot-unchained

Version:
48 lines (43 loc) 1.88 kB
/** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var channelId_1 = require('./constants/channelId'); var defaults = { // CSE API - for servers ect cseApiUrl: 'http://api.citystateentertainment.com', cseApiPort: 8001, // GAME API - for server info, this will be merged into the single // api source in the future. publicApiUrl: 'https://api.camelotunchained.com', publicApiPort: 443, hatcheryApiUrl: 'https://hatchery.camelotunchained.com', hatcheryApiPort: 8000, wyrmlingApiUrl: 'https://wyrmling.camelotunchained.com', wyrmlingApiPort: 8000, // SAMPLE API TOKEN // TODO: replace loginToken with API KEY system apiToken: '1234567890', // Working Channel - defaults to hatchery channelId: channelId_1.default.HATCHERY }; var CoreSettings = function CoreSettings(channel, token) { _classCallCheck(this, CoreSettings); this.cseApiUrl = defaults.cseApiUrl; this.cseApiPort = defaults.cseApiPort; this.publicApiUrl = defaults.publicApiUrl; this.publicApiPort = defaults.publicApiPort; this.hatcheryApiUrl = defaults.hatcheryApiUrl; this.hatcheryApiPort = defaults.hatcheryApiPort; this.wyrmlingApiUrl = defaults.wyrmlingApiUrl; this.wyrmlingApiPort = defaults.wyrmlingApiPort; this.apiToken = defaults.apiToken; this.channelId = defaults.channelId; this.channelId = channel || defaults.channelId; this.apiToken = token || defaults.apiToken; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = CoreSettings;