You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are decoupled from any HTTP messaging client by using [PSR-7](https://www.php-fig.org/psr/psr-7/), [PSR-17](https://www.php-fig.org/psr/psr-17/), [PSR-18](https://www.php-fig.org/psr/psr-18/), and [HTTPlug](https://httplug.io/). You can visit [HTTPlug for library users](https://docs.php-http.org/en/latest/httplug/users.html) to get more information about installing HTTPlug related packages. The framework integration [graham-campbell/gitlab](https://github.com/GrahamCampbell/Laravel-GitLab) is by [Graham Campbell](https://github.com/GrahamCampbell) and [dunglas/digital-ocean-bundle](https://github.com/dunglas/DunglasDigitalOceanBundle) is by [Kévin Dunglas](https://github.com/dunglas).
36
+
We are decoupled from any HTTP messaging client by using [PSR-7](https://www.php-fig.org/psr/psr-7/), [PSR-17](https://www.php-fig.org/psr/psr-17/), [PSR-18](https://www.php-fig.org/psr/psr-18/), and [HTTPlug](https://httplug.io/). You can visit [HTTPlug for library users](https://docs.php-http.org/en/latest/httplug/users.html) to get more information about installing HTTPlug related packages. The framework integration [graham-campbell/digitalocean](https://github.com/GrahamCampbell/Laravel-DigitalOcean) is by [Graham Campbell](https://github.com/GrahamCampbell) and [dunglas/digital-ocean-bundle](https://github.com/dunglas/DunglasDigitalOceanBundle) is by [Kévin Dunglas](https://github.com/dunglas).
37
37
38
38
## Upgrading
39
39
40
-
If you are upgrading from version 2.3 to 3.0, or from 3.2 to 4.0, you can check out our [upgrading guide](UPGRADING.md). We highly recommend upgrading as soon as possible.
40
+
If you are upgrading from version 2.3 to 3.0, or from 3.3 to 4.0, you can check out our [upgrading guide](UPGRADING.md). We highly recommend upgrading as soon as possible.
41
41
42
42
## Examples
43
43
44
-
As of version 3.0, we will will automatically discover an HTTP client to use, from what you have available. Simply create a new DigitalOcean client, provide your access token, then you're good to go:
44
+
As of version 3.0, we will automatically discover an HTTP client to use, from what you have available. Simply create a new DigitalOcean client, provide your access token, then you're good to go:
45
45
46
46
```php
47
47
<?php
@@ -103,7 +103,7 @@ $app = $client->app();
103
103
$apps = $app->getAll();
104
104
105
105
// return the App entity 123
106
-
$app123 = $app->getById(123);
106
+
$app123 = $app->getById('123');
107
107
108
108
// create a new App
109
109
$spec = [
@@ -128,31 +128,31 @@ $spec = [
128
128
],
129
129
"region" => "ams"
130
130
];
131
-
$app = $app->create($spec);
131
+
$createdApp = $app->create($spec);
132
132
133
133
// update an App with App entity 123
134
-
$app = $app->update(123, $spec);
134
+
$updatedApp = $app->update('123', $spec);
135
135
136
136
// delete an App with App entity 123
137
-
$app->remove(123);
137
+
$app->remove('123');
138
138
139
139
// retrieve App deployments with App entity 123
140
-
$deployments = $app->getAppDeployments(123);
140
+
$deployments = $app->getAppDeployments('123');
141
141
142
142
// return an App deployment with App entity 123, deployment ID of 456
// return the DomainRecord entity 123 of the domain 'baz.dk' updated with new-name, new-data, priority 1, port 2, weight 3, flags 0, tag issue (name, data, priority, port, weight, flagsand tag are nullable)
359
+
// return the DomainRecord entity 123 of the domain 'baz.dk' updated with new-name, new-data, priority 1, port 2, weight 3, flags 0, tag issue (name, data, priority, port, weight, flags, tag, and ttl are nullable)
0 commit comments