Pecuario.Backend

<back to all web services

GetDashboard

The following routes are available for this service:
GET/api/v1/dashboard
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class GetDashboard implements IGet
    {
        public Integer countryId = null;
        public Integer maxAnimals = null;
        public Integer maxLands = null;
        
        public Integer getCountryId() { return countryId; }
        public GetDashboard setCountryId(Integer value) { this.countryId = value; return this; }
        public Integer getMaxAnimals() { return maxAnimals; }
        public GetDashboard setMaxAnimals(Integer value) { this.maxAnimals = value; return this; }
        public Integer getMaxLands() { return maxLands; }
        public GetDashboard setMaxLands(Integer value) { this.maxLands = value; return this; }
    }

    public static class GetDashboardResponse extends BaseResponse
    {
        public ArrayList<AnimalCategory> animalCategories = null;
        public HashMap<Integer,ArrayList<DashboardAnimal>> animalsByCategory = null;
        public ArrayList<DashboardLand> lands = null;
        public String greeting = null;
        public Integer farmsCount = null;
        
        public ArrayList<AnimalCategory> getAnimalCategories() { return animalCategories; }
        public GetDashboardResponse setAnimalCategories(ArrayList<AnimalCategory> value) { this.animalCategories = value; return this; }
        public HashMap<Integer,ArrayList<DashboardAnimal>> getAnimalsByCategory() { return animalsByCategory; }
        public GetDashboardResponse setAnimalsByCategory(HashMap<Integer,ArrayList<DashboardAnimal>> value) { this.animalsByCategory = value; return this; }
        public ArrayList<DashboardLand> getLands() { return lands; }
        public GetDashboardResponse setLands(ArrayList<DashboardLand> value) { this.lands = value; return this; }
        public String getGreeting() { return greeting; }
        public GetDashboardResponse setGreeting(String value) { this.greeting = value; return this; }
        public Integer getFarmsCount() { return farmsCount; }
        public GetDashboardResponse setFarmsCount(Integer value) { this.farmsCount = value; return this; }
    }

    public static class BaseResponse
    {
        public Status status = null;
        
        public Status getStatus() { return status; }
        public BaseResponse setStatus(Status value) { this.status = value; return this; }
    }

    public static class Status
    {
        public String message = null;
        public Integer statusCode = null;
        
        public String getMessage() { return message; }
        public Status setMessage(String value) { this.message = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public Status setStatusCode(Integer value) { this.statusCode = value; return this; }
    }

    public static class AnimalCategory
    {
        public Integer id = null;
        @Required()
        @StringLength(50)
        public String name = null;

        public String alias = null;
        public Integer order = null;
        public Boolean enabled = null;
        
        public Integer getId() { return id; }
        public AnimalCategory setId(Integer value) { this.id = value; return this; }
        public String getName() { return name; }
        public AnimalCategory setName(String value) { this.name = value; return this; }
        public String getAlias() { return alias; }
        public AnimalCategory setAlias(String value) { this.alias = value; return this; }
        public Integer getOrder() { return order; }
        public AnimalCategory setOrder(Integer value) { this.order = value; return this; }
        public Boolean isEnabled() { return enabled; }
        public AnimalCategory setEnabled(Boolean value) { this.enabled = value; return this; }
    }

    public static class DashboardLand
    {
        public String id = null;
        public String description = null;
        public String image = null;
        public String type = null;
        public String price = null;
        public String cityRegionName = null;
        public String priceType = null;
        
        public String getId() { return id; }
        public DashboardLand setId(String value) { this.id = value; return this; }
        public String getDescription() { return description; }
        public DashboardLand setDescription(String value) { this.description = value; return this; }
        public String getImage() { return image; }
        public DashboardLand setImage(String value) { this.image = value; return this; }
        public String getType() { return type; }
        public DashboardLand setType(String value) { this.type = value; return this; }
        public String getPrice() { return price; }
        public DashboardLand setPrice(String value) { this.price = value; return this; }
        public String getCityRegionName() { return cityRegionName; }
        public DashboardLand setCityRegionName(String value) { this.cityRegionName = value; return this; }
        public String getPriceType() { return priceType; }
        public DashboardLand setPriceType(String value) { this.priceType = value; return this; }
    }

}

Java GetDashboard DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/v1/dashboard HTTP/1.1 
Host: pecuario-backend.develsystems.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"animalCategories":[{"id":0,"name":"String","alias":"String","order":0,"enabled":false}],"animalsByCategory":{"0":[{"id":"String","description":"String","image":"String","type":"String","price":"String","cityRegionName":"String","priceType":"String"}]},"lands":[{"id":"String","description":"String","image":"String","type":"String","price":"String","cityRegionName":"String","priceType":"String"}],"greeting":"String","farmsCount":0}