Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hayesgm/go-dnsimple
Unofficial DNSimple API library in Go
https://github.com/hayesgm/go-dnsimple
Last synced: about 1 month ago
JSON representation
Unofficial DNSimple API library in Go
- Host: GitHub
- URL: https://github.com/hayesgm/go-dnsimple
- Owner: hayesgm
- License: mit
- Created: 2013-09-08T22:48:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-08T22:59:04.000Z (about 11 years ago)
- Last Synced: 2024-06-21T17:53:19.454Z (5 months ago)
- Language: Go
- Size: 109 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-dnsimple
===========Unofficial DNSimple API library in Go
# Installation
import "github.com/hayesgm/go-dnsimple/dnsimple"
# Usage
First, you'll need to create a client with your authorization scheme.
// Token Authorization
cli := &dnsimple.Client{dnsimple.NewTokenAuth(email, token)}// Domain Authorization
cli := &dnsimple.Client{dnsimple.NewDomainAuth(domain, token)}Next, run API commands:
var records []dnsimple.RecordObj
records, err := cli.GetRecords("example.com", "www") // returns []RecordObjrecord dnsimple.RecordObj
record, err = cli.CreateRecord("example.com", "admin", dnsimple.TXT_RECORD, "[email protected]", 360, 10)err = cli.DeleteRecord("example.com", "admin", record.Record.Id)
# TODOs
* Implement more functions from [API docs](http://developer.dnsimple.com/)
* Make sure error handling works as expected