Skip to content

Commit 2dee2bc

Browse files
authored
Adding some helpful information
1 parent 30733c4 commit 2dee2bc

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
# wordpress-rest-api-client
2-
A Wordpress API client for PHP
2+
3+
> A Wordpress REST API client for PHP
4+
5+
For when you need to make [Wordpress REST API calls](http://v2.wp-api.org/) from
6+
some other PHP project, for some reason.
7+
8+
## Installation
9+
10+
```text
11+
composer require vnn/wordpress-rest-api-client
12+
```
13+
14+
## Usage
15+
16+
Example:
17+
18+
```php
19+
$client = new WpClient($url);
20+
$client->setCredentials(new WpBasicCredentials('username', 'password'));
21+
22+
$user = $client->users()->get(15);
23+
24+
echo $user['username'];
25+
```

0 commit comments

Comments
 (0)