csfcloud / sdk
SDK for calling CSF APIs
Installs: 1 175
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.1
- nategood/httpful: ^0.2
- ramsey/uuid: ^3.7
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2021-04-11 16:59:17 UTC
README
Contents
- Key manager
- Container management
- Container
Key manager
The key manager stores your server key, and OAuth keys.
use CSFCloud\KeyManager; $keymgr = new KeyManager([ "key" => "server-key", "client_id" => "OAuth-client-id", "client_secret" => "OAuth-client-secret" ]);
Container management
First you need to create a container manager:
use CSFCloud\Containers\Manager; $cntmgr = new Manager($keymgr);
You can use the container manager to list, create and open containers.
$container = $cntmgr->NewContainer();
$container = $cntmgr->GetContainer("container-id");
Container
Get and set the container name
$old_name = $container->GetContainerName(); $contaier->SetContainerName("New name");
Delete container:
$container->Delete();