public interface FlattrService extends OpenService
All calls will decrement the remaining rate by one, unless noted otherwise.
Modifier and Type | Method and Description |
---|---|
void |
click(AutoSubmission submission)
Deprecated.
use
flattr(AutoSubmission) instead |
void |
click(String url)
Deprecated.
use
flattr(String) instead |
void |
click(ThingId thingId)
Deprecated.
use
flattr(ThingId) instead |
ThingId |
create(Submission thing)
Creates a new Thing.
|
void |
delete(ThingId thingId)
Deletes a Thing.
|
MiniThing |
flattr(AutoSubmission submission)
Flattrs an
AutoSubmission . |
MiniThing |
flattr(String url)
Flattrs a URL.
|
MiniThing |
flattr(ThingId thingId)
Flattrs a Thing.
|
List<Activity> |
getMyActivities(Activity.Type type)
Returns all
Activity of the associated user. |
List<Flattr> |
getMyFlattrs()
Returns all
Flattr submitted by the associated user. |
List<Flattr> |
getMyFlattrs(Integer count,
Integer page)
Returns all
Flattr submitted by the associated user. |
User |
getMyself()
Gets the
User profile of the associated user. |
List<Subscription> |
getMySubscriptions()
Returns all
Subscription of the associated user. |
List<Thing> |
getMyThings()
Returns all
Thing submitted by the associated user. |
List<Thing> |
getMyThings(Integer count,
Integer page)
Returns all
Thing submitted by the associated user. |
Subscription |
getSubscription(ThingId thingId)
Returns the
Subscription of the given Thing . |
void |
pauseSubscription(ThingId thingId,
boolean paused)
Pauses or resumes a
Subscription . |
void |
subscribe(ThingId thingId)
Subscribes a
Thing . |
boolean |
toggleSubscription(ThingId thingId)
Toggles the pause state of the subscription of the given
Thing . |
void |
unsubscribe(ThingId thingId)
Cancels subscription of a
Thing . |
void |
update(Thing thing)
Updates a Thing.
|
getActivities, getCategories, getCurrentRateLimit, getFlattrs, getFlattrs, getFlattrs, getFlattrs, getLanguages, getLastRateLimit, getThing, getThingBySubmission, getThingByUrl, getThings, getThings, getThings, getUser, isFullMode, searchThings, setFullMode
@RequiredScope(value=THING) ThingId create(Submission thing) throws FlattrException
thing
- Submission
to be submittedThingId
of the Thing
that was createdFlattrException
@RequiredScope(value=THING) void update(Thing thing) throws FlattrException
thing
- Thing
to be modifiedFlattrException
@RequiredScope(value=THING) void delete(ThingId thingId) throws FlattrException
thingId
- ThingId
to deleteFlattrException
@Deprecated @RequiredScope(value=FLATTR) void click(ThingId thingId) throws FlattrException
flattr(ThingId)
insteadthingId
- ThingId
to flattrFlattrException
@Deprecated @RequiredScope(value=FLATTR) void click(AutoSubmission submission) throws FlattrException
flattr(AutoSubmission)
insteadAutoSubmission
. If the submission has not been submitted to
Flattr yet, it will automatically be submitted before.submission
- AutoSubmission
to flattrFlattrException
@Deprecated @RequiredScope(value=FLATTR) void click(String url) throws FlattrException
flattr(String)
insteadurl
- URL to flattrFlattrException
@RequiredScope(value=FLATTR) MiniThing flattr(ThingId thingId) throws FlattrException
thingId
- ThingId
to flattrMiniThing
of the flattr-ed thing (containing an updated click
count)FlattrException
@RequiredScope(value=FLATTR) MiniThing flattr(AutoSubmission submission) throws FlattrException
AutoSubmission
. If the submission has not been submitted to
Flattr yet, it will automatically be submitted before.submission
- AutoSubmission
to flattrMiniThing
of the flattr-ed thing (containing an updated click
count)FlattrException
@RequiredScope(value=FLATTR) MiniThing flattr(String url) throws FlattrException
url
- URL to flattrMiniThing
of the flattr-ed thing (containing an updated click
count)FlattrException
@RequiredScope(value=FLATTR) void subscribe(ThingId thingId) throws FlattrException
Thing
.thingId
- ThingId
to subscribeFlattrException
@RequiredScope(value=FLATTR) void unsubscribe(ThingId thingId) throws FlattrException
Thing
.thingId
- ThingId
to unsubscribedFlattrException
@RequiredScope User getMyself() throws FlattrException
User
profile of the associated user.User
profile of oneselfFlattrException
@RequiredScope List<Thing> getMyThings() throws FlattrException
Thing
submitted by the associated user. Limited to 30 entries.Thing
FlattrException
@RequiredScope List<Thing> getMyThings(Integer count, Integer page) throws FlattrException
Thing
submitted by the associated user.count
- Number of entries per page, null
defaults to 30 entriespage
- Page number (counted from 1), or null
to turn off pagingThing
FlattrException
@RequiredScope List<Flattr> getMyFlattrs() throws FlattrException
Flattr
submitted by the associated user. Limited to 30 entries.Flattr
FlattrException
@RequiredScope List<Flattr> getMyFlattrs(Integer count, Integer page) throws FlattrException
Flattr
submitted by the associated user.count
- Number of entries per page, null
defaults to 30 entriespage
- Page number (counted from 1), or null
to turn off pagingFlattr
FlattrException
@RequiredScope List<Activity> getMyActivities(Activity.Type type) throws FlattrException
Activity
of the associated user.type
- activity type. null
defaults to Activity.Type#OUTGOING
.Activity
FlattrException
@RequiredScope(value=FLATTR) List<Subscription> getMySubscriptions() throws FlattrException
Subscription
of the associated user.Subscription
FlattrException
@RequiredScope(value=FLATTR) Subscription getSubscription(ThingId thingId) throws FlattrException
Subscription
of the given Thing
. Only the subscriptions
of the associated user are accessible.
Note: This call is emulated by flattr4j. Depending on the number of subscriptions of the associated user, this call may take some time and cause increased network traffic. It may also increment the rate counter by more than 1.
thingId
- ThingId
to get the subscription ofSubscription
of this thing, or null
if there is no such
subscriptionFlattrException
@RequiredScope(value=FLATTR) boolean toggleSubscription(ThingId thingId) throws FlattrException
Thing
.thingId
- ThingId
of the thing to toggle the pause state oftrue
if the subscription is now paused, false
if the
subscription was resumed.FlattrException
@RequiredScope(value=FLATTR) void pauseSubscription(ThingId thingId, boolean paused) throws FlattrException
Subscription
. If the subscription is already in the
desired state, nothing will happen.
Note: There is currently no way to explicitely set the pause state of a subscription via Flattr API. flattr4j emulates this call by toggling the pause state to get the current state, and if necessary, toggling it again to set the subscription to the desired state (which means that the rate counter is incremented by 2). This call is not atomic. If the second toggle call should fail, it will leave the subscription in the opposite state.
thingId
- ThingId
of the thing to set the pause statepaused
- true
: pause subscription, false
: resume subscriptionFlattrException
Copyright © 2010–2014. All rights reserved.