Project

wp-api

0.01
No commit activity in last 3 years
No release in over 3 years
Makes it incredibly easy and semantic to access Wordpress blogs that have the new, RESTful WP API plugin installed.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 1.3.0, ~> 1.3
~> 0
>= 2.0
>= 1.0.1
~> 1.2.1

Runtime

 Project Readme

WP::API

Circle CI

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.post_meta(1234) # => metadata for post #1234

Author

@colinyoung