mamluk/zilore-dns-sdk

There is no license information available for the latest version (1.0.1) of this package.

A PHP SDK to interact with the Zilore API

1.0.1 2023-06-21 12:22 UTC

This package is auto-updated.

Last update: 2024-10-21 15:18:29 UTC


README

This is a simple SDK for Zilore DNS API. It is written in Python 8.2 and allows for interaction with the Domains, Records, GeoRecords FailoverRecords APIs from Zilore (https://zilore.com/en/help/api).

It was designed to be used with the Zilore DNS CLI, which allows you to declartively declare your DNS, GeoDNS and Failovers records in a YAML file and then sync them to Zilore DNS.

Installation

composer require mamluk/zilore-dns-sdk

Usage

use Zilore\Api\Domains
use Zilore\Api\Records;
use Zilore\Api\GeoRecords;
use Zilore\Api\FailoverRecords;

$domains = new Domains('YOUR_ZILORE_API_KEY')
$dommains->list(); // Returns a list of all the domains in Zilore
$domains->add('example.com'); // Adds a new domain to Zilore
$domains->delete('example.com'); // Deletes a domain from Zilore

$records = new Records('YOUR_ZILORE_API_KEY');
$records->list('example.com'); // Returns a list of all the records for example.com
$records->add('example.com', 'A', 'subdomain.example.com', '22.33.44.55', 3600); // Adds a new record to example.com

// ... and so on so forth

License

MIT. See LICENSE for more details.