UNPKG

@ffflorian/xkcdjs

Version:
21 lines (20 loc) 633 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.XKCD = void 0; const api_client_1 = require("@ffflorian/api-client"); const XKCDAPI_1 = require("./XKCDAPI"); class XKCD { constructor(options) { this.options = Object.assign({ apiUrl: 'https://xkcd.com' }, options); this.apiClient = new api_client_1.APIClient(this.options.apiUrl); this.api = new XKCDAPI_1.XKCDAPI(this.apiClient, this.options); } /** * Set a new API URL. * @param url The new API URL. */ setApiUrl(url) { this.apiClient.setBaseURL(url); } } exports.XKCD = XKCD;