You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Chirag Shah <ch...@gmail.com> on 2010/07/13 00:23:28 UTC
Re: Support startIndex and count in os:ActivitiesRequest
(issue1756043)
+dev@shindig.apache.org
Doesn't look like the original email was dispatched by
dev-remailer@shindig.apache.org.
On Fri, Jul 9, 2010 at 10:35 AM, <ch...@gmail.com> wrote:
> Reviewers: dev-remailer_shindig.apache.org,
>
> Description:
> Add support for startIndex and count in os:ActivitiesRequest.
>
> These attributes aren't explicitly defined in the Social-Gadget spec,
> but they are given in the <os:ActivitiesRequest> example.
>
> Spec:
> http://opensocial-resources.googlecode.com/svn/spec/1.1/Social-Gadget.xml#ActivitiesRequest
>
> Please review this at http://codereview.appspot.com/1756043/show
>
> Affected files:
> java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/PipelinedData.java
> java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/PipelinedDataTest.java
>
>
> Index:
> java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/PipelinedData.java
> ===================================================================
> ---
> java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/PipelinedData.java
> (revision 962584)
> +++
> java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/PipelinedData.java
> (working copy)
> @@ -314,6 +314,8 @@
> // TODO: SHINDIG-711 should be activityIds?
> copyAttribute("activityId", child, expression, JSONArray.class);
> copyAttribute("fields", child, expression, JSONArray.class);
> + copyAttribute("startIndex", child, expression, Integer.class);
> + copyAttribute("count", child, expression, Integer.class);
>
> // TODO: add activity paging support
>
> Index:
> java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/PipelinedDataTest.java
> ===================================================================
> ---
> java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/PipelinedDataTest.java
> (revision 962584)
> +++
> java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/PipelinedDataTest.java
> (working copy)
> @@ -232,15 +232,20 @@
> String xml = "<Content><ActivitiesRequest xmlns=\"" +
> PipelinedData.OPENSOCIAL_NAMESPACE + "\" "
> + " key=\"key\""
> + " userId=\"@owner,@viewer\""
> + + " startIndex=\"10\""
> + + " count=\"20\""
> + " fields=\"foo,bar\""
> + "/></Content>";
>
> +
> PipelinedData socialData = new PipelinedData(XmlUtil.parse(xml), null);
> assertTrue(socialData.needsOwner());
> assertTrue(socialData.needsViewer());
>
> JSONObject expected = new JSONObject("{method: 'activities.get', id:
> 'key', params:"
> + "{userId: ['@owner','@viewer'],"
> + + "startIndex: 10,"
> + + "count: 20,"
> + "fields: ['foo','bar']"
> + "}}");
>
>
>
>