import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.tumblr.jumblr.JumblrClient;
import com.tumblr.jumblr.types.Blog;
import com.tumblr.jumblr.types.PhotoPost;
import com.tumblr.jumblr.types.Post;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * Example usage of Jumblr
 * @author jc
 */
public class App {

    public static void main(String[] args) throws FileNotFoundException, IOException, InstantiationException, IllegalAccessException {

        // Read in the JSON data for the credentials
        FileReader fr = new FileReader("credentials.json");
        BufferedReader br = new BufferedReader(fr);
        String json = "";
        while (br.ready()) { json += br.readLine(); }

        // Parse the credentials
        JsonParser parser = new JsonParser();
        JsonObject obj = (JsonObject) parser.parse(json);

        // Create a client
        JumblrClient client = new JumblrClient(
            obj.getAsJsonPrimitive("consumer_key").getAsString(),
            obj.getAsJsonPrimitive("consumer_secret").getAsString()
        );

        // Give it a token
        client.setToken(
            obj.getAsJsonPrimitive("oauth_token").getAsString(),
            obj.getAsJsonPrimitive("oauth_token_secret").getAsString()
        );

        // And make some calls - 2 posts for each blog
        for (Blog blog : client.user().getBlogs()) {
            System.out.println(blog.getTitle());

            Map<String, Integer> map = new HashMap<String, Integer>();
            map.put("limit", 2);
            for (Post post : blog.posts(map)) {
                System.out.println(post.toString());
            }
        }

        // @TODO play more with usage to ensure usability

        PhotoPost post = (PhotoPost) client.newPost("apeyes.tumblr.com", PhotoPost.class);
        post.setSource("http://www.petfinder.com/wp-content/uploads/2012/11/99059361-choose-cat-litter-632x475.jpg");
        post.save();

    }

}

@@ -143,50 +143,8 @@
 og;%0A
-import com.tumblr.jumblr.types.PhotoPost;%0A
 impo
@@ -303,56 +303,8 @@
 ion;
-%0Aimport java.util.HashMap;%0Aimport java.util.Map;
 %0A%0A/*
@@ -1326,65 +1326,35 @@
  // 
-And make some calls - 2 posts for each blog%0A  
+Get a blog by name%0A
       
-for (
+  
 Blog
@@ -1363,17 +1363,17 @@
 log 
-:
+=
  client.
 user
@@ -1372,200 +1372,77 @@
 ent.
-user().getBlogs()) %7B%0A            System.out.println(blog.getTitle());%0A%0A            Map%3CString, Integer%3E map = new HashMap%3CString, Integer%3E();%0A            map.put(%22limit%22, 2);%0A            for (
+blogInfo(%22seejohnrun%22);%0A%0A        // Get the most recent post%0A        
 Post
@@ -1447,17 +1447,17 @@
 st post 
-:
+=
  blog.po
@@ -1464,24 +1464,18 @@
 sts(
-map)) %7B%0A        
+).get(0);%0A
     
@@ -1506,104 +1506,50 @@
 ost.
-toString());%0A            %7D%0A        %7D%0A%0A        // @TODO play more with usage to ensure usability%0A
+getId());%0A%0A        // Then re-get it by id
 %0A   
@@ -1553,21 +1553,16 @@
         
-Photo
 Post pos
@@ -1566,213 +1566,86 @@
 post
- = (PhotoPost) client.newPost(%22apeyes.tumblr.com%22, PhotoPost.class);%0A        post.setSource(%22http://www.petfinder.com/wp-content/uploads/2012/11/99059361-choose-cat-litter-632x475.jpg%22);%0A        post.save(
+ById = blog.getPost(post.getId());%0A        System.out.println(postById.getId()
 );%0A%0A

Update example