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

infogare-api.js

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infogare-api.js - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

2

package.json
{
"name": "infogare-api.js",
"version": "1.0.10",
"version": "1.0.11",
"main": "src/core/index.js",

@@ -5,0 +5,0 @@ "scripts": {

@@ -1,3 +0,10 @@

import App from "../modules/App";
import Station from '../modules/Station';
import User from '../modules/User';
export declare function initApp(appId: string): App;
export declare function getUser(uid: String): User;
export declare function getUserFolders(uid: String): String[];
export declare function getPublicProfile(uid: String): JSON;
export declare function getStation(uid: String, stationId: String): Station;
const User = require('./User');
const Station = require('./Station');
const Train = require('./Train');
const { Train, TrainRER } = require('./Train');
const { UserException, StationException } = require('./Exceptions');

@@ -289,4 +289,10 @@

const trains = [];
for (const trainJSON of trainsJSON) {
trains.push(new Train(trainJSON));
if (!trainsJSON[0].mission) {
for (const trainJSON of trainsJSON) {
trains.push(new Train(trainJSON));
}
} else {
for (const trainJSON of trainsJSON) {
trains.push(new TrainRER(trainJSON));
}
}

@@ -293,0 +299,0 @@ return trains;

@@ -106,2 +106,86 @@ class Train {

module.exports = Train;
class TrainRER {
constructor(data) {
this.id = data.id;
this.arivalTime = data.arivalTime;
this.delayTime = data.delayTime;
this.delayType = data.delayType;
this.departureTime = data.departureTime;
this.departureMode = data.departureMode;
this.destination = data.destination;
this.from = data.from;
this.mission = data.mission;
this.number = data.number;
this.provenance = data.provenance;
this.show = data.show;
this.to = data.to;
this.trainLength = data.trainLength;
this.type = data.type;
}
getId() {
return this.id;
}
getArivalTime() {
return this.arivalTime;
}
getCompo() {
return this.compo;
}
getDays() {
return this.days;
}
getDelayTime() {
return this.delayTime;
}
getDelayType() {
return this.delayType;
}
getDepartureTime() {
return this.departureTime;
}
getDepartureMode() {
return this.departureMode;
}
getDestination() {
return this.destination;
}
getFrom() {
return this.from;
}
getMission() {
return this.mission;
}
getNumber() {
return this.number;
}
getProvenance() {
return this.provenance;
}
getTo() {
return this.to;
}
getTrainLength() {
return this.trainLength;
}
getType() {
return this.type;
}
}
module.exports = { Train, TrainRER };
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