< Back
Get-NSTrainJourney
Post
NAME Get-NSTrainJourney
SYNOPSIS
Find trains between two destinations
SYNTAX
Get-NSTrainJourney [-fromStation] <Object> [-toStation] <Object> [-Next <Int32>] [[-URI] <Uri>]
[<CommonParameters>]
DESCRIPTION
Got a bit fed up turning up at the station to find trains were delayed or cancelled, so wrote this function to
find out in advance before leaving the office
Function determines train availability from the Dutch NS API (https://www.ns.nl/en/travel-information/ns-api)
Needs connection to External API http://webservices.ns.nl/ns-api-treinplanner
Use an Internet connected machine
Request API access here: https://www.ns.nl/ews-aanvraagformulier/?0
PARAMETERS
-fromStation <Object>
Journey start station
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-toStation <Object>
Journey end station
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Next <Int32>
Specify a value from 1-5 to retrieve info on next x train journeys
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-URI <Uri>
Optional URL
Required? false
Position? 3
Default value http://webservices.ns.nl/ns-api-treinplanner
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Author: Kenny White 14/01/2016
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-NSTrainJourney -fromStation 'Amsterdam Zuid' -toStation 'Duivendrecht'
Gets information about next 10 trains from Amsterdam Zuid to Duivendrecht
RELATED LINKS
SYNOPSIS
Find trains between two destinations
SYNTAX
Get-NSTrainJourney [-fromStation] <Object> [-toStation] <Object> [-Next <Int32>] [[-URI] <Uri>]
[<CommonParameters>]
DESCRIPTION
Got a bit fed up turning up at the station to find trains were delayed or cancelled, so wrote this function to
find out in advance before leaving the office
Function determines train availability from the Dutch NS API (https://www.ns.nl/en/travel-information/ns-api)
Needs connection to External API http://webservices.ns.nl/ns-api-treinplanner
Use an Internet connected machine
Request API access here: https://www.ns.nl/ews-aanvraagformulier/?0
PARAMETERS
-fromStation <Object>
Journey start station
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-toStation <Object>
Journey end station
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Next <Int32>
Specify a value from 1-5 to retrieve info on next x train journeys
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-URI <Uri>
Optional URL
Required? false
Position? 3
Default value http://webservices.ns.nl/ns-api-treinplanner
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Author: Kenny White 14/01/2016
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-NSTrainJourney -fromStation 'Amsterdam Zuid' -toStation 'Duivendrecht'
Gets information about next 10 trains from Amsterdam Zuid to Duivendrecht
RELATED LINKS