+...@shindig.apache.org

Doesn't look like the original email was dispatched by
dev-remai...@shindig.apache.org.

On Fri, Jul 9, 2010 at 10:35 AM,  <chiragsh...@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']"
>         + "}}");
>
>
>
>

Reply via email to