@ApiMethod( name = "checkPlayer", scopes = {Constants.EMAIL_SCOPE}, clientIds = { Constants.WEB_CLIENT_ID, Constants.ANDROID_CLIENT_ID, com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID }, audiences = {Constants.ANDROID_AUDIENCE}) public Player checkPlayer(User user) throws UnauthorizedException { return playerLogic.checkPlayer(user); }
@ApiMethod( name = "getPlayer", scopes = {Constants.EMAIL_SCOPE}, clientIds = { Constants.WEB_CLIENT_ID, Constants.ANDROID_CLIENT_ID, com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID }, audiences = {Constants.ANDROID_AUDIENCE}) public Player getPlayer(@Named("id") String id, User user) throws UnauthorizedException { // checkAuthorization(player, user); return playerLogic.getPlayer(id, user); }
/** * This method lists all the entities inserted in datastore. It uses HTTP GET method and paging * support. * * @return A CollectionResponse class containing the list of all entities persisted and a cursor * to the next page. */ @SuppressWarnings({"unchecked", "unused"}) @ApiMethod( name = "listPlayer", scopes = {Constants.EMAIL_SCOPE}, clientIds = { Constants.WEB_CLIENT_ID, Constants.ANDROID_CLIENT_ID, com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID }, audiences = {Constants.ANDROID_AUDIENCE}) public CollectionResponse<Player> listPlayer( @Nullable @Named("cursor") String cursorString, @Nullable @Named("limit") Integer limit, User user) throws UnauthorizedException { return playerLogic.listPlayer(cursorString, limit, user); }
/** * This method removes the entity with primary key id. It uses HTTP DELETE method. * * @param id the primary key of the entity to be deleted. */ @ApiMethod(name = "removePlayer") public void removePlayer(@Named("id") String id) { playerLogic.removePlayer(id); }