varsitynewsnetwork / wordpress-rest-api-client

A Wordpress API client for PHP
76 stars 64 forks source link

[Feature] Introducing Subendpoints #19

Open zoliszabo opened 5 years ago

zoliszabo commented 5 years ago

Some WordPress API endpoints (e.g. post revisions) must use a <parent> identifier, i.e. they always belong to another parent entity. The new AbstractWpSubEndpoint makes this simple by offering the possibility to set the parent entity.

Also contains a new endpoint class, PostRevisions.

Example:

$client->postRevisions()->setParent(45)->get();
austinsmorris commented 5 years ago

@boboudreau, can this be a graphql schema change?