nexylan/gandi-sdk

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP sdk to communicate with the Gandi API

Installs: 32 455

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 5

Forks: 3

Open Issues: 0

pkg:composer/nexylan/gandi-sdk

v0.7.0 2024-03-08 10:25 UTC

This package is auto-updated.

Last update: 2026-02-06 16:03:36 UTC


README

Gandi API V3 PHP SDK.

Gandi SDK will stop being maintained at the end of december 2025.

Please, move to Gandi API V5 at your earliest convenience. See https://api.gandi.net/docs/ for more information.

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

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
//     // ...
// ]