__construct()
__construct(string $api_key = '')
Construct
Parameters
string | $api_key | The API key to use, if one is needed |
add_droplet(string $client_id,string $cluster_id,string $server_type,array $request): string
add a new droplet
string | $client_id | The 'id' column from the 'digitalocean_api_keys' table of which client the droplet is being added to. |
string | $cluster_id | The ID# of the cluster to add droplet to. |
string | $server_type | The type of server being added from the digitalocean:server_types hash. |
array | $request | The request to send to DigitalOcean API |
The IP address of the new droplet
add_droplet_to_database(string $client_id,string $cluster_id,string $server_type,array $vars)
Add droplet to database
string | $client_id | The ID# of the client. |
string | $cluster_id | The ID# of the cluster to add droplet to. |
string | $server_type | The server type of the droplet. |
array | $vars | Details on the droplet. |
send_request( $uri, $method = 'GET', $request = array()): string
Send request
$uri | string The URI of the DigitalOcean API to send the request to. |
|
$method | string The HTTP method to send the request in (GET, POST, DELETE, HEAD, etc.). |
|
$request | array Optional array of data to send to DO |
The response from the DO API.