This package contains a (mostly auto-generated) PHP client for the mittwald mStudio v2 API.
Copyright (c) 2023 Mittwald CM Service GmbH & Co. KG and contributors
This project is licensed under the MIT License; see the LICENSE file for details.
You can install this package using composer:
$ composer require mittwald/api-client
Import the client:
use Mittwald\ApiClient\MittwaldAPIV2Client;
To create a client instance you can use one of the following factory methods for different types of authentication:
MittwaldAPIClient::newUnauthenticated()
MittwaldAPIClient::newWithToken(string $apiToken)
(recommended)MittwaldAPIClient::newWithCredentials(string $email, string $password)
(does actually perform a login in the background; does not work when using 2FA)
Have a look at our API introduction for more information on how to obtain an API token and how to get started with the API.
use \Mittwald\ApiClient\Generated\V2\Clients\Project\ListProjects\ListProjectsRequest;
$listProjectRequest = new ListProjectsRequest();
$listProjectResponse = $client->project()->listProjects($listProjectRequest);
foreach ($listProjectResponse->getBody() as $project) {
echo $project->getShortId() . PHP_EOL;
}
The API documentation can be found in our Developer Portal. You can find the operation ID on the right side of each operation.