49 lines
1.5 KiB
Java
49 lines
1.5 KiB
Java
package com.thebrokenrail.mtudining.api.method;
|
|
|
|
import com.thebrokenrail.mtudining.api.Method;
|
|
|
|
import java.util.List;
|
|
|
|
public class AllLocations implements Method<AllLocations.Response> {
|
|
private final int platform;
|
|
private final String siteId;
|
|
private final boolean forMenus;
|
|
private final boolean withAddress;
|
|
private final boolean withBuildings;
|
|
|
|
public AllLocations(int platform, String siteId, boolean forMenus, boolean withAddress, boolean withBuildings) {
|
|
this.platform = platform;
|
|
this.siteId = siteId;
|
|
this.forMenus = forMenus;
|
|
this.withAddress = withAddress;
|
|
this.withBuildings = withBuildings;
|
|
}
|
|
|
|
@Override
|
|
public String getPath() {
|
|
return "/locations/all_locations?platform=" + platform + "&site_id=" + siteId + "&for_menus=" + forMenus + "&with_address=" + withAddress + "&with_buildings=" + withBuildings;
|
|
}
|
|
|
|
@Override
|
|
public Class<Response> getResponseClass() {
|
|
return Response.class;
|
|
}
|
|
|
|
public static class Response {
|
|
public static class Building {
|
|
public String id;
|
|
public String name;
|
|
public boolean active;
|
|
public boolean show_menus;
|
|
public List<Location> locations;
|
|
}
|
|
public List<Building> buildings;
|
|
public static class Location {
|
|
public String id;
|
|
public String name;
|
|
public boolean active;
|
|
}
|
|
public List<Location> locations;
|
|
}
|
|
}
|