You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HerrHase
e987aa84e1
|
3 years ago | |
---|---|---|
src | 3 years ago | |
.gitignore | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
composer.json | 3 years ago | |
composer.lock | 3 years ago |
README.md
Pirectus - a small Client for Directus 9
This Version is in a early Stage and only supports get, post, patch for Items. Authentification is only possible with token. It uses (https://docs.guzzlephp.org/en/stable/)[https://docs.guzzlephp.org/en/stable/] and is inspired by the (https://docs.directus.io/reference/sdk/)[https://docs.directus.io/reference/sdk/]
Pirectus is used in (https://github.com/tentakelfabrik/super-gear-directus)[https://github.com/tentakelfabrik/super-gear-directus], a small CMS.
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();