WP::API
Makes it incredibly easy and semantic to access Wordpress blogs that have the WP REST API plugin installed (which is planned for full integration into wordpress core soon.)
Installation
gem 'wp-api'
bundle
Note
This gem requires Ruby 2.0, which is the oldest currently supported version of Ruby.
Usage
client = WP::API['yourwpsite.com']
# List all posts
client.posts
# List all users
client.users
# List alternate post types
client.posts(type: 'custom_posts')
# Append paramters
client.posts(posts_per_page: 1000)
# Use basic auth (used to access post meta)
client = WP::API::Client.new(host: 'yourwpsite.com', scheme: 'https', user: 'api', password: 'apipassword')
client.(1234) # => metadata for post #1234
Author
@colinyoung