Project

metaweblog

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby client for metaWeblog API. This gem makes it easier for developers to talk with your Blog supporting metaWeblog API. This gem only depends on REXML provided as one of Ruby's standard lib.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.16.1
~> 12.3.0
~> 3.7.0
 Project Readme

metaweblog - Ruby client for metaWeblog API

Gem Version Build Status Coverage Status

This gem makes it easier for you to talk with your blog apps via metaWeblog API.

Installation

Add this line to your Gemfile:

gem 'metaweblog'

And then execute:

$ bundle

Or install it yourself as:

$ gem install metaweblog

Usage

Setup a client

  client = MetaWeblog::Client.new('http://yourblog.example.com/xmlrpc.rb', # XML-RPC endpoint
                                  'your_blog_id', # Blog ID
                                  'username', # username
                                  'password', # password
                                  'proxy.example.com') # (Optional) proxy

Post new entry

  require 'metaweblog'

  post = MetaWeblog::Post.new('Title', 'Body')
  client.post(post)

MetaWeblog::Client#post returns post_id of new entry if the entry is posted successfully.

Get an existing entry

Just calling get method with post_id:

  post = client.get(post_id)

Edit an existing entry

  modified_entry = MetaWeblog::Post.new('Fixed Title', 'Fixed Contents')
  client.edit(post_id, modified_entry)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request