You are making an API request to get the line status for all lines every time you select and submit a request. You might want to consider querying the TFL API for the status JUST of the selected line. I think this is the documentation for it:
https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_StatusByIds
This might simplify the subsequent code in your functions, if you are dealing with one line at a time in your response objects :)
You are making an API request to get the line status for all lines every time you select and submit a request. You might want to consider querying the TFL API for the status JUST of the selected line. I think this is the documentation for it:
https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/Line/Line_StatusByIds
This might simplify the subsequent code in your functions, if you are dealing with one line at a time in your response objects :)