Skip to content
This repository was archived by the owner on Dec 4, 2022. It is now read-only.
This repository was archived by the owner on Dec 4, 2022. It is now read-only.

New parameter in response "ex" #4

@a1aw

Description

@a1aw

I recently found out there is an new parameter in the JSON response in the API.

ex seems represent expire time. Maybe adding in this API to provide scheduled updates/requests to the KMB's API? (in a Thread)

Example of the response:

  • Request: (repeated twice/multiple times)

    http://etav2.kmb.hk/?action=geteta&lang=en&route=1A&bound=1&stop=SA06T10000&stop_seq=0
    
  • Response 1 from first request: (Remaining 1 min)

     {
        "response":[
           {
              "ei":"Y",
              "eot":"T",
              "t":"23:10?? Scheduled",
              "w":"Y",
              "ex":"2017-01-21 23:20:00"
           },
           {
              "ei":"Y",
              "eot":"T",
              "t":"23:20?? Scheduled",
              "w":"Y",
              "ex":"2017-01-21 23:30:00"
           },
           {
              "ei":"Y",
              "eot":"T",
              "t":"23:30?? Scheduled",
              "w":"Y",
              "ex":"2017-01-21 23:40:00"
           }
        ],
        "updated":1485010839861,
        "generated":1485011437419,
        "responsecode":0
     }
  • Response 2: (Arrived/Already left)

{
   "response":[
      {
         "ei":"Y",
         "eot":"T",
         "t":"23:20?? Scheduled",
         "w":"Y",
         "ex":"2017-01-21 23:30:00"
      },
      {
         "ei":"Y",
         "eot":"T",
         "t":"23:30?? Scheduled",
         "w":"Y",
         "ex":"2017-01-21 23:40:00"
      },
      {
         "ei":"Y",
         "eot":"T",
         "t":"23:40?? Last Bus",
         "w":"Y",
         "ex":"2017-01-21 23:50:00"
      }
   ],
   "updated":1485011444393,
   "generated":1485011481461,
   "responsecode":0
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions