Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't request droplets #82

Closed
kwartel opened this issue Feb 20, 2015 · 10 comments
Closed

Can't request droplets #82

kwartel opened this issue Feb 20, 2015 · 10 comments
Labels

Comments

@kwartel
Copy link

kwartel commented Feb 20, 2015

When I request a droplet (getAll or getByID), I get the the following error:
knipsel
This is my code:

<?php

require 'vendor/autoload.php';

use DigitalOceanV2\Adapter\BuzzAdapter;
use DigitalOceanV2\DigitalOceanV2;

$adapter = new BuzzAdapter($token);

$digitalocean = new DigitalOceanV2($adapter);

$droplet = $digitalocean->droplet();

$droplet = $droplet->getAll();

Other requests work.

@taylorotwell
Copy link

Same. Library totally broken.

@Forge-Media
Copy link

try this:

require 'vendor/autoload.php';

use DigitalOceanV2\Adapter\GuzzleAdapter;
use DigitalOceanV2\DigitalOceanV2;

// create an adapter with your access token which can be
// generated at https://cloud.digitalocean.com/settings/applications
$adapter = new GuzzleAdapter('');

// create a digital ocean object with the previous adapter
$digitalocean = new DigitalOceanV2($adapter);

//return the droplet api
$droplet = $digitalocean->droplet();

At the moment mine is working, I never managed to get the BuzzAdapter to work.

@toin0u
Copy link
Contributor

toin0u commented Feb 22, 2015

@kwartel @taylorotwell which version do you use ? 0.5 should fix it.. https://github.com/toin0u/DigitalOceanV2#entities
@Forge-Media thanks for your snippet.

@ameliaikeda
Copy link

@toin0u PR is on its way, just spent a little bit figuring out how this actually happens.

@toin0u
Copy link
Contributor

toin0u commented Feb 22, 2015

@ameliaikeda Thanks but when I'm using the 0.5 version, I cannot reproduce it.. Anyway, I'll looking forward to your PR :)

@taylorotwell
Copy link

I'm using the 0.5 version and creating Droplets with Buzz adapter is
broken. I switched to just not even using the SDK and just using plain
Guzzle.

On Sun, Feb 22, 2015 at 4:45 PM, Antoine Corcy notifications@github.com
wrote:

@ameliaikeda https://github.com/ameliaikeda Thanks but when I'm using
the 0.5 version, I cannot reproduce it.. Anyway, I'll looking forward to
your PR :)


Reply to this email directly or view it on GitHub
#82 (comment)
.

@toin0u
Copy link
Contributor

toin0u commented Feb 22, 2015

@taylorotwell thanks for your feedbacks. I'll look at the Buzz adapter asap.

@toin0u toin0u added bug and removed duplicate labels Feb 22, 2015
@toin0u toin0u closed this as completed in 797cacf Feb 22, 2015
toin0u added a commit that referenced this issue Feb 22, 2015
Backup windows on droplets can be null, so check for that. Fixes #82
@taylorotwell
Copy link

Nice. The create method on the SDK is the only method I ever have issues with so I just use Guzzle for that and the SDK for everything else 😄

@toin0u
Copy link
Contributor

toin0u commented Feb 22, 2015

@taylorotwell Thanks for this precision - I update the issue and look at this closer asap.

@kwartel
Copy link
Author

kwartel commented Feb 23, 2015

I replaced the buzz adapter and it works. :) I tried Guzzle5 before and that didn't work out so well, but this is great! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants