Commit 4b2e7f5a authored by Mark Tearle's avatar Mark Tearle

Start working out REST service from desec.io to call

parent e3624378
......@@ -6,7 +6,7 @@ error_reporting(E_ALL);
require_once 'config.php';
use Ramsey\Uuid\Uuid;
use RestService\RestService;
function check_username($username) {
// returns true if we get some info about the username
......@@ -23,6 +23,40 @@ function check_challenge($challenge) {
return 1;
}
// methods to alter and update desec.io
//
// curl -X PUT https://desec.io/api/v1/domains/{name}/rrsets/{subname}/{type}/ \
// --header "Authorization: Token {token}" \
// --header "Content-Type: application/json" --data @- <<EOF
// {
// "subname": "{subname}",
// "type": "{type}",
// "ttl": 3600,
// "records": ["..."]
// }
// EOF
//
function update_desec_txt($name, $txt) {
$restService = new RestService();
// $response = $restService
// ->setEndpoint('https://jsonplaceholder.typicode.com')
// ->get('/posts/1');
// $restService
// ->setEndpoint('https://jsonplaceholder.typicode.com')
// ->put('/posts/1',
// [
// 'id' => 1,
// 'text' => 'Test'
// ]
// );
}
// Instantiate Leaf
$leaf = new Leaf\App;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment