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

New parameter in response "ex" #4

Open
a1aw opened this issue Jan 21, 2017 · 0 comments
Open

New parameter in response "ex" #4

a1aw opened this issue Jan 21, 2017 · 0 comments

Comments

@a1aw
Copy link
Owner

a1aw commented Jan 21, 2017

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
}
@a1aw a1aw added this to the 2.0.0-SNAPSHOT milestone Jan 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant