Skip to content

Commit

Permalink
Adding endpoint to get the booted simulators
Browse files Browse the repository at this point in the history
  • Loading branch information
Shridhar Kalagi authored and shridharkalagi committed May 21, 2018
1 parent 54d0012 commit 1b54e93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static void main(String[] args) throws IOException {
path("/ios", () -> {
//Get all iOS Real devices
get("/realDevices", deviceController.getIOSRealDevices, new JsonTransformer());
get("/bootedSims", deviceController.getBootedSims, new JsonTransformer());
path("/webkitproxy", () -> {
get("/start", deviceController.startWebkitProxy, new JsonTransformer());
get("/stop", deviceController.stopWebkitProxy, new JsonTransformer());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ public DeviceController() {
return null;
};

public Route getBootedSims = ((request, response) -> {
try {
List<Device> devices = simulatorManager.getAllBootedSimulators("iOS");
return devices;
} catch (Exception e) {
response.status(404);
response.body(e.getMessage());
}
return null;
});

public Route getIOSDevices = ((request, response) -> {
try {
List<Device> devices = iosManager.getDevices();
Expand Down

0 comments on commit 1b54e93

Please sign in to comment.