Class: Blogpost::Maruta
- Inherits:
-
Object
- Object
- Blogpost::Maruta
- Defined in:
- lib/blogpost/maruta.rb
Class Method Summary collapse
Class Method Details
.post(opts = {}) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/blogpost/maruta.rb', line 3 def self.post(opts={}) opts = Blogpost..merge(opts) host="http://maruta.be/xmlrpc.fcgi" id = XMLRPC::Client.new2(host).call("blogger.getUsersBlogs", "", opts[:user], opts[:pass])[0]["blogid"] XMLRPC::Client.new2(host).call("metaWeblog.newPost", id, opts[:user], opts[:pass], {"title" => opts[:title],"description" => opts[:content]}, true) end |