1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.XKCD = void 0;
|
4 | const axios_1 = require("axios");
|
5 | const XKCDAPI_1 = require("./XKCDAPI");
|
6 | class XKCD {
|
7 | constructor(options) {
|
8 | this.options = Object.assign({ apiUrl: 'https://xkcd.com' }, options);
|
9 | this.apiClient = axios_1.default.create({ baseURL: this.options.apiUrl });
|
10 | this.api = new XKCDAPI_1.XKCDAPI(this.apiClient, this.options);
|
11 | }
|
12 | |
13 |
|
14 |
|
15 |
|
16 | setApiUrl(newUrl) {
|
17 | this.apiClient.defaults.baseURL = newUrl;
|
18 | }
|
19 | }
|
20 | exports.XKCD = XKCD;
|
21 |
|
\ | No newline at end of file |