mixmax

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2017 License: MIT Imports: 23 Imported by: 0

README

Go Mixmax

GoDoc Go project version Go Report Card

Summary

A golang Mixmax client library.

Installation

go get github.com/ghmeier/go-mixmax

Documentation

Check out the Mixmax API documentation for an exhaustive list of examples and explanations.

View the GoDoc for implementation details on go-mixmax

Here are some simple examples:

Contacts
mixmax := mixmax.New(apiKey)
params := &models.ContactParams{
    Email: "test@test.com",
    Name:  "test",
}

err := mixmax.Contacts.New(params)
Send
mixmax := mixmax.New(apiKey)
params := &models.Send{
    To:      []*Recipient{&Recipient{Email: "test@test.com"}},
    From:    "me@test.com",
    Subject: "Welcome to the Mixmax API",
    HTML:    "The body of the email",
}

err := mixmax.Send.New(params)

Usage

Each major API resource is contained under the main mixmax client, so usage requires initializing the mixmax client with your Mixmax API Token and importing models that will be used to send requests. This example uses the Contact resource, but other resources follow the same pattern:

import (
    "github.com/ghmeier/go-mixmax"
    mixmodels "github.com/ghmeier/go-mixmax/models"
)

mm := mixmax.New(MIXMAX_API_TOKEN)

err := mm.Contact.New(mixmodels.ContactParams)

contacts, err := mm.Contact.List()

Development

Go Mixmax is still in early development with changes likely to come. If you spot problems or missing functionality open an issue or submit a pull request.

Note: The /insightsreport resource is not yet implemented

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AppointmentLinks *appointmentlinks.Client
	Availability     *availability.Client
	CodeSnippet      *codesnippet.Client
	Contacts         *contacts.Client
	ContactGroups    *contactgroups.Client
	Events           *events.Client
	FileRequests     *filerequests.Client
	Integrations     *integrations.Client
	Messages         *messages.Client
	Polls            *polls.Client
	QAs              *qa.Client
	Reminders        *reminders.Client
	Rules            *rules.Client
	Send             *send.Client
	Sequences        *sequences.Client
	Snippets         *snippets.Client
	SnippetTags      *snippettags.Client
	Teams            *teams.Client
	Unsubscribes     *unsubscribes.Client
	UserPreferences  *userpreferences.Client
	Users            *users.Client
	YesNo            *yesno.Client
}

func New

func New(key string) *Client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL