Permalink
Browse files

updated blog_gp to pull things out of the response using symbols not …

…strings
  • Loading branch information...
1 parent a025fb7 commit a7921e663e18f35b7e8729a43b465e3377bd0af9 @bryanjswift committed Jan 28, 2009
Showing with 9 additions and 9 deletions.
  1. +9 −9 ruby/vimblog.rb
View
18 ruby/vimblog.rb
@@ -173,15 +173,15 @@ def blog_gp
VIM::evaluate("a:0").to_i > 0 ? ((id = VIM::evaluate("a:1")) ? id : id = nil) : id = nil
resp = blog_api("gp", id)
v = VIM::Buffer.current
- v.append(v.count-1, "Post : [#{resp['post_id']}]")
- v.append(v.count-1, "Title : #{resp['post_title']}")
- v.append(v.count-1, "Date : #{resp['post_date']}")
- v.append(v.count-1, "Link : #{resp['post_link']}")
- v.append(v.count-1, "Permalink: #{resp['post_permaLink']}")
- v.append(v.count-1, "Author : #{resp['post_author']}")
- v.append(v.count-1, "Comments : #{resp['post_allow_comments']}")
- v.append(v.count-1, "Pings : #{resp['post_allow_pings']}")
- v.append(v.count-1, "Categs : #{resp['post_categories']}")
+ v.append(v.count-1, "Post : [#{resp[:postid]}]")
+ v.append(v.count-1, "Title : #{resp[:title]}")
+ v.append(v.count-1, "Date : #{resp[:date]}")
+ v.append(v.count-1, "Link : #{resp[:link]}")
+ v.append(v.count-1, "Permalink: #{resp[:permalink]}")
+ v.append(v.count-1, "Author : #{resp[:author]}")
+ v.append(v.count-1, "Comments : #{resp[:comment_status]}")
+ v.append(v.count-1, "Pings : #{resp[:ping_status]}")
+ v.append(v.count-1, "Categs : #{resp[:categories]}")
v.append(v.count-1, " ")
v.append(v.count-1, " ")
resp['post_body'].each_line { |l| v.append(v.count-1, l.strip)}

0 comments on commit a7921e6

Please sign in to comment.