package org.gcube.portal.social_networking_client_library; import java.util.HashMap; import java.util.Map; import javax.ws.rs.core.GenericType; import org.gcube.portal.social_networking_client_library.utils.HttpClient; import org.gcube.portal.socialnetworking.model.output.ResponseBean; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * HashTags client. * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) */ public class HashTagsClient extends BaseClient{ private static final String SUB_SERVICE_PATH = "2/hashtags/"; private static Logger logger = LoggerFactory.getLogger(HashTagsClient.class); public HashTagsClient() throws Exception { super(SUB_SERVICE_PATH); } /** * Get hashtags and their count * @return a map of type hashtag -> number */ public Map getHashtagsCount(){ logger.debug("Request for hastags"); String thisMethodSignature = "get-hashtags-and-occurrences"; String request = getServiceEndpoint() + thisMethodSignature; return HttpClient.get(new GenericType>>(){}, request); } }