Fix light rail ETA (route_list=null; end_service_status) #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues:
platform_list[].route_list
isnull
when there are no ETAs available. This behaviour is undocumented.As when
platform_list[].end_service_status
exists,platform_list[].route_list
does not exist. This field is undocumented.How should
end_service_status
for only some platforms be handled? Would a light rail line stop at different platforms?For both of the above scanerios, this library currently throws an error, affecting querying ETAs of trains going to arrive at other platforms of the same stop.
This PR fixes the above 2 scanerios.
Sample response of
route_list
:null
Sample response of
route_list
is an array later.Sample response with
end_service_status