UNPKG

1.56 kBJavaScriptView Raw
1"use strict";
2var __extends = (this && this.__extends) || (function () {
3 var extendStatics = Object.setPrototypeOf ||
4 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6 return function (d, b) {
7 extendStatics(d, b);
8 function __() { this.constructor = d; }
9 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10 };
11})();
12Object.defineProperty(exports, "__esModule", { value: true });
13require("rxjs/add/operator/map");
14var HttpService_1 = require("./HttpService");
15var ReadOnlySingleServiceBase = (function (_super) {
16 __extends(ReadOnlySingleServiceBase, _super);
17 function ReadOnlySingleServiceBase(http, baseUrl) {
18 return _super.call(this, http, baseUrl) || this;
19 }
20 ReadOnlySingleServiceBase.prototype.getItem = function () {
21 return this.getItemInternal("");
22 };
23 ReadOnlySingleServiceBase.prototype.getItemInternal = function (hostUrl) {
24 var _this = this;
25 return this.http.get(hostUrl + this.baseUrl, { headers: this.getJsonHeaders })
26 .map(function (r) { return _this.mapItem(r.json()); });
27 };
28 ReadOnlySingleServiceBase.prototype.mapItem = function (data) {
29 return data;
30 };
31 return ReadOnlySingleServiceBase;
32}(HttpService_1.HttpServiceBase));
33exports.ReadOnlySingleServiceBase = ReadOnlySingleServiceBase;
34//# sourceMappingURL=ReadOnlySingleService.js.map
\No newline at end of file