sam-it / php-rancher
dev-master
2017-05-07 15:32 UTC
Requires
- guzzlehttp/guzzle: ^6.2
- myclabs/php-enum: ^1.5
- nette/php-generator: ^2.5
This package is auto-updated.
Last update: 2024-12-08 07:49:44 UTC
README
This library is a work in progress, it is not in use in any production system.
The idea behind this API client is that it defines a minimal skeleton code which then generates the remaining code from the Rancher API itself. For now i've included all the generated class in the repository to make inspection / reasoning about the generated code easier.
Retrieval & update
Object retrieval works, both directly from the client and from entities. For example:
$project = $client->getAccounts()[0]->getProjects()[0];
$project->name .= 'x';
if ($project->save()) {
echo "Project name is now:" . $project->name;
} else {
echo "Failed to update project.";
print_r($project->errors);
}