org.shredzone.flattr4j
Interface FlattrService

All Superinterfaces:
OpenService
All Known Implementing Classes:
FlattrServiceImpl

public interface FlattrService
extends OpenService

Service calls to the Flattr REST API which require authorization.

All calls will decrement the remaining rate by one, unless noted otherwise.

Author:
Richard "Shred" Körber

Method Summary
 void click(AutoSubmission submission)
          Flattrs an AutoSubmission.
 void click(String url)
          Flattrs a URL.
 void click(ThingId thingId)
          Flattrs a Thing.
 ThingId create(Submission thing)
          Creates a new Thing.
 void delete(ThingId thingId)
          Deletes 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<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.
 void update(Thing thing)
          Updates a Thing.
 
Methods inherited from interface org.shredzone.flattr4j.OpenService
getActivities, getCategories, getFlattrs, getFlattrs, getFlattrs, getFlattrs, getLanguages, getLastRateLimit, getThing, getThingBySubmission, getThingByUrl, getThings, getThings, getThings, getUser, searchThings
 

Method Detail

create

@RequiredScope(value=THING)
ThingId create(Submission thing)
               throws FlattrException
Creates a new Thing. The authenticated user will be the owner of the Thing.

Parameters:
thing - Submission to be submitted
Returns:
ThingId of the Thing that was created
Throws:
FlattrException
Since:
2.0

update

@RequiredScope(value=THING)
void update(Thing thing)
            throws FlattrException
Updates a Thing.

Parameters:
thing - Thing to be modified
Throws:
FlattrException
Since:
2.0

delete

@RequiredScope(value=THING)
void delete(ThingId thingId)
            throws FlattrException
Deletes a Thing.

Parameters:
thingId - ThingId to delete
Throws:
FlattrException
Since:
2.0

click

@RequiredScope(value=FLATTR)
void click(ThingId thingId)
           throws FlattrException
Flattrs a Thing. This means that the Thing is flattr-ed by the associated user.

Parameters:
thingId - ThingId to flattr
Throws:
FlattrException

click

@RequiredScope(value=FLATTR)
void click(AutoSubmission submission)
           throws FlattrException
Flattrs an AutoSubmission. If the submission has not been submitted to Flattr yet, it will automatically be submitted before.

Parameters:
submission - AutoSubmission to flattr
Throws:
FlattrException

click

@RequiredScope(value=FLATTR)
void click(String url)
           throws FlattrException
Flattrs a URL.

Parameters:
url - URL to flattr
Throws:
FlattrException

getMyself

@RequiredScope
User getMyself()
               throws FlattrException
Gets the User profile of the associated user.

Returns:
User profile of oneself
Throws:
FlattrException

getMyThings

@RequiredScope
List<Thing> getMyThings()
                        throws FlattrException
Returns all Thing submitted by the associated user. Limited to 30 entries.

Returns:
List of Thing
Throws:
FlattrException
Since:
2.0

getMyThings

@RequiredScope
List<Thing> getMyThings(Integer count,
                                      Integer page)
                        throws FlattrException
Returns all Thing submitted by the associated user.

Parameters:
count - Number of entries per page, null defaults to 30 entries
page - Page number (counted from 1), or null to turn off paging
Returns:
List of Thing
Throws:
FlattrException
Since:
2.0

getMyFlattrs

@RequiredScope
List<Flattr> getMyFlattrs()
                          throws FlattrException
Returns all Flattr submitted by the associated user. Limited to 30 entries.

Returns:
List of Flattr
Throws:
FlattrException
Since:
2.0

getMyFlattrs

@RequiredScope
List<Flattr> getMyFlattrs(Integer count,
                                        Integer page)
                          throws FlattrException
Returns all Flattr submitted by the associated user.

Parameters:
count - Number of entries per page, null defaults to 30 entries
page - Page number (counted from 1), or null to turn off paging
Returns:
List of Flattr
Throws:
FlattrException
Since:
2.0

getMyActivities

@RequiredScope
List<Activity> getMyActivities(Activity.Type type)
                               throws FlattrException
Returns all Activity of the associated user.

Parameters:
type - activity type. null defaults to Activity.Type#OUTGOING.
Returns:
List of Activity
Throws:
FlattrException
Since:
2.0


Copyright © 2010-2012. All Rights Reserved.