jerome1337 / gandi-sdk
PHP sdk to communicate with the Gandi API
dev-master / 0.x-dev
2018-01-17 10:33 UTC
Requires
- php: ^7.1
- lstrojny/fxmlrpc: ^0.14.0
Requires (Dev)
- matthiasnoback/symfony-config-test: ^3.0
- sllh/php-cs-fixer-styleci-bridge: ^2.1
- symfony/dependency-injection: ^2.8 || ^3.0
- symfony/http-kernel: ^2.8 || ^3.0
Suggests
- php-http/httplug-bundle: For Symfony integration as a bundle with lstrojny/fxmlrpc
This package is not auto-updated.
Last update: 2024-11-10 02:57:18 UTC
README
Gandi API PHP SDK.
Documentation
All the installation and usage instructions are located in this README. Check it for a specific versions:
Installation
First of all, you need to require this library through Composer:
composer require nexylan/gandi-sdk
With Symfony:
Enable the bundle on the AppKernel
class:
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Nexy\Gandi\Bridge\Symfony\Bundle\NexyGandiBundle(), ); // ... return $bundles }
Configuration
Configure the bundle to your needs:
# parameters.yml parameters: # Change to https://rpc.gandi.net/xmlrpc/ in prod gandi_api_url: https://rpc.ote.gandi.net/xmlrpc/
# config.yml nexy_gandi: api_url: %gandi_api_url% api_key: 'yourApiKey'
Usage
Use the predefined methods and/or use Gandi methods directly
$gandi = new Gandi('api_url', 'api_key'); $result = $gandi->setup()->domain->info('mydomain.net'); // Results // [ // status => [ // 0 => clientTransferProhibited // ] // zone_id => 42 // fqdn => mydomain.net // // ... // ]