Skip to content

ktsujichan/smarthr-sdk-go

Repository files navigation

SmartHR SDK for Go

License: MIT contributions welcome

SmartHR API client library written in Golang.

Install

go get -u github.com/ktsujichan/smarthr-sdk-go

How to Use

package main

import (
	"context"
	"fmt"
	"io/ioutil"

	"github.com/ktsujichan/smarthr-sdk-go"
	"gopkg.in/yaml.v2"
)

func main() {
	buf, err := ioutil.ReadFile("smarthr.yaml")
	if err != nil {
		panic(err)
	}
	var config smarthr.Config
	yaml.Unmarshal(buf, &config)
	c, _ := smarthr.NewClient(&config)
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	crews, _ := c.ListCrews(ctx, nil)
	fmt.Println(crews)
}

About

SmartHR API client library written in Golang

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages