Skip to content

malc0mn/vultr-api-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP API Client for api.vultr.com

Build Status Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight

Install using composer

Open a shell, cd to your poject and type:

composer require malc0mn/vultr-api-client

or edit composer.json and add:

{
    "require": {
        "malc0mn/vultr-api-client": "~1.0"
    }
}

If you want to use the GuzzleHttpAdapter, you will need to add Guzzle 5 or Guzzle 6.

Usage examples

Guzzle
require 'vendor/autoload.php';

use Vultr\VultrClient;
use Vultr\Adapter\GuzzleHttpAdapter;

// Using Guzzle 5 or 6...
$client = new VultrClient(
    new GuzzleHttpAdapter('your-api-key')
);

$result = $client->metaData()->getAccountInfo();

var_export($result);
CURL
require 'vendor/autoload.php';

use Vultr\VultrClient;
use Vultr\Adapter\CurlAdapter;

// Using regular CURL, courtesy of 'usefulz'
$client = new VultrClient(
    new CurlAdapter('your-api-key')
);

$result = $client->metaData()->getAccountInfo();

var_export($result);

Vultr API documentation

The full API documentation can be found on https://www.vultr.com/api and has been partly added to the PHP DocBlocks companioning the PHP functions that implement the actual calls.

Credits

The original version of this API is done by usefulz. This version has been forked by integr.io for use in one of our Symfony applications. It has been reworked with extensibility and ease of use in mind.

About

API Client for Vultr.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%