Browse Source

adding

master
HerrHase 3 years ago
parent
commit
3bab9db157
2 changed files with 27 additions and 12 deletions
  1. +20
    -5
      README.md
  2. +7
    -7
      src/Auth/TokenAuth.php

+ 20
- 5
README.md View File

@ -1,13 +1,11 @@
# Pirectus - a small Client for Directus 9 # 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 ## Installation
```php ```php
composer require tentakelfabrik/pirectus
``` ```
## Quickstart ## Quickstart
@ -31,4 +29,21 @@ $results = $pirectus
'status' => ['_eq' => 'published'] 'status' => ['_eq' => 'published']
]) ])
->find(); ->find();
```
```
## 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)

+ 7
- 7
src/Auth/TokenAuth.php View File

@ -3,26 +3,26 @@
namespace Pirectus\Auth; 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 * @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 class TokenAuth
{ {
/** */
/** token for auth */
private $token = NULL; private $token = NULL;
/** /**
* setting token * setting token
* *
* @param String $token
* @param string $token
* *
*/ */
public function __construct(String $token)
public function __construct(string $token)
{ {
$this->token = $token; $this->token = $token;
} }
@ -30,7 +30,7 @@ class TokenAuth
/** /**
* getting token * getting token
* *
* @return String
* @return string
* *
*/ */
public function getToken() public function getToken()


Loading…
Cancel
Save