Return-Path: X-Original-To: apmail-streams-dev-archive@minotaur.apache.org Delivered-To: apmail-streams-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DF2D11E68 for ; Thu, 22 May 2014 17:19:26 +0000 (UTC) Received: (qmail 56722 invoked by uid 500); 22 May 2014 17:19:26 -0000 Delivered-To: apmail-streams-dev-archive@streams.apache.org Received: (qmail 56682 invoked by uid 500); 22 May 2014 17:19:26 -0000 Mailing-List: contact dev-help@streams.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@streams.incubator.apache.org Delivered-To: mailing list dev@streams.incubator.apache.org Received: (qmail 56674 invoked by uid 99); 22 May 2014 17:19:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2014 17:19:26 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 22 May 2014 17:19:26 +0000 Received: (qmail 55086 invoked by uid 99); 22 May 2014 17:19:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2014 17:19:02 +0000 Date: Thu, 22 May 2014 17:19:02 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@streams.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (STREAMS-93) Add generic extensions from multiple providers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STREAMS-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14006148#comment-14006148 ] ASF GitHub Bot commented on STREAMS-93: --------------------------------------- Github user robdouglas commented on a diff in the pull request: https://github.com/apache/incubator-streams/pull/25#discussion_r12961833 --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/TwitterJsonTweetActivitySerializer.java --- @@ -78,35 +80,71 @@ public Activity deserialize(String serialized) throws ActivitySerializerExceptio activity.setProvider(getProvider()); activity.setTitle(""); activity.setContent(tweet.getText()); - activity.setUrl("http://twitter.com/" + tweet.getIdStr()); + activity.setUrl("http://twitter.com/" + tweet.getUser().getIdStr() + "/status/" + tweet.getIdStr()); activity.setLinks(getLinks(tweet)); addTwitterExtension(activity, mapper.convertValue(tweet, ObjectNode.class)); addLocationExtension(activity, tweet); + addTwitterExtensions(activity, tweet); + return activity; } + public static void addTwitterExtensions(Activity activity, Tweet tweet) { --- End diff -- Valid point, pushed change > Add generic extensions from multiple providers > ---------------------------------------------- > > Key: STREAMS-93 > URL: https://issues.apache.org/jira/browse/STREAMS-93 > Project: Streams > Issue Type: Task > Reporter: Robert Douglas > Original Estimate: 4h > Remaining Estimate: 4h > > At the moment, if we want to grab out things like "hashtags" or "Number of Likes" from an activity, we have to delve into that provider's extension. So, for example, "extensions.twitter.entities.hashtags.text". There are certain attributes that are consistent across multiple providers and could benefit from being placed at the top level of the "extensions" attribute. > These would include things like "hashtags", "rebroadcasts", "likes", "user_mentions", and "urls" -- This message was sent by Atlassian JIRA (v6.2#6252)