Skip to content

diogogmt/go-emailacid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Email on Acid API client

go-emailacid is a Go client package for accessing the Email on Acid API.

Go package

GoDoc

Examples

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"`
}

About

Golang Email on Acid API client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages