Class GamificationRestEndpoint
java.lang.Object
org.exoplatform.addons.gamification.rest.GamificationRestEndpoint
- All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer
@RolesAllowed("users")
public class GamificationRestEndpoint
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGamificationRestEndpoint(GamificationService gamificationService, org.exoplatform.social.core.manager.IdentityManager identityManager, DomainService domainService, RuleService ruleService) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseReturn all eventsjavax.ws.rs.core.ResponsegetAllPointsByUserId(String userId, String period) Return all earned points by a userjavax.ws.rs.core.ResponsegetAllPointsByUserIdByDate(String userId, String startDateEntry, String endDateEntry) Return earned points by a user during a given periodjavax.ws.rs.core.ResponseReturn enabled domainsjavax.ws.rs.core.ResponsegetLeaderboardByDate(javax.ws.rs.core.UriInfo uriInfo, String earnerType, String startDateEntry, String endDateEntry)
-
Constructor Details
-
GamificationRestEndpoint
public GamificationRestEndpoint(GamificationService gamificationService, org.exoplatform.social.core.manager.IdentityManager identityManager, DomainService domainService, RuleService ruleService)
-
-
Method Details
-
getAllPointsByUserId
@RolesAllowed("users") public javax.ws.rs.core.Response getAllPointsByUserId(String userId, String period) Return all earned points by a user- Parameters:
userId- : user social idperiod- : Period of time- Returns:
- : and object of type GamificationPoints
-
getAllPointsByUserIdByDate
@RolesAllowed("users") public javax.ws.rs.core.Response getAllPointsByUserIdByDate(String userId, String startDateEntry, String endDateEntry) Return earned points by a user during a given period- Parameters:
userId- : user social idstartDateEntry- : Date from when gamification api filter earned pointsendDateEntry- : Date until when gamification api filter eearned points- Returns:
- : and object of type GamificationPoints
-
getLeaderboardByDate
-
getDomains
@RolesAllowed("users") public javax.ws.rs.core.Response getDomains()Return enabled domains- Returns:
- : list of enabled domains
-
getAllEvents
@RolesAllowed("users") public javax.ws.rs.core.Response getAllEvents()Return all events- Returns:
- : list of all events
-