Rename Domain methods
authorMikael Berthe <mikael@lilotux.net>
Sun, 28 May 2017 00:21:09 +0200
changeset 191 b3f9331551b7
parent 190 0684ddad598c
child 192 87eda713b614
Rename Domain methods Be homogeneous with existing methods (e.g. GetBlockedAccounts).
domain.go
--- a/domain.go	Sun May 28 00:12:05 2017 +0200
+++ b/domain.go	Sun May 28 00:21:09 2017 +0200
@@ -10,10 +10,10 @@
 	"github.com/sendgrid/rest"
 )
 
-// GetDomainBlocks returns the current user blocked domains
+// GetBlockedDomains returns the current user blocked domains
 // If lopt.All is true, several requests will be made until the API server
 // has nothing to return.
-func (mc *Client) GetDomainBlocks(lopt *LimitParams) ([]DomainName, error) {
+func (mc *Client) GetBlockedDomains(lopt *LimitParams) ([]DomainName, error) {
 	const endPoint = "domain_blocks"
 	var links apiLinks
 	var domains []DomainName
@@ -35,16 +35,16 @@
 	return domains, nil
 }
 
-// DomainBlock blocks the specified domain
-func (mc *Client) DomainBlock(domain DomainName) error {
+// BlockDomain blocks the specified domain
+func (mc *Client) BlockDomain(domain DomainName) error {
 	const endPoint = "domain_blocks"
 	params := make(apiCallParams)
 	params["domain"] = string(domain)
 	return mc.apiCall(endPoint, rest.Post, params, nil, nil, nil)
 }
 
-// DomainUnblock unblocks the specified domain
-func (mc *Client) DomainUnblock(domain DomainName) error {
+// UnblockDomain unblocks the specified domain
+func (mc *Client) UnblockDomain(domain DomainName) error {
 	const endPoint = "domain_blocks"
 	params := make(apiCallParams)
 	params["domain"] = string(domain)