Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(493)

Issue 1756043: Support startIndex and count in os:ActivitiesRequest (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 8 months ago by chirag
Modified:
15 years, 7 months ago
Reviewers:
dev-remailer
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

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

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/PipelinedData.java View 1 chunk +2 lines, -0 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/PipelinedDataTest.java View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 2
chirag
15 years, 8 months ago (2010-07-09 17:35:55 UTC) #1
chirag
15 years, 8 months ago (2010-07-12 22:23:29 UTC) #2
+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,  <chiragshah1@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#Act...
>
> 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']"
>         + "}}");
>
>
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b