bamboohr_client

package module
v0.0.0-...-77282da Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallJsonApi

func CallJsonApi(url string, apikey string, method string) ([]byte, error)

func CallJsonApiInternal

func CallJsonApiInternal(req *http.Request, apikey string) ([]byte, error)

func CallJsonApiWithPayload

func CallJsonApiWithPayload(url string, apikey string, method string, payload *strings.Reader) ([]byte, error)

func PrettyStruct

func PrettyStruct(data interface{}) (string, error)

Types

type Config

type Config struct {
	ApiKey        string
	Tenant        string
	IncludeSalary bool
}

type Employee

type Employee struct {
	ID               string `json:"id"`
	Department       string `json:"department"`
	DisplayName      string `json:"displayName"`
	Division         string `json:"division"`
	EmployeeNumber   string `json:"employeeNumber"`
	FirstName        string `json:"firstName"`
	HireDate         string `json:"hireDate"`
	JobTitle         string `json:"jobTitle"`
	LastName         string `json:"lastName"`
	Location         string `json:"location"`
	OriginalHireDate string `json:"originalHireDate"`
	PayRate          string `json:"payRate"`
	Status           string `json:"status"`
	Supervisor       string `json:"supervisor"`
	SupervisorID     string `json:"supervisorId"`
	SupervisorEID    string `json:"supervisorEId"`
	TerminationDate  string `json:"terminationDate"`
}

func EmployeeDirectory

func EmployeeDirectory(config Config) ([]Employee, error)

func GetEmployee

func GetEmployee(config Config, id int) (*Employee, error)

func ListEmployees

func ListEmployees(config Config) ([]Employee, error)

func ListMyEmployees

func ListMyEmployees(config Config) ([]Employee, error)

type EmployeeListResponse

type EmployeeListResponse struct {
	Fields    []Field    `json:"fields"`
	Employees []Employee `json:"employees"`
}

type Field

type Field struct {
	ID         int32         `json:"id"`
	Manageable string        `json:"manageable"`
	Multiple   string        `json:"multiple"`
	Name       string        `json:"name"`
	Options    []FieldOption `json:"options"`
	Alias      string        `json:"employmentStatusHistory"`
}

type FieldOption

type FieldOption struct {
	ID           int32  `json:"id"`
	Archived     string `json:"archived"`
	CreatedDate  string `json:"createdDate"`
	ArchivedDate string `json:"archivedDate"`
	Name         string `json:"name"`
}

Jump to

Keyboard shortcuts

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