tentakelfabrik / pirectus
0.1.3
2021-10-15 09:39 UTC
Requires
- guzzlehttp/guzzle: ^7.0
This package is auto-updated.
Last update: 2024-10-15 16:02:32 UTC
README
This Version is in a early Stage and only supports get, post, patch for Items. Authentification is only possible with token. It uses Guzzle, PHP HTTP client and is inspired by the Directus JavaScript SDK.
Installation
composer require tentakelfabrik/pirectus
Quickstart
require('vendor/autoload.php'); use Pirectus\Pirectus; use Pirectus\Auth\TokenAuth; $pirectus = new Pirectus('<directus-url>', [ 'auth' => new TokenAuth('<directus-authtoken>') ]);
$results = $pirectus ->items('pages') ->fields(['id', 'title', 'content']) ->filter([ 'status' => ['_eq' => 'published'] ]) ->find();