com.barchart.ondemand.api.USDAGrainsRequest Maven / Gradle / Ivy
The newest version!
package com.barchart.ondemand.api;
import java.util.HashMap;
import java.util.Map;
import com.barchart.ondemand.api.responses.USDAGrains;
public class USDAGrainsRequest implements OnDemandRequest {
private final String fields;
private final Map params = new HashMap();
private USDAGrainsRequest(final Builder b) {
this.fields = "";
}
@Override
public String endpoint() {
return "getUSDAGrainPrices.json";
}
@Override
public String name() {
return "USDA Grain Prices";
}
@Override
public Map parameters() {
if (!fields.isEmpty()) {
params.put("fields", fields);
}
return params;
}
@Override
public Class responseType() {
return USDAGrains.class;
}
public static class Builder {
public USDAGrainsRequest build() {
return new USDAGrainsRequest(this);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy