def publish(item)
      process_images(item) unless item.images.nil?
      case item
      when Wordpress::Post
        item.id = blog_api_call("metaWeblog.newPost", item.to_struct(:metaWeblog), true).to_i
      when Wordpress::Page
        item.id = blog_api_call("wp.newPage", item.to_struct(:wp), true).to_i
      else
        raise "Unknown item type: #{item}"
      end
      item.published = true
      return item
    end
def publish(item)
      process_images(item) unless item.images.nil?
      case item
      when Wordpress::Post
        item.id = blog_api_call("metaWeblog.newPost", item.to_struct(:metaWeblog), true).to_i
      when Wordpress::Page
        item.id = blog_api_call("wp.newPage", item.to_struct(:wp), true).to_i
      else
        raise "Unknown item type: #{item}"
      end
      item.published = true
      return item
    end
recent_posts