dr4ke616 / MMM-Dublin-Bus

Magic Mirror Module - Dublin Bus
MIT License
1 stars 0 forks source link

Move to use Dublin Bus Underlying SOAP Service #4

Open dr4ke616 opened 5 years ago

dr4ke616 commented 5 years ago

An option to get this plugin to work again, is to use Dublin Bus' underlying SOAP service. This would mean quiet a substantial change to the plugin. As well as that there is no indication as to a fair usage policy - so there could be a risk of being blocked. Ideally a better solution would be to rely on a non commercial / open source API with a clearly defined fair usage policy.

Example curl request for stop number 396:

curl -H 'soapaction: http://dublinbus.ie/GetRealTimeStopData_ForceLineNoteVisit' \
    -H 'Content-Type: text/xml; charset=utf-8' \
    -H 'Host: rtpi.dublinbus.ie' \
    --data-binary '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetRealTimeStopData_ForceLineNoteVisit xmlns="http://dublinbus.ie/"><stopId>396</stopId><forceRefresh>true</forceRefresh><forceLineNoteVisit>true</forceLineNoteVisit></GetRealTimeStopData_ForceLineNoteVisit></soap:Body></soap:Envelope>' \
    'http://rtpi.dublinbus.ie/DublinBusRTPIService.asmx?op=GetRealTimeStopData_ForceLineNoteVisit'