UNPKG

rijksmuseum-typescript-api

Version:

Rijksmuseum API Wrapper made with Typescript and RxJS

30 lines (29 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Context_1 = require("./Context"); var artwork_api_1 = require("./features/artwork-api"); var collection_api_1 = require("./features/collection-api"); var RijksmuseumClient = /** @class */ (function () { function RijksmuseumClient(apiKey, language) { if (language === void 0) { language = 'en'; } this.context = new Context_1.Context(); this.context.apiKey = apiKey; this.context.language = language; } Object.defineProperty(RijksmuseumClient.prototype, "artwork", { get: function () { return this._artwork || (this._artwork = new artwork_api_1.ArtworkApi(this.context)); }, enumerable: true, configurable: true }); Object.defineProperty(RijksmuseumClient.prototype, "collection", { get: function () { return this._collection || (this._collection = new collection_api_1.CollectionApi(this.context)); }, enumerable: true, configurable: true }); return RijksmuseumClient; }()); exports.RijksmuseumClient = RijksmuseumClient;