Giter Club home page Giter Club logo

client's People

Contributors

alrik11es avatar babarinde avatar bambamboole avatar borales avatar browner12 avatar cherny-sh avatar dunglas avatar fideloper avatar grahamcampbell avatar hexogen avatar i0 avatar jeremykendall avatar lewissmallwood avatar liverbool avatar malc0mn avatar marcvdm avatar mbardelmeijer avatar nicolasbeauvais avatar owenconti avatar roydejong avatar saverio avatar sdwru avatar shihjay2 avatar spicybeefnoodle avatar teevio avatar toin0u avatar tspencer244 avatar webignition avatar yassirh avatar zspine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

client's Issues

Getting droplet IP the right way?

Hi

I'm having a little bit of an issue, depending on how a Droplet is made (Private networking on or off) the returned Network Array will be slightly different.

I currently get the Droplet's Public IP as such:

$ip = $userAtom->networks[0]->ipAddress (For a Droplet with Private networking turned off)
&
$ip = $userAtom->networks[1]->ipAddress (For a Droplet with Private networking turned on) 

This is causing me a headache, is there no way to get the Droplet's Public IP regardless of the Private networking status, with a single statement?

Just seems a little annoying that $userAtom->ipAddress does not work.

For instance:
using $userAtom->networks[1]. (with Private network off results in no IP being found).

Adding guzzle 5

in composer it says guzzle 5 but the adapter is not a guzzle 5 adaptor

Please correct readme

Example

account(); // return the Account entity $userInformation = $account->getUserInformation(); # $digitalOcean and $digitalocean , Register at different letters O , very is not convenient when trying to run the first time

domain record update data (not only name)

would it be possible to update the data for a domain record,
i cant see it is in the code currently

$updated = $domainRecord->update('baz.dk', 123, 'new-name');

could this become

$updated = $domainRecord->updateData('baz.dk', 123, 'new-data');

Droplet->getActions() not paginated

Whereas the getAll() function is paginated:

$droplets = $this->adapter->get(sprintf('%s/droplets?per_page=%d', self::ENDPOINT, PHP_INT_MAX));

The getActions() function is not. I made it paginated for my local copy and it works, but just letting you know :)

delete this

Please remove this issue, i wanted to create it with guzzle instead.

Class Browser does not exist

Fatal error: Class 'Buzz\Browser' not found in /home/isensela/public_html/app/Vendor/DigitalOceanV2/Adapter/BuzzAdapter.php on line 43

Cannot use image "slugs" when creating servers

I've been trying this for several days off and on and can't get this to work. Passing ubuntu-14-04-x64 in the "image id" field will not work. I get invalid image errors. Using the BuzzAdapter.

AbstractEntity - Invalid argument supplied for foreach

I'm using 0.5.* dev version, because of the nextWindow error that's fixed in that version. Still I'm having problems running the droplet service

composer.json:

    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.6.*",
        "toin0u/digitalocean-v2": "0.5.*@dev",
        "kriswallsmith/buzz": "~0.10",
        "guzzle/guzzle": "~3.7",
        "guzzlehttp/guzzle" : "~5.0"
    },

The terrors:

CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: 
"Warning: Invalid argument supplied for foreach()" at 
/var/www/chuck/symfony/vendor/toin0u/digitalocean-v2/src/Entity/AbstractEntity.php line 67 
'2', 'Invalid argument supplied for foreach()', 
'/var/www/chuck/symfony/vendor/toin0u/digitalocean-v2/src/Entity/AbstractEntity.php', '67', 
array('parameters' => null))
in vendor/toin0u/digitalocean-v2/src/Entity/AbstractEntity.php at line 67

services.yml

parameters:
    #digital ocean
    do.class.factory:           DigitalOceanV2\DigitalOceanV2
    do.class.adapter:           DigitalOceanV2\Adapter\GuzzleAdapter

services:
    # digital ocean
    do.adapter:
        class: %do.class.adapter%
        public: false
        arguments: ["%digital_ocean_api%"]
    do.factory:
        class: %do.class.factory%
        arguments: [@do.adapter]

and for the sake of simplicity;

<?php namespace Chuck\NorrisBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DropletController extends Controller
{
    public function indexAction()
    {
        $droplet = $this->container->get( 'do.factory' )->droplet();
        $droplets = $droplet->getAll();

        return $this->render( 'NorrisBundle:Widget:index.html.twig', [
            'droplets' => $droplets
        ] );
    }

}

Does anybody know how to go from here, without having to hack around in this broken library?

codeigniter

Hi

How can i load this API in Codeigniter project

Thanks

Pagination

I see you're using PHP_INT_MAX for digital ocean's "per page" value in pagination. I don't think they will support a number that large, and even if they did, we'd likely run out of memory on our server trying to deal with a dataset that large all at once.

Feature request: all user images

In the api, there is an option to call: /v2/images?type=application
This only requests the user images. This takes a lot less time then requesting all the images and filtering them.

[BUG] Notice error on create new Droplet.

This's an error message:

"Notice: Undefined property: stdClass::$v4 in
/vendor/toin0u/digitalocean-v2/src/Entity/Droplet.php line 92"

Note: new droplet create will response

{
.....
networks: null,
.....
}

"toin0u/digitalocean-v2": "master-dev" (0.1.0)

user-data API

Attempted to pass user-data to no effect. sfo1 allows userdata, and all my other strings/booleans/integers pass

$userData ='test';
$droplet->create("test.com", "sfo1", "512mb", "ubuntu-14-04-x64", false, false, false, array(), $userData);

seeking a proper example to userdata API

droplet->getById

Hi

$droplet123 = $droplet->getById(4124085);

{"status":false,"message":"Property "DigitalOceanV2\Entity\Droplet::nextBackupWindow" should exist.","data":""}

I use
"toin0u/digitalocean-v2": "0.5.@dev"
"kriswallsmith/buzz": "0.13.
",

Why not a http adapter library?

I am just asking: why not using a HTTP adapter library? @toin0u IIRC you pointed me to ivory http adapter, I was surprised when I saw it isn't used in the library.

So Broken.

Why does this library still break every time DigitalOcean adds a new property to their API? Is this library supposed to be used in production applications?

Property "DigitalOceanV2\Entity\Droplet::nextBackupWindow" should exist.

Property "DigitalOceanV2\Entity\Droplet::sizeSlug" should exist.

When trying to create a new droplet an InvalidArgumentException is thrown:

Property "DigitalOceanV2\Entity\Droplet::sizeSlug" should exist.

Code:

$droplet = $this->do->droplet()->create('droplet', 'lon1', '512mb', $image);

If I update line 151 of src/Entity/Droplet.php from 'slug' to 'size_slug' this solves the issue.

getById issue

Calling $droplets->getById(3110542) return InvalidArgumentException:

Property "DigitalOceanV2\Entity\Image::minDiskSize" should exist.

Here is an example:
$adapter = new BuzzAdapter(Yii::app()->params['DOAccessV2']);
$digitalOcean = new DigitalOceanV2($adapter);
$droplets = $digitalOcean->droplet(); // alias to Droplets class.
var_dump($droplets->getById(458652));

SSL

Has anyone had this issue?

Uncaught exception 'Buzz\Exception\RequestException' with message 'SSL certificate problem: unable to get local issuer certificate'

My test:
include "vendor/autoload.php";

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

$adapter = new BuzzAdapter('Personal Access Token');
$digitalocean = new DigitalOceanV2($adapter);
$a = $digitalocean->domain();
print_r($a->getAll());

Image error

Hi there,

I'm getting this when I am calling the getAll() function in the Image api:

Fatal error: Uncaught exception 'Buzz\Exception\ClientException' with message 'Operation timed out after 5000 milliseconds with 0 bytes received' in /var/www/wp-content/plugins/gravityforms-digitalocean/api/vendor/kriswallsmith/buzz/lib/Buzz/Client/Curl.php:29 Stack trace: #0 /var/www/wp-content/plugins/gravityforms-digitalocean/api/vendor/kriswallsmith/buzz/lib/Buzz/Browser.php(130): Buzz\Client\Curl->send(Object(Buzz\Message\Request), Object(Buzz\Message\Response)) #1 /var/www/wp-content/plugins/gravityforms-digitalocean/api/vendor/kriswallsmith/buzz/lib/Buzz/Browser.php(82): Buzz\Browser->send(Object(Buzz\Message\Request)) #2 /var/www/wp-content/plugins/gravityforms-digitalocean/api/vendor/kriswallsmith/buzz/lib/Buzz/Browser.php(31): Buzz\Browser->call('https://api.dig...', 'GET', Array) #3 /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Adapter/BuzzAdapter.php(53): Buzz\Browser->get('https://api.dig...') #4 /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Api/Image.php(27): DigitalOceanV2\Ad in /var/www/wp-content/plugins/gravityforms-digitalocean/api/vendor/kriswallsmith/buzz/lib/Buzz/Client/Curl.php on line 29

Issues with sshkey

It's not possible to create droplets with ssh key fingerprints instead of ids.

Also, I keep getting the following error: "[422] You specified invalid ssh key ids for Droplet creation. (unprocessable_entity)", not sure if it's DO's api or the client library.

Library is broken again.

Missing another property. Seriously.

Property "DigitalOceanV2\Entity\Droplet::size" should exist.

$image->getAll() error

Hello,

I am using the very latest commit, but when I call the $image->getAll() function, I get the following error

Warning: array_map(): An error occurred while invoking the map callback in /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Api/Image.php on line 33

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Property "DigitalOceanV2\Entity\Image::actionIds" should exist.' in /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Entity/AbstractEntity.php:49 Stack trace: #0 /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Entity/AbstractEntity.php(68): DigitalOceanV2\Entity\AbstractEntity->__set('actionIds', Array) #1 /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Entity/AbstractEntity.php(24): DigitalOceanV2\Entity\AbstractEntity->build(Object(stdClass)) #2 /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Api/Image.php(32): DigitalOceanV2\Entity\AbstractEntity->__construct(Object(stdClass)) #3 [internal function]: DigitalOceanV2\Api\Image->DigitalOceanV2\Api\{closure}(Object(stdClass)) #4 /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Api/Image.php(33): array_map(Object(Closure), Array) #5 /var/www/wp-content/plugins/gravityforms-digitalocean/functions/gravityforms-digitalocean-functions.php( in /var/www/wp-content/plugins/gravityforms-digitalocean/api/src/Entity/AbstractEntity.php on line 49

Just letting you know!

I checked the API here: https://developers.digitalocean.com/#images , and there is an

action_ids
array listed as part of the Image entity.

Thanks

Can't request droplets

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.