/iterate-go

Go client for the Iterate API

Primary LanguageGoMIT LicenseMIT

Iterate Go GoDoc Build Status

Summary

A Go client for the Iterate API

Features

The client currently supports

  • Listing your surveys
  • Emailing a survey to a user

Additional API features will be added in the future.

Installation

go get github.com/iteratehq/iterate-go

Usage

import "go get github.com/iteratehq/iterate-go"

client := iterate.New("iterate-api-key")

// Send a survey
client.EmailSurvey("survey-id", iterate.SendParams{Email: "art@vandelayindustries.com"})

// Send a survey a week from now
client.EmailSurvey("survey-id", iterate.SendParams{
	Email: "art@vandelayindustries.com",
	Delay: 7 * 24 * time.Hour,
})

// Send a survey at a specific time
client.EmailSurvey("survey-id", iterate.SendParams{
	Email: "art@vandelayindustries.com",
	Date:  time.Date(2017, time.March, 12, 10, 0, 0, 0, time.UTC),
})

Documentation

For details on all the functionality in this package, check out the GoDoc documentation.

For a list of all available API endpoints, check out the API documentation.