public interface MessageBirdService
| Modifier and Type | Method and Description |
|---|---|
<R> R |
delete(String request,
Class<R> clazz)
Send DELETE request.
|
void |
deleteByID(String request,
String id)
Delete a object by ID.
|
String |
getBinaryData(String request,
String basePath,
String fileName)
Gets the data from the request URL and stores it to basePath/fileName
|
<R> R |
request(String request,
Class<R> clazz)
Send GET request .
|
<R> R |
requestByID(String request,
String id,
Class<R> clazz)
Execute a object by ID request.
|
<R> R |
requestByID(String request,
String id,
Map<String,Object> params,
Class<R> clazz) |
<E> List<E> |
requestByIdAsList(String request,
String id,
Class<E> elementClass)
Execute a object by ID request.
|
<R> R |
requestList(String request,
Integer offset,
Integer limit,
Class<R> clazz)
Request a List 'of' object.
|
<R> R |
requestList(String request,
Map<String,Object> params,
Integer offset,
Integer limit,
Class<R> clazz)
Request a List 'of' object.
|
<R> R |
requestList(String request,
PagedPaging pagedPaging,
Class<R> clazz)
Request a List 'of' object.
|
<R,P> R |
sendPayLoad(String request,
P payload,
Class<R> clazz)
Send a payload with the POST method and receive a payload object.
|
<R,P> R |
sendPayLoad(String method,
String request,
Map<String,String> headers,
P payload,
Class<R> clazz)
Send a payload with the provided method and headers and receive a payload object.
|
<R,P> R |
sendPayLoad(String method,
String request,
P payload,
Class<R> clazz)
Send a payload with the provided method and receive a payload object.
|
<R> R request(String request, Class<R> clazz) throws UnauthorizedException, GeneralException, NotFoundException
request - path to the request, for example "/messages/id/language"clazz - Class type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionNotFoundException - if id not found<R> R requestByID(String request, String id, Class<R> clazz) throws UnauthorizedException, GeneralException, NotFoundException
request - path to the request, for example "/messages"id - id of the object to request. id can be null in case request's that don't need a id, for example /balanceclazz - Class type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionNotFoundException<R> R requestByID(String request, String id, Map<String,Object> params, Class<R> clazz) throws UnauthorizedException, GeneralException, NotFoundException
<E> List<E> requestByIdAsList(String request, String id, Class<E> elementClass) throws UnauthorizedException, GeneralException, NotFoundException
request - path to the request, for example "/messages"id - id of the object to request. id can be null in case request's that don't need a id, for example /balanceelementClass - Class type of List to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionNotFoundExceptionvoid deleteByID(String request, String id) throws UnauthorizedException, GeneralException, NotFoundException
request - path to the request, for example "/messages"id - id of the object to deleteUnauthorizedException - if client is unauthorizedGeneralException - general exceptionNotFoundException - if id not found<R> R delete(String request, Class<R> clazz) throws UnauthorizedException, GeneralException, NotFoundException
request - path to the request, for example "/messages/id/language"clazz - Class type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionNotFoundException - if id not found<R> R requestList(String request, Integer offset, Integer limit, Class<R> clazz) throws UnauthorizedException, GeneralException
request - request from clientoffset - offset of data to returnlimit - limit number of objects, incase you notice you pass in '1' a lot, please consider using requestByID if you know the ID of the messageclazz - object type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionMessageList<R> R requestList(String request, Map<String,Object> params, Integer offset, Integer limit, Class<R> clazz) throws UnauthorizedException, GeneralException
request - request from clientparams - additional query paramsoffset - offset of data to returnlimit - limit number of objects, incase you notice you pass in '1' a lot, please consider using requestByID if you know the ID of the messageclazz - object type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionMessageList<R> R requestList(String request, PagedPaging pagedPaging, Class<R> clazz) throws UnauthorizedException, GeneralException
request - request from clientpagedPaging - includes page and page sizeclazz - object type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionMessageList<R,P> R sendPayLoad(String request, P payload, Class<R> clazz) throws UnauthorizedException, GeneralException
request - path to the request, for example "/messages"payload - payload to send to the serverclazz - object type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exception<R,P> R sendPayLoad(String method, String request, P payload, Class<R> clazz) throws UnauthorizedException, GeneralException
method - HTTP method to use for the requestrequest - path to the request, for example "/messages"payload - payload to send to the serverclazz - object type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exception<R,P> R sendPayLoad(String method, String request, Map<String,String> headers, P payload, Class<R> clazz) throws UnauthorizedException, GeneralException
method - HTTP method to use for the requestrequest - path to the request, for example "/messages"headers - additional headers to set on the requestpayload - payload to send to the serverclazz - object type to returnUnauthorizedException - if client is unauthorizedGeneralException - general exceptionString getBinaryData(String request, String basePath, String fileName) throws UnauthorizedException, GeneralException, NotFoundException
request - path to the request, for example "/messages"basePath - base path for storing directoryfileName - the fileName that is going to be stored.UnauthorizedException - if client is unauthorizedGeneralException - general exceptionNotFoundException - if the file is not foundCopyright © 2024. All rights reserved.