Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 832 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 832 Bytes

go-zenefits

A Go client library for accessing the Zenefits API

Go version 1.7 or greater

Usage

package main

import (
	"context"
	"flag"

	"github.com/rucas/go-zenefits/zenefits"
	"golang.org/x/oauth2"
)

func main() {
	id := flag.Int("id", 0, "Zenefits Company Id")
	k := flag.String("key", "", "Zenefits Api Key")
	flag.Parse()
	
	ctx := context.Background()
  	ts := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: *k})
  	tc := oauth2.NewClient(ctx, ts)
  	client := zenefits.NewClient(tc)
}

See examples/ for more code samples.

Contributing

👋 👉 Check out the Contributing doc to get you started.

License

This library is distributed under the MIT license found in the LICENSE file