• Justas🇱🇹@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    9 days ago

    I used to work at a place outside the city that only had one bus after work and it was kinda spotty and unreliable. However, there was an online API provided by the bus company that told me where the bus is.

    So I wrote a Python script and a Linux alert that would give me a notification when the bus was within range, with enough time to get to the stop on time.

    • cheese_greater@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      8 days ago

      Can this be done for basically… any transit? How do you search for api url or stream feed? Its not anything like RSS is it?

      • Justas🇱🇹@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        8 days ago

        I found a webpage that uses it and found out that it requires no authentication. So I just copied the url and sent a request every 5 seconds just like the webpage did. It gave a csv of busses, their routes and gps locations.