composer support
This commit is contained in:
parent
6ed0e6e9cf
commit
55ad6b4fad
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/vendor/
|
||||||
|
/.idea
|
@ -4,9 +4,18 @@
|
|||||||
|
|
||||||
Полезно для автоматизации, если у вас много доменов/поддоменов.
|
Полезно для автоматизации, если у вас много доменов/поддоменов.
|
||||||
|
|
||||||
|
## Установка
|
||||||
|
|
||||||
|
```shell
|
||||||
|
composer require ch1p/php-fastdns
|
||||||
|
```
|
||||||
|
|
||||||
## Использование
|
## Использование
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
use ch1p\FastDNS;
|
||||||
|
use ch1p\FastDNSException;
|
||||||
|
|
||||||
$fastdns = new FastDNS();
|
$fastdns = new FastDNS();
|
||||||
try {
|
try {
|
||||||
// авторизуемся
|
// авторизуемся
|
||||||
|
21
composer.json
Normal file
21
composer.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "ch1p/php-fastdns",
|
||||||
|
"description": "FastVPS DNS API Client",
|
||||||
|
"type": "library",
|
||||||
|
"license": "BSD-2c",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Evgeny Zinoviev",
|
||||||
|
"email": "me@ch1p.io"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-json": "*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"ch1p\\": "src/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace ch1p;
|
||||||
|
|
||||||
class FastDNS {
|
class FastDNS {
|
||||||
|
|
||||||
const API_HOST = 'https://fastdns.fv.ee';
|
const API_HOST = 'https://fastdns.fv.ee';
|
||||||
@ -302,6 +304,4 @@ class FastDNS {
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class FastDNSException extends Exception {}
|
|
5
src/FastDNSException.php
Normal file
5
src/FastDNSException.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace ch1p;
|
||||||
|
|
||||||
|
class FastDNSException extends \Exception {}
|
Loading…
x
Reference in New Issue
Block a user