pressly/go-emailacid

Name: go-emailacid

Owner: Pressly Inc.

Description: Golang Email on Acid API client

Forked from: diogogmt/go-emailacid

Created: 2017-07-11 22:06:11.0

Updated: 2017-07-11 22:06:12.0

Pushed: 2017-07-11 22:08:39.0

Homepage: null

Size: 8

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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

ntTypes := []emailacid.ClientType{
ailacid.Outlook03,
ailacid.Outlook10,

lAcidClient = emailacid.New(apiKey, password, clientTypes)

Submit a new test

= &emailacid.EmailTest{
Subject:          "test",
HTML:             "<html><body>testing...</body></html>",
ReferenceID:      "12345ABC",
CustomerID:       "2",
Clients:          []emailacid.ClientType{
  emailacid.Outlook03,
  emailacid.Outlook10,
}

rr := EmailAcidClient.CreateTest(in)

Get test results

ID := "sandbox"
ntID := "outlook03"
rr := EmailAcidClient.GetTestClientResult(testID, clientID)

The test result contains the following information:

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.