cfmgrv3 init...3
This commit is contained in:
parent
cfd934b265
commit
ba9b26c293
@ -68,7 +68,7 @@ class Account extends API
|
|||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
$entity = $this->getEntityByResult($cfResult->result);
|
$entity = $this->getEntityByResult($cfResult->result);
|
||||||
Log::add("warning", "API {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
Log::add("warning", "Account API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
protected function getCFResults_List(int $page): array
|
protected function getCFResults_List(int $page): array
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class Firewall extends API
|
|||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
$entity = $this->getEntityByResult($cfResult->result);
|
$entity = $this->getEntityByResult($cfResult->result);
|
||||||
Log::add("warning", "API {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
Log::add("warning", "Record API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
// public function delete(){ }
|
// public function delete(){ }
|
||||||
@ -85,6 +85,7 @@ class Firewall extends API
|
|||||||
if (!$cfResult->success) {
|
if (!$cfResult->success) {
|
||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
|
Log::add("warning", "Record API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $this->getEntityByResult($cfResult->result);
|
return $this->getEntityByResult($cfResult->result);
|
||||||
}
|
}
|
||||||
protected function getCFResults_List(int $page): array
|
protected function getCFResults_List(int $page): array
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class Record extends API
|
|||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
$entity = $this->getEntityByResult($cfResult->result);
|
$entity = $this->getEntityByResult($cfResult->result);
|
||||||
Log::add("warning", "API {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
Log::add("warning", "Record API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
public function update(\App\Entities\Cloudflare\API\RecordEntity $entity, array $fieldDatas): \App\Entities\Cloudflare\API\RecordEntity
|
public function update(\App\Entities\Cloudflare\API\RecordEntity $entity, array $fieldDatas): \App\Entities\Cloudflare\API\RecordEntity
|
||||||
@ -87,9 +87,8 @@ class Record extends API
|
|||||||
if (!$cfResult->success) {
|
if (!$cfResult->success) {
|
||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
$entity = $this->getEntityByResult($cfResult->result);
|
Log::add("warning", "Record API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
Log::add("warning", "API {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
return $this->getEntityByResult($cfResult->result);
|
||||||
return $entity;
|
|
||||||
}
|
}
|
||||||
public function delete(\App\Entities\Cloudflare\API\RecordEntity $entity)
|
public function delete(\App\Entities\Cloudflare\API\RecordEntity $entity)
|
||||||
{
|
{
|
||||||
@ -98,7 +97,7 @@ class Record extends API
|
|||||||
if (!$cfResult->success) {
|
if (!$cfResult->success) {
|
||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
Log::add("warning", "API {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
Log::add("warning", "Record API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
}
|
}
|
||||||
public function sync(\App\Entities\Cloudflare\API\RecordEntity $entity): \App\Entities\Cloudflare\API\RecordEntity
|
public function sync(\App\Entities\Cloudflare\API\RecordEntity $entity): \App\Entities\Cloudflare\API\RecordEntity
|
||||||
{
|
{
|
||||||
@ -107,6 +106,7 @@ class Record extends API
|
|||||||
if (!$cfResult->success) {
|
if (!$cfResult->success) {
|
||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
|
Log::add("warning", "Record API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $this->getEntityByResult($cfResult->result);
|
return $this->getEntityByResult($cfResult->result);
|
||||||
}
|
}
|
||||||
protected function getCFResults_List(int $page): array
|
protected function getCFResults_List(int $page): array
|
||||||
|
|||||||
@ -89,6 +89,7 @@ class Zone extends API
|
|||||||
}
|
}
|
||||||
//최종 결과값은 body->result->id='필드명',body->result->value='on/off'이런식으로 받음
|
//최종 결과값은 body->result->id='필드명',body->result->value='on/off'이런식으로 받음
|
||||||
$entity->$field = $cfResult->result->value;
|
$entity->$field = $cfResult->result->value;
|
||||||
|
Log::add("warning", "Zone API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ class Zone extends API
|
|||||||
$entity = $this->setCFSetting($entity, 'ipv6', 'off');
|
$entity = $this->setCFSetting($entity, 'ipv6', 'off');
|
||||||
$entity = $this->setCFSetting($entity, 'development_mode', 'off');
|
$entity = $this->setCFSetting($entity, 'development_mode', 'off');
|
||||||
$entity = $this->setCFSetting($entity, 'security_level', 'medium');
|
$entity = $this->setCFSetting($entity, 'security_level', 'medium');
|
||||||
Log::add("warning", "API {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
Log::add("warning", "Record API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
public function update(\App\Entities\Cloudflare\API\ZoneEntity $entity, array $fieldDatas): \App\Entities\Cloudflare\API\ZoneEntity
|
public function update(\App\Entities\Cloudflare\API\ZoneEntity $entity, array $fieldDatas): \App\Entities\Cloudflare\API\ZoneEntity
|
||||||
@ -130,7 +131,7 @@ class Zone extends API
|
|||||||
if (!$cfResult->success) {
|
if (!$cfResult->success) {
|
||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
Log::add("warning", "API {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
Log::add("warning", "Zone API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
}
|
}
|
||||||
public function sync(\App\Entities\Cloudflare\API\ZoneEntity $entity): \App\Entities\Cloudflare\API\ZoneEntity
|
public function sync(\App\Entities\Cloudflare\API\ZoneEntity $entity): \App\Entities\Cloudflare\API\ZoneEntity
|
||||||
{
|
{
|
||||||
@ -139,6 +140,7 @@ class Zone extends API
|
|||||||
if (!$cfResult->success) {
|
if (!$cfResult->success) {
|
||||||
throw new \Exception(var_export($cfResult, true));
|
throw new \Exception(var_export($cfResult, true));
|
||||||
}
|
}
|
||||||
|
Log::add("warning", "Zone API: {$entity->getTitle()} " . __FUNCTION__ . " 완료하였습니다.");
|
||||||
return $this->getEntityByResult($cfResult->result);
|
return $this->getEntityByResult($cfResult->result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user