go-itg/README.md
2018-07-22 02:15:24 -06:00

34 lines
819 B
Markdown

# 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)
}
```