Documentation
¶
Overview ¶
Package sendgrid provides a simple interface to interact with the Twilio SendGrid API
Index ¶
- Constants
- Variables
- func API(request rest.Request) (*rest.Response, error)
- func APIWithTimeout(request rest.Request, timeout time.Duration) (*rest.Response, error)
- func GetRequest(key, endpoint, host string) rest.Request
- func GetRequestSubuser(key, endpoint, host, subuser string) rest.Request
- func MakeRequest(request rest.Request) (*rest.Response, error)
- func MakeRequestAsync(request rest.Request) (chan *rest.Response, chan error)
- func MakeRequestRetry(request rest.Request) (*rest.Response, error)
- type Client
Constants ¶
const (
Version = "3.1.0"
)
Version is this client library's current version
Variables ¶
var DefaultClient = rest.DefaultClient
DefaultClient is used if no custom HTTP client is defined
Functions ¶
func API ¶
API sets up the request to the Twilio SendGrid API, this is main interface. Please use the MakeRequest or MakeRequestAsync functions instead. (deprecated)
func APIWithTimeout ¶
func GetRequest ¶
GetRequest @return [Request] a default request object
func GetRequestSubuser ¶
GetRequestSubuser like GetRequest but with On-Behalf of Subuser @return [Request] a default request object
func MakeRequest ¶
MakeRequest attempts a Twilio SendGrid request synchronously.
func MakeRequestAsync ¶
MakeRequestAsync attempts a request asynchronously in a new go routine. This function returns two channels: responses and errors. This function will retry in the case of a rate limit.
Types ¶
type Client ¶
Client is the Twilio SendGrid Go client
func NewSendClient ¶
NewSendClient constructs a new Twilio SendGrid client given an API key
func NewSendClientSubuser ¶
GetRequestSubuser like NewSendClient but with On-Behalf of Subuser @return Client
Directories
¶
Path | Synopsis |
---|---|
examples/apikey
command
|
|
examples/mail
command
|
|
examples/stats
command
|
|
examples
|
|
accesssettings
command
|
|
alerts
command
|
|
apikeys
command
|
|
asm
command
|
|
browsers
command
|
|
campaigns
command
|
|
categories
command
|
|
clients
command
|
|
contactdb
command
|
|
devices
command
|
|
geo
command
|
|
helpers/mail
command
|
|
ips
command
|
|
mail
command
|
|
mailboxproviders
command
|
|
mailsettings
command
|
|
partnersettings
command
|
|
scopes
command
|
|
senders
command
|
|
stats
command
|
|
subusers
command
|
|
suppression
command
|
|
templates
command
|
|
trackingsettings
command
|
|
user
command
|
|
whitelabel
command
|
|
helpers
|
|
inbound
command
|
|