public class AlpacaRequestBuilder
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
java.util.Map<java.lang.String,java.lang.String> |
bodyProperties |
The body properties.
|
static java.lang.String |
URL_SEPARATOR |
The Constant URL_SEPARATOR.
|
java.util.Map<java.lang.String,java.lang.String> |
urlParameters |
The url parameters.
|
| Constructor | Description |
|---|---|
AlpacaRequestBuilder(java.lang.String baseUrl) |
Instantiates a new alpaca request builder.
|
AlpacaRequestBuilder(java.lang.String baseUrl,
java.lang.String endpoint) |
Instantiates a new alpaca request builder.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
appendBodyProperty(java.lang.String parameterKey,
java.lang.String parameterValue) |
Append body property.
|
void |
appendEndpoint(java.lang.String endpoint) |
Append endpoint.
|
void |
appendURLParameter(java.lang.String parameterKey,
java.lang.String parameterValue) |
Append URL parameter.
|
java.lang.String |
getBodyAsJSON() |
Gets the body as JSON.
|
java.lang.String |
getEndpoint() |
Gets the endpoint.
|
java.lang.String |
getURL() |
Gets the url.
|
boolean |
isDefaultEndpoint() |
Checks if is default endpoint.
|
void |
setDefaultEndpoint(boolean defaultEndpoint) |
Sets the default endpoint.
|
public static final java.lang.String URL_SEPARATOR
public final java.util.Map<java.lang.String,java.lang.String> urlParameters
public final java.util.Map<java.lang.String,java.lang.String> bodyProperties
public AlpacaRequestBuilder(java.lang.String baseUrl)
baseUrl - the base urlpublic AlpacaRequestBuilder(java.lang.String baseUrl,
java.lang.String endpoint)
baseUrl - the base urlendpoint - the endpointpublic void appendURLParameter(java.lang.String parameterKey,
java.lang.String parameterValue)
parameterKey - the parameter keyparameterValue - the parameter valuepublic void appendBodyProperty(java.lang.String parameterKey,
java.lang.String parameterValue)
parameterKey - the parameter keyparameterValue - the parameter valuepublic boolean isDefaultEndpoint()
public void setDefaultEndpoint(boolean defaultEndpoint)
defaultEndpoint - the new default endpointpublic java.lang.String getBodyAsJSON()
public void appendEndpoint(java.lang.String endpoint)
endpoint - the endpointpublic java.lang.String getEndpoint()
public java.lang.String getURL()