-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f275b75
commit 1db9668
Showing
2,253 changed files
with
154,952 additions
and
141,280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mittwald\ApiClient\Client; | ||
|
||
use Psr\Http\Message\ResponseInterface; | ||
|
||
interface ResponseContainer | ||
{ | ||
public function getResponse(): ?ResponseInterface; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mittwald\ApiClient\Error; | ||
|
||
use Exception; | ||
use InvalidArgumentException; | ||
use Mittwald\ApiClient\Client\ResponseContainer; | ||
use Psr\Http\Message\ResponseInterface; | ||
use Throwable; | ||
|
||
class UnexpectedResponseException extends Exception | ||
{ | ||
public readonly ResponseInterface $response; | ||
|
||
public function __construct(ResponseContainer $response, Throwable $previous = null) | ||
{ | ||
$response = $response->getResponse(); | ||
if ($response === null) { | ||
throw new InvalidArgumentException('ResponseContainer must contain a response'); | ||
} | ||
|
||
$this->response = $response; | ||
parent::__construct( | ||
sprintf( | ||
'Unexpected response status code %d %s', | ||
$this->response->getStatusCode(), | ||
$this->response->getReasonPhrase(), | ||
), | ||
previous: $previous, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<?php | ||
|
||
namespace Mittwald\ApiClient\Generated\V2; | ||
|
||
use Mittwald\ApiClient\Client\BaseClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\App\AppClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\App\AppClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Article\ArticleClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Article\ArticleClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Backup\BackupClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Backup\BackupClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Container\ContainerClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Container\ContainerClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Contract\ContractClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Contract\ContractClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Conversation\ConversationClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Conversation\ConversationClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Cronjob\CronjobClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Cronjob\CronjobClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Customer\CustomerClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Customer\CustomerClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Database\DatabaseClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Database\DatabaseClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Domain\DomainClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Domain\DomainClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\File\FileClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\File\FileClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Mail\MailClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Mail\MailClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Notification\NotificationClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Notification\NotificationClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\PageInsights\PageInsightsClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\PageInsights\PageInsightsClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Project\ProjectClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Project\ProjectClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\ProjectFileSystem\ProjectFileSystemClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\ProjectFileSystem\ProjectFileSystemClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Relocation\RelocationClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\Relocation\RelocationClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\SSHSFTPUser\SSHSFTPUserClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\SSHSFTPUser\SSHSFTPUserClientImpl; | ||
use Mittwald\ApiClient\Generated\V2\Clients\User\UserClient; | ||
use Mittwald\ApiClient\Generated\V2\Clients\User\UserClientImpl; | ||
|
||
/** | ||
* Auto-generated factory for mittwald mStudio v2 clients. | ||
* | ||
* DO NOT EDIT; this class was generated by the mittwald/api-client-builder package | ||
* (https://github.com/mittwald/api-client-php-builder). Please make any changes | ||
* there. | ||
*/ | ||
class ClientImpl extends BaseClient implements Client | ||
{ | ||
public function project(): ProjectClient | ||
{ | ||
return new ProjectClientImpl($this->client); | ||
} | ||
|
||
public function backup(): BackupClient | ||
{ | ||
return new BackupClientImpl($this->client); | ||
} | ||
|
||
public function sshSFTPUser(): SSHSFTPUserClient | ||
{ | ||
return new SSHSFTPUserClientImpl($this->client); | ||
} | ||
|
||
public function cronjob(): CronjobClient | ||
{ | ||
return new CronjobClientImpl($this->client); | ||
} | ||
|
||
public function app(): AppClient | ||
{ | ||
return new AppClientImpl($this->client); | ||
} | ||
|
||
public function projectFileSystem(): ProjectFileSystemClient | ||
{ | ||
return new ProjectFileSystemClientImpl($this->client); | ||
} | ||
|
||
public function contract(): ContractClient | ||
{ | ||
return new ContractClientImpl($this->client); | ||
} | ||
|
||
public function database(): DatabaseClient | ||
{ | ||
return new DatabaseClientImpl($this->client); | ||
} | ||
|
||
public function domain(): DomainClient | ||
{ | ||
return new DomainClientImpl($this->client); | ||
} | ||
|
||
public function conversation(): ConversationClient | ||
{ | ||
return new ConversationClientImpl($this->client); | ||
} | ||
|
||
public function customer(): CustomerClient | ||
{ | ||
return new CustomerClientImpl($this->client); | ||
} | ||
|
||
public function user(): UserClient | ||
{ | ||
return new UserClientImpl($this->client); | ||
} | ||
|
||
public function notification(): NotificationClient | ||
{ | ||
return new NotificationClientImpl($this->client); | ||
} | ||
|
||
public function file(): FileClient | ||
{ | ||
return new FileClientImpl($this->client); | ||
} | ||
|
||
public function mail(): MailClient | ||
{ | ||
return new MailClientImpl($this->client); | ||
} | ||
|
||
public function article(): ArticleClient | ||
{ | ||
return new ArticleClientImpl($this->client); | ||
} | ||
|
||
public function container(): ContainerClient | ||
{ | ||
return new ContainerClientImpl($this->client); | ||
} | ||
|
||
public function pageInsights(): PageInsightsClient | ||
{ | ||
return new PageInsightsClientImpl($this->client); | ||
} | ||
|
||
public function relocation(): RelocationClient | ||
{ | ||
return new RelocationClientImpl($this->client); | ||
} | ||
} |
Oops, something went wrong.