• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Using the national-rail-darwin Node package - subsequentCallingPoints works on and off

Status
Not open for further replies.

lpgm

Member
Joined
6 Sep 2010
Messages
14
Hello. I get the serviceId from getDepartureBoard and send it off to getServiceDetails. I want the subsequentCallingPoints - they come back for some services but not for others. I can't work out why. Any ideas?
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

lpgm

Member
Joined
6 Sep 2010
Messages
14
Yes, thanks, that was the problem. Should anyone else come across this thread in the future, you need to use encodeURIComponent(). So something like:

const encoded = encodeURIComponent(serviceId);
 
Status
Not open for further replies.

Top