Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dutchcodingcompany/laravel-hetzner-dns-api


https://github.com/dutchcodingcompany/laravel-hetzner-dns-api

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# An unofficial PHP SDK for the Hetzner DNS API.

[![Latest Version on Packagist](https://img.shields.io/packagist/v/dutchcodingcompany/laravel-hetzner-dns-api.svg?style=flat-square)](https://packagist.org/packages/dutchcodingcompany/laravel-hetzner-dns-api)
[![Total Downloads](https://img.shields.io/packagist/dt/dutchcodingcompany/laravel-hetzner-dns-api.svg?style=flat-square)](https://packagist.org/packages/dutchcodingcompany/laravel-hetzner-dns-api)

This PHP/Laravel client around the [Hetzner DNS API](https://dns.hetzner.com/api-docs) support:
- Zones
- Records

This SDK is based on [Saloon](https://docs.saloon.dev/), a Laravel / PHP package that helps write API integrations and SDKs.

## Installation

You can install the package via composer:

```bash
composer require dutchcodingcompany/laravel-hetzner-dns-api
```

Set your hetzner dns api token in your .env file:
```env
HETZNER_DNS_API_TOKEN=hetzner-dns-token-here
```

## Configuration (optional)
You can publish the config file with:

```bash
php artisan vendor:publish --tag="hetzner-dns-api-config"
```

This is the contents of the published config file [can be found here](config/hetzner-dns.php).

If you would like to store the API Token outside of the config (e.g. encrypted in the database), you can override the resolver in the `boot` method of the `AppServiceProvider`
```php
'your-token');
}
}
```

## Usage

```php
$records = HetznerDnsClient::records()->all();
// resolves to a Records DTO
```

## ToDo
- add caching
- ...

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Niek Brekelmans](https://github.com/niekbr)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.