public interface Connection
| Modifier and Type | Method and Description |
|---|---|
Connection |
call(String call)
Call to be placed against the URL.
|
Connection |
data(FlattrObject data)
Data to be transported to the call.
|
Connection |
form(String name,
String value)
Form parameter to be sent.
|
Connection |
key(ConsumerKey key)
Consumer key to be used.
|
Connection |
parameter(String name,
String value)
A parameter to be used for a placeholder in the call string.
|
Connection |
parameterArray(String name,
String[] value)
An array of parameters to be used for a placeholder in the call string.
|
Connection |
query(String name,
String value)
Query parameter to be used in the URL.
|
Connection |
rateLimit(RateLimit limit)
RateLimit object to keep updated. |
Collection<FlattrObject> |
result()
Invokes the call and returns a Collection of
FlattrObject as response. |
FlattrObject |
singleResult()
Invokes the call and returns a single
FlattrObject as response. |
Connection |
token(AccessToken token)
Access token to be used for calls that require authentication.
|
Connection |
url(String url)
Base URL to connect to.
|
Connection url(String url)
url - URL to connect to.Connection token(AccessToken token)
AccessToken is set, the call will be placed anonymously.token - AccessToken to be usedConnection key(ConsumerKey key)
key - ConsumerKey to be usedConnection call(String call)
If no call is set, the url(String) is invoked unchanged.
call - Signature of the call to be invokedConnection parameter(String name, String value)
name - Parameter name, without colon prependedvalue - Value to be used. Will be URL encoded.Connection parameterArray(String name, String[] value)
name - Parameter name, without colon prependedvalue - Values to be used.Connection query(String name, String value)
name - Parameter namevalue - Parameter valueConnection data(FlattrObject data)
RequestType.POST or
RequestType.PATCH, otherwise an exception will be thrown.data - Data to be sentConnection form(String name, String value)
RequestType.POST, otherwise an
exception will be thrown. Do not mix with data(FlattrObject).name - Parameter namevalue - Parameter valueConnection rateLimit(RateLimit limit)
RateLimit object to keep updated.limit - RateLimit objectFlattrObject singleResult() throws FlattrException
FlattrObject as response.FlattrObject, never nullFlattrException - if the call could not be invoked or the web service returned an errorMarshalException - if more or less than a single FlattrObject were returnedCollection<FlattrObject> result() throws FlattrException
FlattrObject as response.FlattrObject, may be empty but never
nullFlattrException - if the call could not be invoked or the web service returned an errorCopyright © 2010-2013. All Rights Reserved.