Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nfacha/dnsimple-api
Class to manage DNS records using the dnsimple.com API
https://github.com/nfacha/dnsimple-api
Last synced: 13 days ago
JSON representation
Class to manage DNS records using the dnsimple.com API
- Host: GitHub
- URL: https://github.com/nfacha/dnsimple-api
- Owner: nfacha
- Created: 2020-04-09T00:09:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T00:36:27.000Z (over 4 years ago)
- Last Synced: 2024-04-18T12:58:53.807Z (9 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##### This class is used to manage (list,create and delete) DNS records on dnsimple.com using its API.
You will need obtain your AccountID and API Key to use this library, you can do so from the "**Account**" option of the dashboard then head over to the "**Automation**" tab.
###### Usage:
```php
$dnSimple = new dnSimpleApi( "DNSIMPLE_API_KEY", "DNSIMPLE_ACCOUND_ID" );
$dnsResponse = $dnSimple->createRecord( "example.com", [
'type' => 'a',
'name' => 'squirrel',
'content' => '8.8.8.8'
] );
if ( array_key_exists( 'data', $dnsResponse ) && array_key_exists( 'id', $dnsResponse['data'] ) ) {
$dnSimple->deleteRecord( "example.com", $dnsResponse['data']['id'] );
};```
Official docs available here: https://dnsimple.com/api