Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
/.idea
/vendor/
*.code-workspace
.idea
.php-cs-fixer.cache
.php_cs.cache
.phpunit.cache
.phpunit.result.cache
build
composer.lock
coverage
docs
node_modules
phpunit.xml
testbench.yaml
vendor
/.vscode
*.sh
tmp
.DS_Store
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"require": {
"guzzlehttp/guzzle": "^7.0.1",
"php": ">=7.2.5",
"psr/http-message": "~1.0",
"psr/http-message": "^1.0|^2.0",
"ext-json": "*"
},
"require-dev": {
Expand Down
12 changes: 10 additions & 2 deletions src/Endpoints/DNS.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Created by PhpStorm.
* User: junade
Expand Down Expand Up @@ -59,7 +60,7 @@ public function addRecord(
if (is_numeric($priority)) {
$options['priority'] = (int)$priority;
}

if (!empty($data)) {
$options['data'] = $data;
}
Expand All @@ -81,7 +82,7 @@ public function listRecords(
string $name = '',
string $content = '',
int $page = 1,
int $perPage = 20,
int $perPage = 500,
string $order = '',
string $direction = '',
string $match = 'all'
Expand Down Expand Up @@ -153,4 +154,11 @@ public function deleteRecord(string $zoneID, string $recordID): bool

return false;
}

public function batchRequest(string $zoneID, array $requests): \stdClass
{
$response = $this->adapter->post('zones/' . $zoneID . '/dns_records/batch', $requests);
$this->body = json_decode($response->getBody());
return $this->body;
}
}