Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

metaweblog

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metaweblog

  • 0.4.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 30 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc