terraform/vendor/github.com/dnsimple/dnsimple-go/dnsimple/templates_domains.go

22 lines
594 B
Go
Raw Normal View History

package dnsimple
import (
"fmt"
)
// ApplyTemplate applies a template to the given domain.
//
// See https://developer.dnsimple.com/v2/templates/domains/#apply
func (s *TemplatesService) ApplyTemplate(accountID string, templateIdentifier string, domainID string) (*TemplateResponse, error) {
path := versioned(fmt.Sprintf("%v/templates/%v", domainPath(accountID, domainID), templateIdentifier))
templateResponse := &TemplateResponse{}
resp, err := s.client.post(path, nil, nil)
if err != nil {
return nil, err
}
templateResponse.HttpResponse = resp
return templateResponse, nil
}