0

I am using Jumblr(Tumblr API for Java) in my app to get all the dashboard posts from Tumblr. But I get only 20 posts in return. I want to increase the limit. I have looked into the Jumblr documentation Kindly help me with this.

My code is below:

JumblrClient client = new JumblrClient(consumer_key, consumer_secret);
client.setToken(OAuthToken, OAuthSecretToken);
    // Write the user's name

    List<Post> posts = client.userDashboard();
    System.out.print("\t"+posts.toString());
    for (int i = 0; i<posts.size();i++) {
        System.out.println("\t" + posts.get(i).getBlogName());
        System.out.println("\t" + posts.get(i).getType());
        System.out.println("\t" + posts.get(i).getPostUrl());
    }
Waheed Abbas
  • 187
  • 1
  • 4
  • 18

1 Answers1

0

I found the solution to my problem in the Jumblr docs. I have to pass the options parameter to userDashboard().

 Map<String, Integer> options = new HashMap<String, Integer>();
 options.put("limit", 50);
 List<Post> posts = client.userDashboard(options);
Waheed Abbas
  • 187
  • 1
  • 4
  • 18