Created
February 12, 2016 22:21
-
-
Save daniellevass/89a133a15e6c86296caa to your computer and use it in GitHub Desktop.
trainjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soap = require('soap'); | |
var url = 'https://lite.realtime.nationalrail.co.uk/OpenLDBWS/wsdl.aspx?ver=2015-05-14'; | |
var args = { | |
numRows: 10, | |
crs: 'PAD' | |
}; | |
soap.createClient(url, function(err, client) { | |
var soapHeader = { | |
'AccessToken':{ | |
"TokenValue":"46d74f4b-3b94-4291-ab7b-3e7bd1f9cbb0" | |
} | |
}; | |
client.addSoapHeader(soapHeader); | |
client.GetDepartureBoard(args, function(err, result) { | |
console.log(result); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment