Go to file
2018-08-15 15:15:19 -06:00
generate-structs Adding jflect and converted to package for generate-structs 2018-08-15 15:15:19 -06:00
itglue Begin work on generate-structs for flexible assets 2018-07-22 22:39:46 -06:00
.gitignore git ignore 2018-07-22 22:20:54 -06:00
LICENSE Initial commit 2018-06-26 16:36:40 -06:00
README.md Update example 2018-07-22 02:15:24 -06:00

go-itg

IT Glue API Structs + Methods for the Go

This is nowhere near complete, and at least for now, I will only be adding support the functionality required for use within my organization. Feel free to send a pull request if you'd like to contribute anything that's missing.

Installation

go get deadbeef.codes/steven/go-itg

Usage

package main

import (
	"fmt"
	"log"

	"deadbeef.codes/steven/go-itg/itglue"
)

func main() {
	fmt.Println("Example IT Glue Application")
	itg := itglue.NewITGAPI("ITG.XXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXX")

	nd, err := itg.GetOrganizationByName("Next Digital Inc.") //Returns an organization list
	if err != nil {
		log.Fatalf("could not get nd: %s", err)
	}
	log.Printf("%s - %s\n", nd.Data[0].ID, nd.Data[0].Attributes.Name)

}