go-emailacid is a Go client package for accessing the Email on Acid API.
Create a new client
clientTypes := []emailacid.ClientType{
emailacid.Outlook03,
emailacid.Outlook10,
}
EmailAcidClient = emailacid.New(apiKey, password, clientTypes)
Submit a new test
in := &emailacid.EmailTest{
Subject: "test",
HTML: "<html><body>testing...</body></html>",
ReferenceID: "12345ABC",
CustomerID: "2",
Clients: []emailacid.ClientType{
emailacid.Outlook03,
emailacid.Outlook10,
}
}
_, err := EmailAcidClient.CreateTest(in)
Get test results
testID := "sandbox"
clientID := "outlook03"
_, err := EmailAcidClient.GetTestClientResult(testID, clientID)
The test result contains the following information:
type EmailTestResult struct {
ID string `json:"id,omitempty"`
DisplayName string `json:"display_name,omitempty"`
Client string `json:"client,omitempty"`
OS string `json:"os,omitempty"`
Category string `json:"category,omitempty"`
Screenshots EmailTestResultScreenshots `json:"screenshots,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
Status string `json:"status,omitempty"`
StatusDetails EmailTestResultStatusDetails `json:"status_details,omitempty"`
}