|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Connection
Builds and executes a single call against the Flattr API.
Method Summary | |
---|---|
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 |
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. |
Method Detail |
---|
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 used
Connection key(ConsumerKey key)
key
- ConsumerKey
to be used
Connection call(String call)
If no call is set, the url(String)
is invoked unchanged.
call
- Signature of the call to be invoked
Connection parameter(String name, String value)
name
- Parameter name, without colon prependedvalue
- Value to be used.
Connection query(String name, String value)
name
- Parameter namevalue
- Parameter value
Connection data(FlattrObject data)
RequestType.POST
or
RequestType.PATCH
, otherwise an exception will be thrown.
data
- Data to be sent
Connection form(String name, String value)
RequestType.POST
, otherwise an
exception will be thrown. Do not mix with data(FlattrObject)
.
name
- Parameter namevalue
- Parameter value
Connection rateLimit(RateLimit limit)
RateLimit
object to keep updated.
limit
- RateLimit
object
FlattrObject singleResult() throws FlattrException
FlattrObject
as response.
FlattrObject
, never null
FlattrException
- if the call could not be invoked or the web service returned an error
MarshalException
- if more or less than a single FlattrObject were returnedCollection<FlattrObject> result() throws FlattrException
FlattrObject
as response.
FlattrObject
, may be empty but never
null
FlattrException
- if the call could not be invoked or the web service returned an error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |