title: Pulling posts from tumblr with ruby
body: <p>I am trying to figure out how to pull posts from a specific Tumblr account with ruby. My end goal would be to have a hash with the post number => text. I am only looking for the text and each post number.</p>
  
  <p>I tried the following (for demo.tumblr.com):</p>
  
  <pre><code>require 'open-uri'
  require 'json'
  
  jtest = JSON.load(open("http://api.tumblr.com/v2/blog/demo.tumblr.com/posts/text?api_key=fuiKNFp9vQFvjLNvx4sUwti4Yb5yGutBN4Xh10LXZhhRKjWlV4&amp;notes_info=true&amp;filter=text"))
  puts jtest
  </code></pre>
  
  <p>which gives me, I'm only going to put a snippet of it:</p>
  
  <pre><code>{"meta"=&gt;{"status"=&gt;200, "msg"=&gt;"OK"}, "response"=&gt;{"blog"=&gt;{"title"=&gt;"Demo", "name"=&gt;"demo", "posts"=&gt;7, "url"=&gt;"http://demo.tumblr.com/", "updated"=&gt;1269024321, "description"=&gt;"Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.", "is_nsfw"=&gt;false, "ask"=&gt;false, "ask_page_title"=&gt;"Ask me anything", "ask_anon"=&gt;false, "share_likes"=&gt;false}, "posts"=&gt;[{"blog_name"=&gt;"demo", "id"=&gt;459009076, "post_url"=&gt;"http://demo.tumblr.com/post/459009076/lorem-ipsum-dolor-sit-amet-consectetuer", "slug"=&gt;"lorem-ipsum-dolor-sit-amet-consectetuer", "type"=&gt;"text", "date"=&gt;"2006-10-01 04:00:00 GMT", "timestamp"=&gt;1159675200, "state"=&gt;"published", "format"=&gt;"html", "reblog_key"=&gt;"uHt0TEhP", "tags"=&gt;[], "short_url"=&gt;"http://tmblr.co/Zg4ybyRM_mq", "highlighted"=&gt;[], "note_count"=&gt;5793, "title"=&gt;"", "body"=&gt;"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam nisi lorem, pulvinar id, commodo feugiat, vehicula et, mauris. Aliquam mattis porta urna. Maecenas dui neque, rhoncus sed, vehicula vitae, auctor at, nisi. Aenean id massa ut lacus molestie porta. Curabitur sit amet quam id libero suscipit venenatis.", "notes"=&gt;[{"timestamp"=&gt;"1429905090", "blog_name"=&gt;"hdpreview2", "blog_url"=&gt;"http://hdpreview2.tumblr.com/", "post_id"=&gt;"117273527904", "type"=&gt;"reblog"}
  </code></pre>
  
  <p>it goes on for a while but I am just not sure how to drill down into that. It seems jtest is actually a hash but with only two items, the first is </p>
  
  <pre><code>{meta =&gt; {"status"=&gt;200, "msg"=&gt;"OK"}}
  </code></pre>
  
  <p>and the second is:</p>
  
  <pre><code>{response =&gt; the rest of that....
  </code></pre>
  
  <p>I am probably in over my head but I cannot wrap my head around how to just get text posts out of a tumblr blog via ruby.</p>