com.what3words.javawrapper.request.GridSectionRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of w3w-java-wrapper Show documentation
Show all versions of w3w-java-wrapper Show documentation
Java library for what3words REST API.
package com.what3words.javawrapper.request;
import com.what3words.javawrapper.What3WordsV3;
import com.what3words.javawrapper.response.APIResponse;
import com.what3words.javawrapper.response.GridSection;
public class GridSectionRequest extends Request {
private String boundingBox;
private GridSectionRequest(Builder builder) {
super(builder.api);
boundingBox = builder.boundingBox;
}
private GridSection execute() {
return super.execute(api.what3words().gridSection(boundingBox), GridSection.class);
}
public static class Builder extends AbstractBuilder {
private String boundingBox;
public Builder(What3WordsV3 api, BoundingBox boundingBox) {
super(api);
this.boundingBox = String.valueOf(boundingBox.sw.lat) + "," + String.valueOf(boundingBox.sw.lng) + "," +
String.valueOf(boundingBox.ne.lat) + "," + String.valueOf(boundingBox.ne.lng);
}
public GridSection execute() {
return new GridSectionRequest(this).execute();
}
}
}