Comments (25)
Maybe the api has changed... i will look into it
from client.
Thank you!
from client.
What version are you using ?
from client.
Hello,
I'm using the latest version but the error persists. Thanks for getting back to me.
from client.
Can you try version 0.2 ?
from client.
Hello - I tried that and it still doesn't work - same error actually.
from client.
Hi there - same issue with the latest as well.
from client.
Can you please share the code you are using?
from client.
Same for me: Property "DigitalOceanV2\Entity\Droplet::size" does not exist.
from client.
@nobitakun It is fixed on the master branch... i will release it soon
from client.
Thanks for the fix! I assume you don't need the sample code anymore but it was failing with the sample snippet on the project page.
from client.
@eddier Which sample?
from client.
Getting a droplet by ID - I assume it is a changed json key that causes the problem? Example usage would be:
$adapter = new BuzzAdapter("token");
$digitalOcean = new DigitalOceanV2($adapter);
$droplet = $digitalOcean->droplet();
$droplet2 = $droplet->getById("dropletId");
from client.
@eddier Yes! the api is still in beta so they often change things and it breaks this library
from client.
Understandable - thanks for the quick turn around on the fix!
from client.
@eddier no problem
from client.
Hi,
My original error (first post here) is still occurring
from client.
@joneslloyd can you please tell me what version of the library you are using, what adapter and maybe a snippet?
from client.
Hello, I am using the latest version (the version available when you click "Download zip" on the right here: https://github.com/toin0u/DigitalOceanV2).
My adaptor is BuzzAdaptor, and the code causing the error is:
$DOToken = $addon_settings["digitalocean_token"];
if(empty($DOToken)){
return false;
}
try {
$adapter = new BuzzAdapter($DOToken);
$do = new DigitalOceanV2($adapter);
$image = $do->image();
$images = $image->getAll();
return true;
} catch (Exception $e) {
$GFDO = new GFDigitalOcean;
$GFDO->log_debug( "Get all images error: " . print_r( $e, true ) );
return false;
}
from client.
I am also using the https://github.com/toin0u/DigitalOceanV2 library, I am using the BuzzAdaptor, and getting the error while queering all droplets, images and create droplet.
Create Droplet error is: Property "DigitalOceanV2\Entity\Droplet::sizeSlug" should exist.
Create Droplet call: $droplet->create($hostname, $selected_region, $selected_size, $distribution, $backups, $ipv6, $privateNetworking, $sshKeys);
Get All droplets error is: Property "DigitalOceanV2\Entity\Image::minSize" should exist.
Get All Droplet call: $droplet->getAll();
Get All images error is: Operation timed out after 5007 milliseconds with 0 bytes received
Get All images call: $images->getAll();
@yassirh can you help me to figure it out?
Thanks in advance.
from client.
@matif you can quickly fix sizeSlug error by adding $sizeSlug property to Droplet Class. The same fix for every other property Digital Ocean keep adding to their API. Can someone explain me, what is the point in dynamically mapping all the properties from api to each Entity using AbstractEntity->build() method and checking that those properties should exist in __set() method of the same class? Especially if you know that those properties will for sure change with API growth. Wouldn't be better just simple let end developer decide what properties he want be simply parsing JSON response?
from client.
@stsibel I've tried what you've suggested for my error, but it's not doing anything. I get a BuzzAdaptor timeout error.
from client.
@joneslloyd I would need to see your code to tell you what's wrong
from client.
Hi @stsibel - my code is just as I posted above that's causing the error:
$DOToken = $addon_settings["digitalocean_token"];
if(empty($DOToken)){
return false;
}
try {
$adapter = new BuzzAdapter($DOToken);
$do = new DigitalOceanV2($adapter);
$image = $do->image();
$images = $image->getAll();
return true;
} catch (Exception $e) {
$GFDO = new GFDigitalOcean;
$GFDO->log_debug( "Get all images error: " . print_r( $e, true ) );
return false;
}
from client.
Fixed in version 0.3
from client.
Related Issues (20)
- Add support for monitoring API HOT 4
- `Entity\Droplet::tags` incorrectly type-hinted as `Tag[]` HOT 2
- Api\Image::getById() accepts only int, should accept int|string HOT 2
- Ubuntu 20.04 composer install fail HOT 1
- Meta.php Entity class, what is it for? HOT 1
- PHP 7.4 requirement HOT 5
- Add support for Project Resources API HOT 2
- dropletClient->getAll return empty array HOT 2
- Project Resources API HOT 1
- "Floating IPs" have been renamed to "Reserved IPs" HOT 3
- Sizes API defaults to 20 per page and getAll doesn't page HOT 2
- Calling update() may result in data loss HOT 2
- Droplet entity missing VPC UUID property HOT 1
- Kubernetes support? HOT 2
- Uptime Checks HOT 2
- package laravel not found HOT 1
- Fetch IP address of Droplet HOT 1
- Does this library capture the HTTP response code and make that available? HOT 2
- Please remove "final" keyword from ExceptionThrower to allow extending this class. HOT 2
- No confirmation that droplet was successfully removed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client.