A Wordpress REST API client for PHP
For when you need to make Wordpress REST API calls from some other PHP project, for some reason.
composer require vnn/wordpress-rest-api-client
Example:
use Vnn\WpApiClient\Auth\WpBasicAuth;
use Vnn\WpApiClient\Http\GuzzleAdapter;
use Vnn\WpApiClient\WpClient;
require 'vendor/autoload.php';
$client = new WpClient(new GuzzleAdapter(new GuzzleHttp\Client()), 'http://yourwordpress.com');
$client->setCredentials(new WpBasicAuth('user', 'securepassword'));
$user = $client->users()->get(2);
print_r($user);