add field endpoint
Dieser Commit ist enthalten in:
Ursprung
da7e3bf38b
Commit
e7d6ef416f
10
src/Entities/FieldList.php
Normale Datei
10
src/Entities/FieldList.php
Normale Datei
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace D3\KlicktippPhpClient\Entities;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
|
||||||
|
class FieldList extends ArrayCollection
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -17,6 +17,7 @@ namespace D3\KlicktippPhpClient;
|
|||||||
|
|
||||||
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
||||||
use D3\KlicktippPhpClient\Resources\Account;
|
use D3\KlicktippPhpClient\Resources\Account;
|
||||||
|
use D3\KlicktippPhpClient\Resources\Field;
|
||||||
use D3\KlicktippPhpClient\Resources\Subscriber;
|
use D3\KlicktippPhpClient\Resources\Subscriber;
|
||||||
use D3\KlicktippPhpClient\Resources\SubscriptionProcess;
|
use D3\KlicktippPhpClient\Resources\SubscriptionProcess;
|
||||||
use D3\KlicktippPhpClient\Resources\Tag;
|
use D3\KlicktippPhpClient\Resources\Tag;
|
||||||
@ -68,6 +69,11 @@ class Klicktipp
|
|||||||
return new Account($this->getConnection());
|
return new Account($this->getConnection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function field(): Field
|
||||||
|
{
|
||||||
|
return new Field($this->getConnection());
|
||||||
|
}
|
||||||
|
|
||||||
public function subscriber(): Subscriber
|
public function subscriber(): Subscriber
|
||||||
{
|
{
|
||||||
return new Subscriber($this->getConnection());
|
return new Subscriber($this->getConnection());
|
||||||
|
23
src/Resources/Field.php
Normale Datei
23
src/Resources/Field.php
Normale Datei
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace D3\KlicktippPhpClient\Resources;
|
||||||
|
|
||||||
|
use D3\KlicktippPhpClient\Entities\FieldList;
|
||||||
|
use D3\KlicktippPhpClient\Exceptions\BaseException;
|
||||||
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
|
|
||||||
|
class Field extends Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @throws BaseException|GuzzleException
|
||||||
|
*/
|
||||||
|
public function index(): FieldList
|
||||||
|
{
|
||||||
|
$data = $this->connection->requestAndParse(
|
||||||
|
'GET',
|
||||||
|
'field'
|
||||||
|
);
|
||||||
|
|
||||||
|
return new FieldList($data);
|
||||||
|
}
|
||||||
|
}
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren