Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tfl-api-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tfl-api-wrapper - npm Package Compare versions

Comparing version 1.7.0 to 1.7.1

dist/lib/utilities/trackerNetRetag.d.ts

1

dist/index.d.ts

@@ -16,2 +16,3 @@ import AirQuality from './lib/airQuality';

import Modes from './lib/enums/modes';
import './lib/trackerNet';
export { AirQuality, AccidentStats, BikePoint, Crowding, Disruptions, Journey, Line, Mode, Occupancy, Road, StopPoint, TrackerNet, TrackerNetLines, TrackerNetStations, Modes };

@@ -28,1 +28,2 @@ "use strict";

exports.TrackerNet = trackerNet_1.default;
require("./lib/trackerNet");

6

dist/lib/tfl.js

@@ -42,4 +42,3 @@ "use strict";

var xmlparser = require("fast-xml-parser");
// @ts-ignore
var trackernet_xml_retag_1 = require("trackernet-xml-retag");
var trackerNetRetag_1 = require("./utilities/trackerNetRetag");
var TfLAPI = /** @class */ (function () {

@@ -95,4 +94,5 @@ function TfLAPI(appKey) {

xmlData = fetch.data;
// console.log(xmlData);
if (reTag)
xmlData = trackernet_xml_retag_1.retag.trackerNetRetag(xmlData);
xmlData = (0, trackerNetRetag_1.trackerNetRetag)(xmlData);
jsonObj = xmlparser.parse(xmlData, {

@@ -99,0 +99,0 @@ attributeNamePrefix: '',

@@ -5,2 +5,3 @@ import TfLAPI from './tfl';

import TrackerNetStations from './enums/trackerNet/stations';
declare type ValueOf<T> = T[keyof T];
export default class TrackerNet extends TfLAPI {

@@ -12,3 +13,3 @@ constructor(config: string);

*/
getPredictionSummary(line: TrackerNetLines): Promise<ITrackerNet.getPredictionSummary.Root>;
getPredictionSummary(line: TrackerNetLines | ValueOf<TrackerNetLines>): Promise<ITrackerNet.getPredictionSummary.Root>;
/**

@@ -19,3 +20,3 @@ * Get detailed train prediction information for a nominated station on a nominated line within 100 minute range.

*/
getPredictionDetailed(line: TrackerNetLines, stationCode: TrackerNetStations): Promise<ITrackerNet.getPredictionDetailed.Root>;
getPredictionDetailed(line: TrackerNetLines | ValueOf<TrackerNetLines>, stationCode: TrackerNetStations | ValueOf<TrackerNetStations>): Promise<ITrackerNet.getPredictionDetailed.Root>;
/**

@@ -32,1 +33,2 @@ * Get the status of all lines on the network indicating any delays, disruptions or suspensions on the lines.

}
export {};

@@ -156,1 +156,7 @@ "use strict";

exports.default = TrackerNet;
var x = new TrackerNet('');
x.getPredictionDetailed('C', 'BNK').then(function (res) {
// console.log(res.station.platform[0]);
console.log(JSON.stringify(res));
console.log('Complete');
});
{
"name": "tfl-api-wrapper",
"version": "1.7.0",
"version": "1.7.1",
"description": "A Node JS wrapper for the Transport for London API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc