retrieve all docs from documents api

9 views
Skip to first unread message

paul william ford

unread,
Jan 31, 2012, 12:26:00 AM1/31/12
to google-a...@googlegroups.com
to all,

I've written the following code below. Currently, it only retrieves about 100 documents and there are easily a 1000+. Any thoughts on what I may be doing incorrectly? Thanks

---
 GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
 oauthParameters.setOAuthConsumerKey(sourceConsumerKey);
 oauthParameters.setOAuthConsumerSecret(sourceConsumerSecret);  
 oauthParameters.setOAuthToken(sourceAccessToken);
 oauthParameters.setOAuthTokenSecret(sourceAccessTokenSecret);

 DocsService client = new DocsService("mwp-gaemigration-v1");
 try 
  {
 client.setOAuthCredentials(oauthParameters, new OAuthHmacSha1Signer());
} catch (OAuthException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

 DocumentListFeed resultFeed = client.getFeed(feedUrl, DocumentListFeed.class);
 int i=1;
 for (DocumentListEntry entry : resultFeed.getEntries()) {
   System.out.println("#" + i + " " + entry.getTitle().getPlainText() + " " + entry.getFilename() + " " + entry.getResourceId());
   i++;
 }

paul ..

Robert Kluin

unread,
Feb 1, 2012, 12:51:49 AM2/1/12
to google-a...@googlegroups.com
Hi Paul,
This is an App Engine group -- not a gdata group. You'll probably
have better luck asking there.

You might also try setting the max-results parameter.
http://code.google.com/apis/documents/docs/3.0/reference.html#Feeds


Robert

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/qj4sgBfxk2sJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

Reply all
Reply to author
Forward
0 new messages