Adds possibility to define multiple locations (namespaces) where WpClient can look after endpoints.
This feature is useful where custom, domain-specific endpoints are used.
How to use:
Your new endpoint (notice the namespace):
namespace Your\Special\Endpoint;
use Vnn\WpApiClient\Endpoint\AbstractWpEndpoint;
class Examples extends AbstractWpEndpoint
{
...
}
And where it is added to WpClient:
$client = new WpClient(...);
$client->addEndpointNamespace('Your\Special\Endpoint\\');
$client->examples()->get(1);
Adds possibility to define multiple locations (namespaces) where
WpClient
can look after endpoints. This feature is useful where custom, domain-specific endpoints are used.How to use:
Your new endpoint (notice the namespace):
And where it is added to WpClient: