Browse Source

Skeleton for getting real time train info

feature/actual_info
LO Kam Tao Leo 3 years ago
parent
commit
868bdf269d
  1. 23
      src/main/java/org/leolo/nrapi/v0/api/TrainAPI.java

23
src/main/java/org/leolo/nrapi/v0/api/TrainAPI.java

@ -0,0 +1,23 @@
package org.leolo.nrapi.v0.api;
import org.leolo.nrapi.v0.model.ReturnSet;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = {"train","v0/train"})
public class TrainAPI {
@RequestMapping(value = "/get/{trainId}")
public ReturnSet getSchedule(
@PathVariable(name = "trainId") String trainId
){
return new ReturnSet() {
@Override
public String get_type() {
return ReturnSet.super.get_type();
}
};
}
}
Loading…
Cancel
Save