1/// <reference path="./base-service.ts" /> 2var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 return new (P || (P = Promise))(function (resolve, reject) { 5 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 }); 10}; 11var __generator = (this && this.__generator) || function (thisArg, body) { 12 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); 13 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 14 function verb(n) { return function (v) { return step([n, v]); }; } 15 function step(op) { 16 if (f) throw new TypeError("Generator is already executing."); 17 while (g && (g = 0, op[0] && (_ = 0)), _) try { 18 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 19 if (y = 0, t) op = [op[0] & 2, t.value]; 20 switch (op[0]) { 21 case 0: case 1: t = op; break; 22 case 4: _.label++; return { value: op[1], done: false }; 23 case 5: _.label++; y = op[1]; op = [0]; continue; 24 case 7: op = _.ops.pop(); _.trys.pop(); continue; 25 default: 26 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 27 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 28 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 29 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 30 if (t[2]) _.ops.pop(); 31 _.trys.pop(); continue; 32 } 33 op = body.call(thisArg, _); 34 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 35 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 36 } 37}; 38var AppServices; 39(function (AppServices) { 40 var ClubService = /** @class */ (function () { 41 function ClubService() { 42 this.baseUrl = '/api/clubs/'; 43 this._api = null; 44 this._api = new BaseService.ApiService(); 45 } 46 ClubService.prototype.GetClub = function (clubId) { 47 return __awaiter(this, void 0, void 0, function () { 48 var endpoint, url, result, error_1; 49 return __generator(this, function (_a) { 50 switch (_a.label) { 51 case 0: 52 endpoint = "GetClubDetails"; 53 url = "".concat(this.baseUrl).concat(endpoint); 54 _a.label = 1; 55 case 1: 56 _a.trys.push([1, 3, , 4]); 57 return [4 /*yield*/, this._api.get(url, { 58 clubId: clubId, 59 })]; 60 case 2: 61 result = _a.sent(); 62 return [2 /*return*/, result.data]; 63 case 3: 64 error_1 = _a.sent(); 65 return [2 /*return*/, { 66 successful: false, 67 errorMessage: error_1.response, 68 }]; 69 case 4: return [2 /*return*/]; 70 } 71 }); 72 }); 73 }; 74 ClubService.prototype.GetClubByAlias = function (alias) { 75 return __awaiter(this, void 0, void 0, function () { 76 var endpoint, url, result, error_2; 77 return __generator(this, function (_a) { 78 switch (_a.label) { 79 case 0: 80 endpoint = "GetClubByAlias"; 81 url = "".concat(this.baseUrl).concat(endpoint); 82 _a.label = 1; 83 case 1: 84 _a.trys.push([1, 3, , 4]); 85 return [4 /*yield*/, this._api.get(url, { 86 clubAlias: alias, 87 })]; 88 case 2: 89 result = _a.sent(); 90 return [2 /*return*/, result.data]; 91 case 3: 92 error_2 = _a.sent(); 93 return [2 /*return*/, { 94 successful: false, 95 errorMessage: error_2.response, 96 }]; 97 case 4: return [2 /*return*/]; 98 } 99 }); 100 }); 101 }; 102 ClubService.prototype.GetClubsByName = function (name, headers) { 103 return __awaiter(this, void 0, void 0, function () { 104 var endpoint, url, result, error_3; 105 return __generator(this, function (_a) { 106 switch (_a.label) { 107 case 0: 108 endpoint = "GetClubsByName"; 109 url = "".concat(this.baseUrl).concat(endpoint); 110 _a.label = 1; 111 case 1: 112 _a.trys.push([1, 3, , 4]); 113 return [4 /*yield*/, this._api.get(url, { 114 name: name, 115 }, headers)]; 116 case 2: 117 result = _a.sent(); 118 return [2 /*return*/, result.data]; 119 case 3: 120 error_3 = _a.sent(); 121 return [2 /*return*/, { 122 successful: false, 123 errorMessage: error_3.response, 124 }]; 125 case 4: return [2 /*return*/]; 126 } 127 }); 128 }); 129 }; 130 ClubService.prototype.GetClubImages = function (clubId_1) { 131 return __awaiter(this, arguments, void 0, function (clubId, simpleImagePath) { 132 var endpoint, url, result, error_4; 133 if (simpleImagePath === void 0) { simpleImagePath = true; } 134 return __generator(this, function (_a) { 135 switch (_a.label) { 136 case 0: 137 endpoint = "GetClubImages"; 138 url = "".concat(this.baseUrl).concat(endpoint); 139 _a.label = 1; 140 case 1: 141 _a.trys.push([1, 3, , 4]); 142 return [4 /*yield*/, this._api.get(url, { 143 clubId: clubId, 144 simpleImagePath: simpleImagePath, 145 })]; 146 case 2: 147 result = _a.sent(); 148 return [2 /*return*/, result.data]; 149 case 3: 150 error_4 = _a.sent(); 151 return [2 /*return*/, { 152 successful: false, 153 errorMessage: error_4.response, 154 }]; 155 case 4: return [2 /*return*/]; 156 } 157 }); 158 }); 159 }; 160 ClubService.prototype.GetFacilityTypes = function () { 161 return __awaiter(this, void 0, void 0, function () { 162 var endpoint, url, result, error_5; 163 return __generator(this, function (_a) { 164 switch (_a.label) { 165 case 0: 166 endpoint = "GetFacilityTypes"; 167 url = "".concat(this.baseUrl).concat(endpoint); 168 _a.label = 1; 169 case 1: 170 _a.trys.push([1, 3, , 4]); 171 return [4 /*yield*/, this._api.get(url)]; 172 case 2: 173 result = _a.sent(); 174 return [2 /*return*/, result.data]; 175 case 3: 176 error_5 = _a.sent(); 177 return [2 /*return*/, { 178 successful: false, 179 errorMessage: error_5.response, 180 }]; 181 case 4: return [2 /*return*/]; 182 } 183 }); 184 }); 185 }; 186 ClubService.prototype.GetFacilityTypeGroups = function () { 187 return __awaiter(this, void 0, void 0, function () { 188 var endpoint, url, result, error_6; 189 return __generator(this, function (_a) { 190 switch (_a.label) { 191 case 0: 192 endpoint = "GetFacilityTypeGroups"; 193 url = "".concat(this.baseUrl).concat(endpoint); 194 _a.label = 1; 195 case 1: 196 _a.trys.push([1, 3, , 4]); 197 return [4 /*yield*/, this._api.get(url)]; 198 case 2: 199 result = _a.sent(); 200 return [2 /*return*/, result.data]; 201 case 3: 202 error_6 = _a.sent(); 203 return [2 /*return*/, { 204 successful: false, 205 errorMessage: error_6.response, 206 }]; 207 case 4: return [2 /*return*/]; 208 } 209 }); 210 }); 211 }; 212 ClubService.prototype.GetCoursesByKeyword = function (keyword) { 213 return __awaiter(this, void 0, void 0, function () { 214 var url, result, error_7; 215 return __generator(this, function (_a) { 216 switch (_a.label) { 217 case 0: 218 url = "".concat(this.baseUrl, "GetCoursesByKeyword"); 219 _a.label = 1; 220 case 1: 221 _a.trys.push([1, 3, , 4]); 222 return [4 /*yield*/, this._api.get(url, { keyword: keyword })]; 223 case 2: 224 result = _a.sent(); 225 return [2 /*return*/, result.data]; 226 case 3: 227 error_7 = _a.sent(); 228 return [2 /*return*/, { 229 successful: false, 230 errorMessage: error_7.response, 231 }]; 232 case 4: return [2 /*return*/]; 233 } 234 }); 235 }); 236 }; 237 ClubService.prototype.ListMarkers = function (params) { 238 return __awaiter(this, void 0, void 0, function () { 239 var endpoint, url, result, error_8; 240 return __generator(this, function (_a) { 241 switch (_a.label) { 242 case 0: 243 endpoint = "ListMarkers"; 244 url = "".concat(this.baseUrl).concat(endpoint); 245 _a.label = 1; 246 case 1: 247 _a.trys.push([1, 3, , 4]); 248 return [4 /*yield*/, this._api.get(url, params)]; 249 case 2: 250 result = _a.sent(); 251 return [2 /*return*/, result.data]; 252 case 3: 253 error_8 = _a.sent(); 254 return [2 /*return*/, { 255 successful: false, 256 errorMessage: error_8.response, 257 }]; 258 case 4: return [2 /*return*/]; 259 } 260 }); 261 }); 262 }; 263 return ClubService; 264 }()); 265 AppServices.ClubService = ClubService; 266})(AppServices || (AppServices = {}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.