streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject [1/2] git commit: STREAMS-180 | Updated the Instagram Mapper to include omitted attributes
Date Thu, 25 Sep 2014 17:49:06 GMT
Repository: incubator-streams
Updated Branches:
  refs/heads/master e6045f85e -> f90d91348


STREAMS-180 | Updated the Instagram Mapper to include omitted attributes


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/1ea90312
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/1ea90312
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/1ea90312

Branch: refs/heads/master
Commit: 1ea903129b5938537fa6d388b652596d5463478b
Parents: 1292375
Author: Robert Douglas <rdouglas@w2ogroup.com>
Authored: Wed Sep 24 16:51:44 2014 -0500
Committer: Robert Douglas <rdouglas@w2ogroup.com>
Committed: Wed Sep 24 16:51:44 2014 -0500

----------------------------------------------------------------------
 .../instagram/serializer/util/InstagramActivityUtil.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/1ea90312/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/serializer/util/InstagramActivityUtil.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/serializer/util/InstagramActivityUtil.java
b/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/serializer/util/InstagramActivityUtil.java
index d41ea93..87c306f 100644
--- a/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/serializer/util/InstagramActivityUtil.java
+++ b/streams-contrib/streams-provider-instagram/src/main/java/org/apache/streams/instagram/serializer/util/InstagramActivityUtil.java
@@ -135,6 +135,10 @@ public class InstagramActivityUtil {
             Map<String, Object> extensions = new HashMap<String, Object>();
             extensions.put("screenName", item.getUser().getUserName());
 
+            actor.setDisplayName(item.getUser().getFullName());
+            actor.setSummary(item.getUser().getBio());
+            actor.setUrl(item.getUser().getWebsiteUrl());
+
             actor.setId(formatId(String.valueOf(item.getUser().getId())));
             actor.setImage(image);
             actor.setAdditionalProperty("extensions", extensions);
@@ -158,12 +162,12 @@ public class InstagramActivityUtil {
         actObj.setAttachments(buildActivityObjectAttachments(item));
 
         Image standardResolution = new Image();
-        if(item.getType() == "image" && item.getImages() != null) {
+        if(item.getType().equals("image") && item.getImages() != null) {
             ImageData standardResolutionData = item.getImages().getStandardResolution();
             standardResolution.setHeight((double)standardResolutionData.getImageHeight());
             standardResolution.setWidth((double)standardResolutionData.getImageWidth());
             standardResolution.setUrl(standardResolutionData.getImageUrl());
-        } else if(item.getType() == "video" && item.getVideos() != null) {
+        } else if(item.getType().equals("video") && item.getVideos() != null) {
             VideoData standardResolutionData = item.getVideos().getStandardResolution();
             standardResolution.setHeight((double)standardResolutionData.getHeight());
             standardResolution.setWidth((double)standardResolutionData.getWidth());


Mime
View raw message