UNPKG

tfl-api-wrapper

Version:

A Node JS wrapper for the Transport for London API

39 lines (38 loc) 1.65 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 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 tfl_1 = require("./tfl"); var BikePoint = /** @class */ (function (_super) { __extends(BikePoint, _super); function BikePoint(config) { return _super.call(this, config) || this; } /* Gets all bike point locations */ BikePoint.prototype.getAll = function () { return this.sendRequest("/BikePoint/", {}); }; /* Gets the bike point by the given id */ BikePoint.prototype.getByID = function (id) { return this.sendRequest("/BikePoint/".concat(id), {}); }; /* Search for bike points by their name */ BikePoint.prototype.getByName = function (query) { return this.sendRequest("/BikePoint/Search", { query: query }); }; return BikePoint; }(tfl_1.default)); exports.default = BikePoint;