<?php


namespace Heanup\App\Api\Controller;


use Cloudflare\Api;
use Cloudflare\Zone\Dns;
use Heanup\App\Api\RestfulController;

class Cloudflare extends RestfulController
{

    /**
     * Get Method|获取数据
     * @return void
     */
    protected function getData()
    {
        $zone_identifier="f1d34a4c94e10f131c76970de4b0dee7";
        $client = new Api("chendeben@qq.com","093fcd440ed453c2689c42150bdb7d5dbc4fb");
        $dns=new Dns($client);
        $record=$dns->list_records($zone_identifier);
        $this->showSuccess($record);
    }

    /**
     * Post Method|新增数据
     * @return void
     */
    protected function postData()
    {
        // TODO: 需要实现 postData() 方法.
    }

    /**
     * Put Method|更新数据
     * @return void
     */
    protected function putData()
    {
        // TODO: 需要实现 putData() 方法.
    }

    /**
     * Delete Method|删除数据
     * @return void
     */
    protected function deleteData()
    {
        // TODO: 需要实现 deleteData() 方法.
    }
}