Skip to content

kenzo0107/sendgrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SendGrid API in Go

GoDoc test lint codecov

This library supports most if not all of the SendGrid REST calls.

Installing

go get

$ go get -u github.com/kenzo0107/sendgrid

Example

Get Teammate

package main

import (
	"context"
	"log"
	"os"

	"github.com/kenzo0107/sendgrid"
)

func main() {
	apiKey := os.Getenv("SENDGRID_API_KEY")

	c := sendgrid.New(apiKey)
	u, err := c.GetTeammate(context.TODO(), "username")
	if err != nil {
		fmt.Printf("%s\n", err)
		return
	}
	log.Printf("user: %#v\n", u)
}

License

MIT License