Closed Cannonb4ll closed 5 years ago
My code:
$upCloud = new \Upcloud\ApiClient\Upcloud\ZoneApi();
$config = $upCloud->getConfig();
$config->setUsername('***');
$config->setPassword('***');
dd($upCloud->listZones());
For now hardcoded in our console command job, but really want to make this dynamic through api:
$plans = [
[
'name' => 'Frankfurt #1',
'id' => 'de-fra1'
],
[
'name' => 'Helsinki #1',
'id' => 'fi-hel1'
],
[
'name' => 'Amsterdam #1',
'id' => 'nl-ams1'
],
[
'name' => 'Singapore #1',
'id' => 'sg-sin1'
],
[
'name' => 'London #1',
'id' => 'uk-lon1'
],
[
'name' => 'Chicago #1',
'id' => 'us-chi1'
],
];
Oh, sorry about that! Glad that you found a workaround 👍 Yeah the "name" field should be "id" in the result, seems like it was mis-named in the Zone model. We'll have a look at that!
I am using this package for reference.
Currently trying to get the Zones through this package, which works but I am not getting the 'id' column, I am getting an empty/null 'name' column. (See image below)
Your documentation @ https://www.upcloud.com/api/5-zones/#zones states that it should return an ID and description.
What is going wrong?