From 3bab9db15705a7a21084ad7e673ef0f43c45002f Mon Sep 17 00:00:00 2001 From: HerrHase Date: Sun, 10 Oct 2021 17:37:22 +0200 Subject: [PATCH] adding --- README.md | 25 ++++++++++++++++++++----- src/Auth/TokenAuth.php | 14 +++++++------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d395f8d..5e751b1 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # Pirectus - a small Client for Directus 9 -This Client Supports Directus 9, it is written in PHP and use Guzzle for handling requests. - -In this Version +This Version is in a early Stage and only supports get, post, patch for Items. Authentification is only possible with token. ## Installation ```php - +composer require tentakelfabrik/pirectus ``` ## Quickstart @@ -31,4 +29,21 @@ $results = $pirectus 'status' => ['_eq' => 'published'] ]) ->find(); -``` \ No newline at end of file +``` + +## ItemsQueryBuilder + +### fields(array $fields) +### addFields(array $fields) +### filter(array $filter) +### addFilter(array $filter) +### limit(int $value) +### offset(int $value) +### groupBy(array $groupBy) +### addGroupBy(string $field) +### aggregate(string $aggregate, string $field) +### sort(array $sort) +### addSort(array $sort) +### search(string $value) +### meta(string $value) +### aliases(string $field, string $alias) \ No newline at end of file diff --git a/src/Auth/TokenAuth.php b/src/Auth/TokenAuth.php index 3b94a88..dcb18fe 100644 --- a/src/Auth/TokenAuth.php +++ b/src/Auth/TokenAuth.php @@ -3,26 +3,26 @@ namespace Pirectus\Auth; /** + * Auth for Token in Directus * - * - * @author Björn Hase + * @author Björn Hase, Tentakelfabrik * @license http://opensource.org/licenses/MIT The MIT License - * @link https://gitea.tentakelfabrik.de/tentakelfabrik/pirectus Gitea Repository + * @link https://gitea.tentakelfabrik.de/tentakelfabrik/pirectus * */ class TokenAuth { - /** */ + /** token for auth */ private $token = NULL; /** * setting token * - * @param String $token + * @param string $token * */ - public function __construct(String $token) + public function __construct(string $token) { $this->token = $token; } @@ -30,7 +30,7 @@ class TokenAuth /** * getting token * - * @return String + * @return string * */ public function getToken()