Coder Social home page Coder Social logo

go-emailacid's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.