Cancelled Trains
cancelList(): Promise<Result>Description
Get the complete list of fully and partially cancelled trains, with route details and the affected segment for partial cancellations.
Parameters
Code Example
javascript
const result = await cancelList();
if (result.success) {
console.log("Total:", result.summary.total);
console.log("Fully cancelled:", result.summary.fullyCancelled);
console.log("Partially cancelled:", result.summary.partiallyCancelled);
result.data.fullyCancelledTrains.forEach((train) => {
console.log(train.trainNo + " — " + train.trainName);
});
result.data.partiallyCancelledTrains.forEach((train) => {
console.log(
train.trainNo + ": " +
train.cancelledSegment.from.name + " → " +
train.cancelledSegment.to.name
);
});
}Response Example