2017 © Pedro Peláez
 

symfony-bundle inwxbundle

A Symfony bundle to use the inwx api (Domrobot class https://github.com/inwx/php-client)

image

bingemer/inwxbundle

A Symfony bundle to use the inwx api (Domrobot class https://github.com/inwx/php-client)

  • Sunday, August 21, 2016
  • by bingemer
  • Repository
  • 2 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

InwxBundle - A bundle to talk to the inwx api

Build Status: Build Status Scrutinizer Code Quality, (*1)

Features

  • Uses the inwx class: https://github.com/inwx/php-client
  • Service that performs api login upon __construct(), logout on __destruct()
  • predefined funtions for common steps like new DNS entry or update an existing entry.

Installation

Add the package to your composer.json file, (*2)

"bingemer/inwxbundle": "dev-master",

Add this to app/AppKernel.php, (*3)

<?php
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Bingemer\InwxBundle\BingemerInwxBundle(),
        );

        ...

        return $bundles;
    }

Configuration

1) Edit app/config.yml

Add the following parameters to parameters.yml, (*4)

parameters:
    ...
    inwx_user: username
    inwx_pass: password
    inwx_url: 'https://api.domrobot.com/xmlrpc/'
    inwx_locale: en

Usage

In your Controller get the service:, (*5)

$domrobot = $this->get('bingemer_inwx_bundle');

Use the functions provided to create an A entry (4th parameter is entry type which defaults to 'A'):, (*6)

$result = $domrobot->createRecord('hostname w/o domain', 'ip-address', 'domain');

update record:, (*7)

$result = $domrobot->updateRecord('inwx_id, 'ip-address');

delete record:, (*8)

$result = $domrobot->deleteRecord('inwx_id);

The result array is 1:1 from the original Domrobot class documented here: API DOC, (*9)

In case of my createRecord() function, the "inwx_id" is contained in the $result., (*10)

The original Domrobot class can be found here: Inwx Domrobot Class, (*11)

More information and classes for other languages can be found here: https://www.inwx.de/en/offer/api, (*12)

Errors

This is my first symfony bundle, if you have any problems or found mistakes I made please tell me ;), (*13)

The Versions

21/08 2016

dev-master

9999999-dev http://github.com/bingemer/InwxBundle

A Symfony bundle to use the inwx api (Domrobot class https://github.com/inwx/php-client)

  Sources   Download

MIT

by Jörg Bingemer

api symfony inwx