UNPKG

@knora/api

Version:

JavaScript library that handles API requests to Knora

59 lines 2.92 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var ListNodeV2Cache_1 = require("../../cache/ListNodeV2Cache"); var OntologyCache_1 = require("../../cache/OntologyCache"); var endpoint_1 = require("../endpoint"); var authentication_endpoint_1 = require("./authentication/authentication-endpoint"); var lists_endpoint_1 = require("./list/lists-endpoint"); var ontologies_endpoint_1 = require("./ontology/ontologies-endpoint"); var resources_endpoint_1 = require("./resource/resources-endpoint"); var search_endpoint_1 = require("./search/search-endpoint"); var values_endpoint_1 = require("./values/values-endpoint"); /** * Defines the V2 endpoint of the Knora API. */ var V2Endpoint = /** @class */ (function (_super) { __extends(V2Endpoint, _super); /** * Constructor. * Sets up all endpoints for this endpoint. * @param knoraApiConfig * @param path */ function V2Endpoint(knoraApiConfig, path) { var _this = _super.call(this, knoraApiConfig, path) || this; _this.knoraApiConfig = knoraApiConfig; _this.path = path; // Instantiate the endpoints _this.auth = new authentication_endpoint_1.AuthenticationEndpoint(knoraApiConfig, path + V2Endpoint.PATH_AUTHENTICATION); _this.onto = new ontologies_endpoint_1.OntologiesEndpoint(knoraApiConfig, path + V2Endpoint.PATH_ONTOLOGIES); _this.res = new resources_endpoint_1.ResourcesEndpoint(knoraApiConfig, path + V2Endpoint.PATH_RESOURCES, _this); _this.values = new values_endpoint_1.ValuesEndpoint(knoraApiConfig, path + V2Endpoint.PATH_VALUES, _this); _this.list = new lists_endpoint_1.ListsEndpoint(knoraApiConfig, path); _this.search = new search_endpoint_1.SearchEndpoint(knoraApiConfig, path, _this); // Instantiate caches _this.ontologyCache = new OntologyCache_1.OntologyCache(knoraApiConfig, _this); _this.listNodeCache = new ListNodeV2Cache_1.ListNodeV2Cache(_this); return _this; } V2Endpoint.PATH_AUTHENTICATION = "/authentication"; V2Endpoint.PATH_ONTOLOGIES = "/ontologies"; V2Endpoint.PATH_RESOURCES = "/resources"; V2Endpoint.PATH_VALUES = "/values"; return V2Endpoint; }(endpoint_1.Endpoint)); exports.V2Endpoint = V2Endpoint; //# sourceMappingURL=v2-endpoint.js.map