public static interface EvrythngApiBuilder.Builder<TYPE>
| Modifier and Type | Interface and Description |
|---|---|
static class |
EvrythngApiBuilder.Builder.Result<R>
Class to hold the results and the total count.
|
| Modifier and Type | Method and Description |
|---|---|
EvrythngApiBuilder.Builder<TYPE> |
accept(String mediaType)
Sets the value of the
Accept HTTP header. |
EvrythngApiBuilder.Builder<TYPE> |
apiKey(String apiKey) |
EvrythngApiBuilder.Builder<TYPE> |
app(String appId)
Deprecated.
Use project to scope a request on a project.
|
String |
content()
Executes the current command and returns the
HttpResponse entity
content as String. |
int |
count()
Deprecated.
|
TYPE |
execute()
Executes the current command and maps the
HttpResponse entity to
T specified by ApiCommand.responseType. |
TypedResponseWithEntity<TYPE> |
executeWithResponse() |
EvrythngApiBuilder.Builder<TYPE> |
filter(String filter) |
EvrythngApiBuilder.Builder<TYPE> |
from(ApiConfiguration.QueryKeyword queryKeyword) |
EvrythngApiBuilder.Builder<TYPE> |
from(long from) |
EvrythngApiBuilder.Builder<TYPE> |
from(String from) |
ApiCommand<TYPE> |
getCommand() |
EvrythngApiBuilder.Builder<TYPE> |
header(String name,
String value)
Sets a request header or removes it if
value equals null. |
EvrythngApiBuilder.Builder<TYPE> |
ids(List<String> ids) |
String |
jsonp(String callback)
Executes the current command by requesting JSONP in the
HttpResponse entity. |
EvrythngApiBuilder.Builder.Result<TYPE> |
list()
Executes the requests and returns a result object.
|
EvrythngApiBuilder.Builder<TYPE> |
page(int page) |
EvrythngApiBuilder.Builder<TYPE> |
perPage(int perPage) |
EvrythngApiBuilder.Builder<TYPE> |
placeHolder(Boolean placeHolder) |
EvrythngApiBuilder.Builder<TYPE> |
project(String projectId) |
EvrythngApiBuilder.Builder<TYPE> |
queryParam(QueryParamValue qpv)
Sets a query parameter or removes it if the
value equals
null. |
EvrythngApiBuilder.Builder<TYPE> |
queryParam(String name,
List<String> value)
Sets a multi-valued query parameter or removes it if
value equals
null. |
EvrythngApiBuilder.Builder<TYPE> |
queryParam(String name,
String value)
Sets a query parameter or removes it if
value equals null |
EvrythngApiBuilder.Builder<TYPE> |
queryParamList(String name,
List<String> values)
Sets a multi-valued query parameter or removes it if
value equals
null. |
EvrythngApiBuilder.Builder<TYPE> |
queryParamList(String name,
String... values)
Sets a multi-valued query parameter or removes it if
value equals
null. |
EvrythngApiBuilder.Builder<TYPE> |
queryParams(Map<String,String> params)
Sets the provided query parametes.
|
org.apache.http.HttpResponse |
request()
Executes the current command and returns the native
HttpResponse. |
EvrythngApiBuilder.Builder<TYPE> |
search(String pattern) |
EvrythngApiBuilder.Builder<TYPE> |
sortOrder(com.evrythng.commons.domain.SortOrder sortOrder) |
InputStream |
stream()
Executes the current command and returns the
HttpResponse content
InputStream. |
EvrythngApiBuilder.Builder<TYPE> |
to(ApiConfiguration.QueryKeyword queryKeyword) |
EvrythngApiBuilder.Builder<TYPE> |
to(long to) |
EvrythngApiBuilder.Builder<TYPE> |
to(String to) |
EvrythngApiBuilder.Builder<TYPE> |
userScope(Iterable<String> scope) |
EvrythngApiBuilder.Builder<TYPE> |
userScopeAll()
Adds "" query param with value
ApiConfiguration.QueryKeyword.ALL |
EvrythngApiBuilder.Builder<TYPE> |
withPagination(int page,
int perPage)
Combines page and perPage methods.
|
EvrythngApiBuilder.Builder<TYPE> |
withScopes(boolean withScopes) |
TypedResponseWithEntity<TYPE> executeWithResponse() throws EvrythngException
EvrythngExceptionEvrythngApiBuilder.Builder<TYPE> queryParam(String name, String value)
value equals nullname - the query parameter namevalue - the query parameter valueEvrythngApiBuilder.Builder instanceEvrythngApiBuilder.Builder<TYPE> placeHolder(Boolean placeHolder)
EvrythngApiBuilder.Builder<TYPE> queryParam(QueryParamValue qpv)
value equals
null.qpv - the name and the value of the query parameter.EvrythngApiBuilder.Builder instanceEvrythngApiBuilder.Builder<TYPE> queryParam(String name, List<String> value)
value equals
null.name - parameter namevalue - parameter values or nullEvrythngApiBuilder.Builder instanceEvrythngApiBuilder.Builder<TYPE> queryParamList(String name, List<String> values)
value equals
null.name - parameter namevalues - parameter values or nullEvrythngApiBuilder.Builder instanceEvrythngApiBuilder.Builder<TYPE> queryParamList(String name, String... values)
value equals
null.name - parameter namevalues - parameter values or nullEvrythngApiBuilder.Builder instanceEvrythngApiBuilder.Builder<TYPE> queryParams(Map<String,String> params)
params - a map name/value entriesEvrythngApiBuilder.Builder instancequeryParam(String, String)EvrythngApiBuilder.Builder<TYPE> header(String name, String value)
value equals null.name - request header namevalue - the request header valueEvrythngApiBuilder.Builder instanceEvrythngApiBuilder.Builder<TYPE> accept(String mediaType)
Accept HTTP header.mediaType - a valid media type for the Accept HTTP headerEvrythngApiBuilder.Builder instanceTYPE execute() throws EvrythngException
HttpResponse entity to
T specified by ApiCommand.responseType.HttpResponse entity mapped to TEvrythngExceptionApiCommand.execute()String content() throws EvrythngException
HttpResponse entity
content as String.HttpResponse entity content as StringEvrythngExceptionApiCommand.content()org.apache.http.HttpResponse request()
throws EvrythngException
HttpResponse.HttpResponse resulting from the requestEvrythngExceptionApiCommand.request()InputStream stream() throws EvrythngException
HttpResponse content
InputStream.InputStream of the HttpResponseEvrythngExceptionApiCommand.stream()ApiCommand<TYPE> getCommand()
ApiCommand instanceEvrythngApiBuilder.Builder<TYPE> apiKey(String apiKey)
apiKey - the authorization token for accessing the EVRYTHNG APIEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> search(String pattern)
pattern - "" query parameter valueEvrythngApiBuilder.BuilderQSearchQueryParamValueEvrythngApiBuilder.Builder<TYPE> sortOrder(com.evrythng.commons.domain.SortOrder sortOrder)
sortOrder - "" query parameter valueEvrythngApiBuilder.BuilderSortOrderQueryParamValueEvrythngApiBuilder.Builder<TYPE> withScopes(boolean withScopes)
withScopes - "" query parameter valueEvrythngApiBuilder.BuilderWithScopesQueryParamValueEvrythngApiBuilder.Builder<TYPE> withPagination(int page, int perPage)
EvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> page(int page)
page - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> perPage(int perPage)
perPage - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> from(long from)
from - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> from(String from)
from - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> from(ApiConfiguration.QueryKeyword queryKeyword)
queryKeyword - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> to(long to)
to - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> to(String to)
to - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> to(ApiConfiguration.QueryKeyword queryKeyword)
queryKeyword - "" query parameter valueEvrythngApiBuilder.Builder@Deprecated EvrythngApiBuilder.Builder<TYPE> app(String appId)
EvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> userScope(Iterable<String> scope)
scope - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> userScopeAll()
ApiConfiguration.QueryKeyword.ALLEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> ids(List<String> ids)
ids - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> filter(String filter)
filter - "" query parameter valueEvrythngApiBuilder.BuilderEvrythngApiBuilder.Builder<TYPE> project(String projectId)
projectId - "" query parameter valueEvrythngApiBuilder.Builder@Deprecated int count() throws EvrythngException
HEAD request.EvrythngExceptionApiCommand.head(String)EvrythngApiBuilder.Builder.Result<TYPE> list() throws EvrythngException
EvrythngExceptionString jsonp(String callback) throws EvrythngException
HttpResponse entity.
callback - the name of the callback functionHttpResponse entity in the form of JSONP contentEvrythngExceptionCopyright © 2016 EVRYTHNG Ltd London / Zurich. All rights reserved.